4.7 summary of this chapter
now, your small-scale game engine has three new namespaces and has many helper classes that can be used in future projects, texturefont classes are particularly useful for the following chapters. It can be used not only to display game data like a scoreboard, but also for unit testing. In unit testing, it displays helpful text that tells gamers all available hotkeys, especially when you encounter problems, it also displays testing and debugging information. For example, a camera the unit test of the class can be output camera location data and rotation data, so that you can know what happened during the test.
I hope you can enjoy the four chapters, I also like the sample games you have developed. arcade games are fun, however, you can write 2D games cannot reflect technological advances, and you don't care too much about writing a clone version Pong game. However, for the purpose of learning, to introduce all the auxiliary classes and learn more about agile methodologies and unit tests, using these practical projects is much more useful than simply talking about some theories and boring auxiliary classes.
The next part of this book will show you 3D World, and teach you how to write your own 3D Image Engine. You don't have to be a mathematical professor to understand how to output models on the screen. XNa And its content pipeline, you do not need to know the underlying mathematics and 3D Something about geometry can be rendered on the screen. 3D Data. If you 3D If you are interested in graphic programming, You should know some vector and matrix knowledge and how to operate them correctly. To learn more 3D All the knowledge in the game programming world requires you not only to be smart, but also to learn new knowledge in this field through constant reading.
If you are a game developer, you may not care much about the underlying image engine.CodeAnd focus on the game itself. However, most people want to make really cool games, which usually means they have to create their own game engine, because there is no perfect3DThe engine is available, and each feature in the game may require a different method for rendering3DData. After your game engine is sufficient to handle more complex games, the last part of this book will discuss more about game programming.
Finally, let's take a look at the previous chapters you have learned:
-
- It is important to write down your ideas. It is best to limit the length of one page.
- Use top-down mode and unit test to solve the problem
-
- You have also learned how to process user input, play sound, and drawSprites. All of theseXNaBut to avoid repeating the same code over and over again, you can implement them as helper classes.
-
- Introduces many helper classes to help you render the material font, process strings, traverse enumeration, operate colors, write logs, etc.
- it is necessary to write Collision Detection in any game. In the first two games, you used boundingbox structure detection 2D collision, in this chapter, you use moveblock method Tetris all collisions in the grid
- unit testing is very important, especially with static unit testing, in addition, this chapter makes creating a game more interesting and efficient than not using unit tests.