Skip to main content
gamedev.net
🔒 Locked

[java] Question on performance of Java games

Started by gcsaba2 3 replies 1.1k views
Original Post
gcsaba2
gcsaba2
This year I won't be able to go anywhere during the summer due to lack of funds, so I was thinking I should use my time in some constructive way and write an isometric TBS game with a couple of friends of mine. I choose the TBS genre because it is a dying breed, and it's really my favorite genre and if the game industry can't provide me with what I need I'll have to satisfy myself (no perverted thoughts!) [grin] I also choose the Java language over C++ because I would want a couple of my friends to join me on the project, and they do not know C++ but they know Java. So with all the resources at hand I was thinking if it's actually worth making a 2D game in Java. How fast is it really? TBS games don't require much memory, of course, but I'd still would be using double buffering, graphics effects, sounds, background music... Can Java handle it? I mean, can it handle it on a not-so-powerful computer such as a Duron 1 GHz? If you don't have anything to add to this topic but you know some links to strategy games written in Java, then you could post them too, just so I can see what has already been done. But don't post a link if the game is really amateurish and ugly [smile]
H_o_p_s
H_o_p_s
It all depends on what API you use. There are some excellent OpenGL APIs out there for Java, but even the standard Java2D API that comes with java 1.4.2 does the job just fine.

So in short: yes. You can use double buffereing, graphics effects, sounds, background music and much more.

As far as as current strategy games written in Java, I have been working on one:


It can run at upwards of 60-80fps without hardware acceleration (mac os problem...), and between 300-400fps with acceleration (linux/windows).
BRING BACK THE BLACK (or at least something darker)
Matzon
Matzon
Actually, you can't make a decent game using *only* the standard jdk, since Sun broke sound in so many ways you'd think it was a joke. You need to use OpenAL or FMOD for decent sound. Both are available in the LWJGL package: http://lwjgl.org

That said, if you only do graphics, J2SE 1.4+ is more than enough for most simple (graphics wise) games.
gcsaba2
gcsaba2
I've not really used sounds in Java before, but I guess I could get by with the native Java components too. I'd probably write my own sound manager class that would deal with all the oddities you say exist, so in the end I would reduce the whole thing to just Sound.play() [wink]
I've used Fmod before and it's really cool but I don't want to be limited by anything. What if someone wants to buy the game, then I'd have to get a licence from Fmod...

H_o_p_s: You won't believe it, but I've made a game a couple of months ago whose basic tileset looks similar to yours [grin]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.