XNA 4.0 GDBE – Chapter 4/5 Review

Continuing on with the quality from previous chapters that I have now come to expect , Kurt dives right in to getting his impressive graphics straight to the screen. He starts in straight away with many of the utility classes needed to put together a standard top down space shooter and gets the basics of the game up and running in no time.

Some small code things I would have done differently:

  1. Many of the properties in the classes could have been automatic { get; set; } which can make the code look much cleaner (personal opinion)
  2. The padding parts of the asteroid collision detection system is unneeded. I actually removed it altogether in the final code and the game worked just as well
  3. The StarField, AsteroidManager, ShotManager, and many other Manager classes are very similar. I would consider seeing if they can be combined into a more generic class or set of classes.
  4. GraphicsDevice.ScissorRectangle could be used in many places instead of a hand built rectangle with the client bounds’ width and height
  5. Collision detection for asteroids is discussed and implemented in Chapter 4. All other collisions are in Chapter 5. These should be done together with a single CollisionManager

Some things I especially enjoyed in these chapters was the inclusion of sound and special effects. Both the particle explosions and the shooting and fire sounds are highly reminiscent of a simpler time in video games when kids still lived and died by their quarters. The final game is once again incredibly impressive for a beginner’s XNA book and I would have been ecstatic back in 2002 when I first started playing with Managed DirectX if I could have shown my friends the kinds of games that have come out of this book so far.

Book Link: http://link.packtpub.com/ZWicAE

Leave a Reply

You must be logged in to post a comment.

Do NOT follow this link or you will be banned from the site!