Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2
1  Game Development / Newbie & Debugging Questions / Re: Can I draw on the desktop? on: 2006-12-29 20:52:48
It always takes almost 2 seconds to enter full-screen mode.  That's why Java 6 includes the ability to add a splash screen.
True. I actually even tried that SplashScreen as I havent used it before, but it looks like you can't draw on it (other than images) without pretty special magic tricks. And on top of that, you can't change the position.
2  Game Development / Newbie & Debugging Questions / Re: Can I draw on the desktop? on: 2006-12-28 22:40:32
I just tested the fullscreen trick. Well, it doesn't work as it takes like almost 2 seconds to enter and exit the full screen mode.

But I guess I can try to do it with some other language then. Just wanted to confirm that there isn't an easy way with Java Smiley

Thanks anyway.
3  Game Development / Newbie & Debugging Questions / Re: Can I draw on the desktop? on: 2006-12-27 19:50:42
Actually I don't need to interact with the other applications. That screenshot might be enough, if I had the program running in a small window or in the systray.

But after the screenshot, I think I'd need to maximize the window to be able to draw on top of it. And after a little while, I might have to minimize/restore it and pop it up again.

Or is there a way to take screenshots behind the Java application?
4  Game Development / Newbie & Debugging Questions / Can I draw on the desktop? on: 2006-12-27 18:21:01
Hi.

I'd like to be able to draw lines and images on top of other applications or on top of my shortcuts on the desktop.

I have investigated this for a while now, and I know it can be done with C++, and you could do something like that with .NET-languages (atleast to make the background invisible). But I still would like to do it in Java, if possible, as I know it the best.

So. Any ideas, is this possible? You can go into fullscreen mode with Java, but is it possible to show the usual desktop with other programs instead of the black fullscreen background (like invisible fullscreen Smiley)?
5  Game Development / Newbie & Debugging Questions / Re: Hi total newbie aksing questions :) on: 2005-12-29 09:26:58
"Developing Games in Java"
By: David Brackeen
The best non-basic programming book I have read. Atleast I found lots of new ideas / good ways to do things from that book which can be used in "normal" programming too.
6  Game Development / Newbie & Debugging Questions / Re: How to implement AI? on: 2005-12-28 07:46:46
Thanks for the answer.

That sounds like a pretty good way to do it. That way I think I could get the camoflaged units to be camoflaged even for the computer Smiley
7  Game Development / Newbie & Debugging Questions / How to implement AI? on: 2005-12-27 13:27:35
Im planning a turn-based strategy game.

But the problem is, how to implement AI for it in code level?

I was thinking that when it is computer's turn, some method would be launched. This method would get the "world" as parameters so it could place the computer's soldiers to correct places etc..

That sounds acceptible, probably it would work too. But how is the AI applied usually in turn-based games? Any hints what I should avoid? etc?
8  Game Development / Newbie & Debugging Questions / Re: How are the images used correctly in 2D? (gif or png?) on: 2005-06-16 08:50:20
Instead of setting the DisplayMode manually, you should use the GraphicsDevice.getDisplayModes (returns an array of all available displaymodes that your hardware supports) and then pick a suitable one from that list. Simple as that  Cool
Thx very much. I havent tested that yet, but I choose that mode manually, so I think that solution will work Smiley
9  Game Development / Newbie & Debugging Questions / Re: can anyone explain how to write the following algorithm? on: 2005-06-16 08:15:32
nevermind, figured it out. Thank you

If the answer is pretty simple, that would be nice to know, because atleast in my opinion it is nice to know how differently other people have solved problems.

I have done similar algorithm by adding n-amount of "NumberUnit"-classes (which can have only numbers 0-9 as their values) into an ArrayList. Of course this is far from efficient if the numbers go up to millions.
10  Game Development / Newbie & Debugging Questions / Re: How are the images used correctly in 2D? (gif or png?) on: 2005-06-09 15:23:14
Problem solved, the solution was to activate the hardware acceleration (-Dsun.java2d.opengl=true), now the game runs smoothly even with all those translucent images, tho I think I do as you suggested and change the format etc.

But another problem: The game wont go to full-screen mode anymore.

Of course the problem might be in the class which I use to go into full-screen mode, but if this is a common problem, Id appreciate to know it (and/or the solution) Smiley
11  Game Development / Newbie & Debugging Questions / Re: How are the images used correctly in 2D? (gif or png?) on: 2005-06-09 14:43:43
Don't use transparency for your mountains. If the background image doesn't change in some way, there's no reason for the transparency in the mountains. Save the mountains with the same color background that the real background uses[/li]
Actually the sky is moving, so thats the reason why the mountains are translucent. But I figured I could raise the clouds a little bit, so I could use even jpg-images as the mountains.
Quote
  • Enable the OpenGL pipeline (Java 1.5 only) by passing this option in the command-line: -Dsun.java2d.opengl=true
  • Use an OpenGL library (LWJGL, Xith3D, jME, etc.) - These libraries give you access to OpenGL's capabilities. The OpenGL is all hardware accelerated and OpenGL can handle translucency much more decently than average Java
Thanks, that looks like something that will be useful. Ill be back after I have checked those.
Quote
Your drawing programm should do stuff like that automatically, if you save a full alpha image as gif or 8bit png. However, you could also do that at runtime (if you want to give the user the ability to switch between fullalpha and bitmasked). All you need to do is copying the image over to a bitmasked image.
I know that this game is also going to be played/tested with slower machines than mine, so that might be a good thing to do also Smiley
12  Game Development / Newbie & Debugging Questions / Re: Packaging Java game for Windows distribution on: 2005-06-08 09:51:41
Personally I like the WebStart, but since I know that not all people have WebStart installed (they have just Microsoft's Java), the bundling option works sometimes better.
It's getting disingenuous to say that - it would be true if only one person on the planet did not have webstart, but vaguely implies that many don't. In reality, almost everyone has it. I saw the results of a study last week (don't know how old the study is) that implied around 85% of internet users have webstart (i.e. modern java). Until/unless I can find the original study and see what the circumstances are,
Really? Then the people I know are way different than "the normal people". But thats good to know.

Quote
I'm taking it with a pinch of salt, but we know that fore the last few years 50% of all new PCs came with webstart installed already, so...
And about that, personally I dont know many people who would have bought a PC from some big company (HP, Fujitsu etc.), so with home-build-computers that isnt true.

But seems like my target group (about my friends and their friends) are different than what the statistics show.

edit: come to think about it, my guess is, that in the target group, I referred, maybe like 60-70% have the WebStart, it is actually pretty big percent, but in such small group of people, it feels a lot more than it is.
13  Game Development / Newbie & Debugging Questions / Re: Packaging Java game for Windows distribution on: 2005-06-08 08:23:48
One option is of course to bundle the jre. There is a pretty new topic about this:
Here

The good thing is, that it is almost like any windows program then: just start the .bat and everything works and if the game itself is big already, couple of more MBs arent too noticable in that.

But of course the minus in bundling is, that it adds couple of more MBs to the package and when extracted, that couple of MBs (about 5) is something like 20 MBs.

Personally I like the WebStart, but since I know that not all people have WebStart installed (they have just Microsoft's Java), the bundling option works sometimes better.
14  Game Development / Newbie & Debugging Questions / How are the images used correctly in 2D? (gif or png?) on: 2005-06-08 08:05:24
Im wondering, how is the transparency made to games usually?

If I use png, the graphics work perfectly: I can use translucency (that half-transparent thing), but the really big minus is, that my game's fps dropped to 1-3, which is way too slow.
--> The game with png images

If I use gif, the fps is good, something like 50-70, but the picture looks like it would have been made with chainsaw.
--> The game with gif images
(notice the tree line near the sky and the bushes at the bottom, ball and players arent gifs, because those are small enough pictures to use pngs)

It feels like Im missing something..
15  Game Development / Game Play & Game Design / Re: What makes a game ADDICTING? on: 2005-06-05 09:11:13
...Technical knowledge is worthless in this area.
I wouldnt say exactly so. For usual games I think its good to consider those guidelines, because without them the game can fail pretty well.

But, then are the games that are remembered after years, they need to be some way "new" and if they follow these guidelines, they arent new. These guidelines are just collected from good games.
16  Game Development / Newbie & Debugging Questions / Re: Images to an animation (program needed) on: 2005-06-03 21:55:15
Eh, combining bitmap??
I made this one long time agooo, too bad I read this thread too late.
Anyway this is mine: Bitmap Combine
Glad that you told about it. GUI-program should be better for programmers who read this in future. How ever, your program didnt find any picture files from my computer for some reason (?), but it doesnt matter much, I have my program which I can adjust easily when I need Smiley
17  Game Development / Newbie & Debugging Questions / Re: Bad to make games for applet? on: 2005-06-03 21:50:05
The advantage of applications over applets in my opinion is the application's ability to go into full-screen mode, grabs the players attention much better  Smiley
18  Game Development / Newbie & Debugging Questions / Re: I want only 1 collision on: 2005-05-30 15:30:43
Quote
What I do after collisions is move the object just out of range of the collision.

That sounds something I could use. Thx.
19  Game Development / Newbie & Debugging Questions / Re: I want only 1 collision on: 2005-05-29 12:50:25
I have been wondering that collision thing before and now after reading that article I know it, but it didnt help much to this current problem.

In that article (pool) the both balls will change their direction after the collision, but in my problem the player will continue its way up.

Of course I could make the player to fall down after touching the ball, but I'd like to use it only as the last resort.
20  Game Development / Newbie & Debugging Questions / I want only 1 collision on: 2005-05-29 07:41:12
While reading this post, you might want to check this out (a picture about my problem)

So, Im programming a Volleyball game, where the user hits the ball from below or next to the ball.

In the picture if the user's green area and the ball collide, the ball should move to right and if the user's red area collide with the ball, the ball jumps up (and black is mix of these).

The problem is, that as the picture shows, I'd like to have the ball jump just up, not to the right. First the ball jumps up, yes, but the player goes still up and if/when the player is high enough, the ball's collision thinks I want the ball to go right too.

So, in short: any ideas how the collision detection in these kind of ball games is usually made? (or how the collision detection would ignore the green area if the ball is already on the red?)

edit: I figured that the program could store the "color" of the first collision to a variable and then ignore other collisions, but still the question remains, that how are those collisions usually handled?
21  Java Game APIs & Engines / Java 2D / Re: How to let a player to move on a board(jpg) on: 2005-05-11 06:35:09
Quote
You'll probably need a path find algoirthm to determine the possible positions that a player can move to, googling for "A Star" should help you out.

I suggest you check out this:
http://www.informit.com/content/images/1592730051/samplechapter/1592730051c.pdf
Which is the example chapter of book called Developing games in Java (by David Brackeen).

Personally I havent read that chapter yet from the book, but the book itself is well written, so that it easy to understand it. So I bet Im not much mistaken if I say that that chapter is a good way to learn the path finding.

(the reason why I suggest that is, that in my opinion many of those first links from google are way too complicated to understand, atleast for me).
22  Game Development / Newbie & Debugging Questions / Re: Sprite Modification on: 2005-05-11 06:22:20
Quote
Last I heard, you need to make the image totally from scratch, or you're just making a derivative work.

How does the copyright laws go in the other countries (or internationally)?

I mean here (Finland) it is counted as your work if you modify someone else's work enough or combine some other people's creatings into something new.

Do those differ from the international/usa/uk laws?
23  Game Development / Newbie & Debugging Questions / Re: Images to an animation (program needed) on: 2005-05-10 10:00:24
I made those changes and this is the result is shown in my previous post.

Tho the code isnt updated, but im pretty confident that if someone needs that class, they know how to repair it Smiley

Thx again to the helpers (especially to oNyx Smiley).
24  Game Development / Newbie & Debugging Questions / Re: Images to an animation (program needed) on: 2005-05-07 14:44:20
Very well. Thanks to both of you. (I figured out that combining part (BufferedImage.getGraphics() and paint to that one) Smiley)

But anyways. The program is here if anyone has any need for the sprite sheeting.

and

are made into this



And the source:
http://phpfi.com/60734

edit: I guess the imageType isnt right. Atleast those are 24-bit PNG's so its a bit more than 256 colors. But ill try out what would work (if any).
25  Game Development / Newbie & Debugging Questions / Re: Images to an animation (program needed) on: 2005-05-07 13:57:03
Actually I came up with a problem.

I was going to create a BufferedImage which would be big enough for the frames, but in BufferedImage constructor there is something strange:

BufferedImage(int width, int height, int imageType)

So what number would be appropriate as an imageType? I'd like to use translucent PNGs.

edit: hehe, problems again (i dont like working with pictures :/). How should I be able to combine 2 BufferedImages? The api isnt too much help. (or do i just miss the "combineThese(BufferedImage bi)" method?
26  Game Development / Newbie & Debugging Questions / Re: Images to an animation (program needed) on: 2005-05-07 11:27:17
Quote
> I have no idea how to save images in Java
ImageIO.write(outImage, "png", new File("woohoo.png"));

Hehe, thx. I was going to say that I just found sprite sheets created by people, but there arent mentioned any good programs (which would be able to handle pngs).

But now that I know how to save those, I can create a program to merge the images Cheesy
27  Game Development / Newbie & Debugging Questions / Re: Images to an animation (program needed) on: 2005-05-07 07:33:10
Quote
maybe you find em if you search for sprite sheet maker or something like that.

Thx, that lead to lots of (correct) results now that i know what they are called Smiley
Quote
You can of course also just write such a program in java. It's maybe 40 lines of code.

I was thinking of that, but since I have no idea how to save images in Java, I figured that there must be an easier way than learning that Smiley
28  Game Development / Newbie & Debugging Questions / Images to an animation (program needed) on: 2005-05-06 14:36:53
This should explain what I need:
http://var.tonberry1.net/animaatio.jpg

The problem is, that I dont have any good program which would be able to do that. MS Paint doesnt support the PNG-translucency and Adobe Photoshop doesnt really give good coordinates for the objects so the character in animation would jump pretty badly in each frame.

So, any suggestions which program would be able to do that? Or has someone of you done that in some other way (i tried just to keep the pictures in different files, but it was a mess after i had tens of pictures)?

And another question, I read a game development book (by david brackeen), which said that there might be hardware accelerated translucent png images in Java 1.5.0, but atleast i couldnt find that from the new features list. So did I just miss it or are we still waiting for that feature?
29  Game Development / Game Play & Game Design / Re: Mouse and key navigation and firing on: 2005-04-15 08:01:32
Quote
...theres no going back to up, down, left, right, ctrl, shift!

I think the only reason why people used to play with arrows was the picture of arrow in those. But if there would be for example numbers on those keys, probably no one would have used those.
30  Game Development / Newbie & Debugging Questions / Re: No AWT, no images? on: 2005-04-13 18:33:53
Thanks. That seems to be something I need to look into with better time Smiley

But if I say that I wont use AWT, does it mean that I cant even import java.awt.* or that i just cant use the AWT Components?
Pages: [1] 2
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (22 views)
2014-11-25 12:00:59

SHC (20 views)
2014-11-25 11:53:45

Norakomi (18 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (67 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!