Page List

Saturday, October 27, 2012

I'm back at last

Well, after about a year and a half I've finally gotten back to work. Here are the results.

First, I've finally decided on a name for this game. Given that the game is about moving your ship using the recoil from it's gun I've gone with the name 'Newton's Third' after the law of physics that states for every reaction there is an equal and opposite reaction.

Secondly, after getting the player's ship working properly the next logically step is to add the objects that the player will be both dodging and trying to destroy. I have gone ahead and added the necessary classes to add a asteroid object to the game. Asteroids will be generated based on minimum number of on screen asteroid criteria. If a  asteroid leaves the screen or is destroyed by the player a new asteroid will be generated to keep to the minimum number. During asteroid generation the asteroid will be deployed from a random side of the screen and will be given a random heading, heading speed and rotation speed.

At this point only the asteroids only deploy from one area of the screen and only one asteroid is on the screen at one time.


Having only one asteroid launch from a single location is a design choice for this portion of the project to make the next step easier. Now that a second object exists I will have to write code to allow the ship and the asteroid to interact. As you can see from the video the ship (and by extension the ships lasers) and asteroid will merely pass through each other. The next step will be to add code that will detect if the ship (or it's lasers) and the asteroid collides. Once that is in place I can begin programming rules and reactions that will make this project start to look like a real game.

No comments:

Post a Comment