Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Back to Basics

Sign in to follow this  


Let me reiterate something from my last post. Designing an engine is hard. Probably more so if you don't really have a grasp on what it needs to do, only speculation on what it would be cool if it did.

Feeling a little lost and like not much progress was being made, I decided to shelve the 3D project for awhile and work on actually making a game. I've decided on a simple space invaders clone, which I call InJders, pronounced in-jay-ders. (It seems par for the course to randomly insert the letter 'J' into the name of anything written in java, so I figured why not.) To avoid being hung up on overly complicated rendering design, I decided to just use Java and Java2D for graphics. Combining that with more of a 'git r done' attitude instead of cautiously designing some overly complicated system, after only a few nights of coding, I have what could almost be construed as a game already.

Yes those are just stock icons from some free set I found. I'm really trying not to get caught up on making it look like much this early, not until it gets a little more substantial anyway. I have basic collision detection set up, keyboard controls to move the 'ship' back and forth and shoot. The bugs you shoot however don't have much in the way of intelligence right now, they just stay in one place, get shot, and disappear.

The next thing I'm looking into is how to animate sprites. I managed to stumble onto a 2D explosion generator someone was kind enough to write and give out for free. It does some fancy stuff to procedurally generate 16 64x64 pixel images of the progression of an explosion, which it then writes out to a 256x256 pixel file with all 16 'frames' in a 4x4 grid. I was able to toss together some code to resize the images and convert them to png form. From there my AnimatedSprite class loads them up, and splits them into 16 BufferedImages. Tonight I finished up the animated sprite debugger tool I was working on to loop over the images, and it actually renders a pretty spiffy looking explosion.

I had the tool generate about 30 explosion sequences, and plan on having the game select one of them at random each time a bug is destroyed, that way it doesn't just look like playing the same animation over and over again.

The next step will to create an ExplosionEntity class that uses an AnimatedSprite, so whenever a bug is collided with a bullet, it is replaced with an ExplosionEntity which plays its sprite's explosion sequence, then destroys (or at a minimum, hides) itself.

Hopefully this being a smallerish project and having a much higher velocity while using java as opposed to C++ I will be more inclined to journal my progress here on a more regular basis (since there may actually be progress to journal). Ultimately I hope to be able to use experiences with this project to start up a more realistic 3D project at some point. I'm already thinking about writing a 3D version of this project once the 2D one is finished, however I'm thinking the line between 2D and 3D probably should also be the same as the one between java and all its productiveness (for me anyway), and C++.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!