Skip to main content
gamedev.net
🔒 Locked

[java] Galaga Clone

Started by Lucidquiet Dec 29, 2004 at 2:41 PM 4 replies 3.8k views
Original Post
Lucidquiet
Lucidquiet
I am writing a clone of Galaga -- I'm sure there is one out there, but I want to design it on my own, the architecture, everything. I started it last night, and, I've come to point where I need to decide to do transparent images, or 2D objects, as per a Java2D scheme. I've been toying with the AI idea and have been wonderring if its going to kill frame rate if I regenerate each of the aliens geometry every single game loop. But with images I would need to create several images at increments of angles, and then scroll through those. The geometry sounds more flexible, as I could maybe reuse some of the code afterward. Anybody have some suggestions or comments? L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
tjoink
tjoink
Best use a memoryImageSource, where you can actually work pixel based. You could then access the array where your enemy is stored at any angle, and then probably the geometry can be an advantage. If however you go for images, you should know you can draw an image rotated, so there's no need to create your art at incrementing angles. As for performance, I would not worry about it, if you implement it well, there's no issue drawing 50 or so enemies.
Furthermore, great idea, one of the best games around in my opinion!
8! bits.. wow..
Lucidquiet
Lucidquiet
I've never done this -- for a game, and I have read all of Java2D, so I have some reference material. I was thinking of trying to access the array of pixels and saving a copy of the pixels underneath the enemies, and then repaint them after the image moves or whatever. This is slightly unneccessary as I started to think about the game, because in Galaga, there is little, to know overlap of graphics. But, I'm curious, is this possible with the memoryImageSource, and the ImageBuffer stuff ?

L-

Thanks for the reply, by the way. I will post a link to the source, with Ant build file, and everything, when it is finally done -- it probably won't be for a while though, because I won't be able to work on it in the next few weeks, and then school starts again, but I figure an hour or three a day, even during school might eventually see it done.
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
Tyraziel
Tyraziel
Why not use JOGL?
010100000110111101110100011011110111101001101110011010010110000101101011Andrewwww.potozniak.org"Changing the world one character at a time."010100000110111101110100011011110111101001101110011010010110000101101011
CaptainJester
CaptainJester
Quote:
Original post by Tyraziel
Why not use JOGL?


Or LWJGL?

Either way OpenGL makes it easy to do 2D games, with 3D acceleration.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][

Topic Locked

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

Sign in to reply to this topic.