Friday, June 5, 2009

Continuing with Space Frenzy

Now for the step of adding asteroids. I first start by looking at the code and copying it into my newly created class Asteroid class. Once satisfied with the code, I compiled and got no errors. No particular issues in this last section of the tutorial


Part 4: Space Frenzy Layers and Physics

Finally moving on to the last part of the tutorial in which we create several asteroids and put them into layers which interact with the ship and its missile.

One note that maybe useful is it might be better to put the world size macros at the very first step of building the screen. It makes the code a little more readable earlier on and there aren’t magic numbers in there.

After adding the asteroids and their layer I ran the game. A bunch of asteroids spawned and floated around the window. No performance problems other than what I already noted before.

No comments:

Post a Comment