Hi folks: I’ve been lurking here for a while, watching, learning.
Before I start working on my cool game idea I decided to take some often given, but rarely taken advice. I built a simple game to learn a bunch of the basics. I bought “Killer Game Programming in Java” and then read some post here on how to improve the code examples in that book (such as fixing his double buffering code to use BufferStrategy instead of creating a 2nd buffered image for every frame.).
So I built PlanetBall. The inspiration for PlanetBall was “What if you were playing Pong, but instead of the paddle, you were the ball?”
PlanetBall is a 2 player game where both users use the same keyboard to move their planets around in space. One player uses ASDW to move and B to brake. The other player uses the arrow keys and Number Pad 0 to brake.
If you capture a planetoid of your own color you gain 10 points.
Capture the wrong color you lose 5 points.
Bump the other player and you both lose 2 points.
Capturing your own color asteroid gives you 25 points
Capturing the wrong color loses 15 points
If you get sucked into a black hole the nicest thing which will happen to you is you lose 20 points.
I have 4 levels of increasing difficulty. I was able to use OpenAL to get the sounds working and overall, I think it’s a playable game.
Right now I have a bug which happens when you choose to go back to the main menu and then you play levels which have already been played. For some reason a hashmap I created is going to null. Once that’s fixed I’ll give you a download link if you’d like to try it.