Summary


You learned a lot about input devices and how to handle them in XNA. The Xbox 360 controller code is the easiest, but most PC users will not have an Xbox 360 controller and many games are not optimal for this kind of controller. For example, strategy or 3D shooter games work much better with a mouse and keyboard setup instead of using a gamepad. The sad thing about XNA is that the mouse device is not supported on the Xbox 360, so all mouse code you implement on the PC version of your game will not work on the Xbox 360. Keyboard devices are supported on both platforms, but Xbox 360 users will usually just have the Xbox 360 controller. This means you have to implement all three input devices for all your games if you want them to run on both platforms correctly. Thanks to your new Input class this is not a difficult job.

Then you learned about the game screen classes, and with help of the game screen stack it is easy to execute all game screen classes derived from the IGameScreen interface. For example, the Rocket Commander game uses the following game screen classes (most other games in this book behave similarly):

  • Main Menu

  • Mission Selection

  • Mission (the game itself)

  • Highscores

  • Credits

  • Help

  • Options

Finally, many camera classes were discussed and it was your job to implement another one. You really have a powerful graphics engine now. Writing a complete game with it is still not a piece of cake, but you can get the job done much faster now and it will be more fun writing a game like XNA Shooter, as you can see in the next chapter.




Professional XNA Game Programming
Professional XNA Programming: Building Games for Xbox 360 and Windows with XNA Game Studio 2.0
ISBN: 0470261285
EAN: 2147483647
Year: 2007
Pages: 138

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net