Summary


Your little game engine now has three new namespaces and you have many helper classes you can use for future projects. The new TextureFont class especially can be very useful for the next chapters. It is not only useful to display game data like the scoreboard, but it will also be used for unit tests; it is very useful to display help texts in unit tests to tell the user about all the available hotkeys and it is especially useful for displaying test data or debugging data in case you run into problems. For example, a camera class unit test can output the camera position and rotation values to see what is going on while the test is running.

I hope these last four chapters were fun to read and you enjoyed the sample games you developed here. Arcade games can be fun, but just writing simple 2D games is not state of the art and you will certainly not get much attention if you program another Pong clone. For learning purposes, to introduce all the helper classes and for learning more about the Agile Methodology and unit testing, it was very useful to have these real projects instead of just talking about some theoretical uses and some boring helper classes.

However, in the next part of this book you will dive into the world of 3D graphics and learn how to write your own 3D graphic engine in XNA. You don’t really have to be a math professor to understand how to render a model on the screen. Thanks to XNA and the content pipeline it is possible to render 3D data on the screen without knowing much about the underlying math and 3D geometry involved. If you are serious about 3D graphic programming you should certainly know about vectors, matrices, and how to manipulate them in the right order. There are many tricks and knowing about all issues in the 3D game programming world not only requires a clever person, but you will also have to read constantly about new developments in this sector.

If you are a game programmer you might not care so much about the underlying graphic engine code and want to focus on the game itself. While most people just want to create cool games, it usually means that they also have to create the graphic engine because there is no perfect 3D engine available and every effect in the game might require another way to render the 3D data. The last part of this book talks more about game programming after your game engine is complete enough to handle more complex games.

Here’s a final look at what you have learned in the previous chapters:

  • It is important to write down your ideas and to develop a small concept, preferably limited to one page.

  • To solve problems you use a top-down approach and you use unit testing.

  • You learned about handling user input, playing sounds, and drawing sprites. All this can be done quite easily in XNA, but to avoid repeating the same code over and over again you put it in helper classes.

  • A lot of helper classes were introduced to help you with rendering texture fonts, handling strings, going through enums, manipulating colors, writing log files, and much more.

  • In every game you wrote some kind of collision testing was required. In the first two games you used the BoundingBox structure to check for collisions in 2D, and in this chapter you handled all the collisions in the Tetris grid yourself in the MoveBlock method.

  • Unit testing rules, I can’t repeat that often enough. Especially the static unit tests helped you out a lot and made creating the games in this chapter a lot more fun and productive than without using unit testing.




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