Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Congratulations, you have now completed your first full-blown Pocket PC game! Alien Invasion might be a simple game by today’s standards, but it is a good foundation for developing additional games that use the game library. Remember, the goal of the game library is to provide the basic functionality needed to build game engines. Alien Invasion can serve as a prototype arcade game, and the techniques used to develop this game can be directly applied to other, similar games. If arcade games like Alien Invasion appeal to you, then I suggest you subclass the game library and incorporate some of the code from Alien Invasion into a new CArcadeGameLibrary class. You would want to override any of the stock CGameLibrary functions and have them return more information that is needed by an arcade game. You might even incorporate a sprite array in the new game library class so that sprite handling with CAnimSprite is built in! Then, rather than handling all the sprites yourself in GameEvent or Animate, let the new game library do it for you!
This chapter concludes Part II of the book, “Building a Custom Pocket PC Game Library.” At this point, you have a full-featured game library and a sample game that you can use to build additional games. I could simply end the book here! But as you can see, there is a lot more to building a blockbuster game than simply moving sprites around on the screen and blowing them up with blasters and missiles! An entire section of the book still remains: Part III, “Advanced Game Programming Techniques.” The next four chapters cover subjects such as artificial intelligence, game physics, and socket communications, with several sample games to demonstrate the topics.