This section contains the content that interests me as a hobbyist game developer. I hope you’ll find it interesting as well. Within this part of the book, you will find code and commentary, tricks and tips, and techniques and tools to help make your game projects a success.
Chapter 25, Threading
In chapter 25, we take a look at threading in XNA by creating a multi-threaded version of the particle system from chapter 22. This is by no means a fully-optimized implementation, it’s just here to demonstrate some of the benefits and pitfalls of writing multi-threaded code. The example code in this chapter works on Windows and the Xbox 360 game console, and an overview of the Xbox 360 CPU architecture is provided.
Click here to: See the video.
Chapter 26, Content Pipeline Extensions
In chapter 26, we develop a custom content pipeline extension to process our bitmap game fonts. Rather than creating an image which we import into our game, this pipeline extension accepts a text file that the game font utility (from chapter 20) generates which describes the font and its attributes. The image which contains the text characters is generated during the build process, and the new resource is exposed as a GameFont object, rather than as a Texture2D object.
Click here to: See the video.
Chapter 27, Embedded Resources and Localization
In chapter 27, we create a game whose media is embedded within the game executable, rather than as independent files on the file system. As an added bonus, this chapter shows you how to embed text within your resource files which can be localized for specific markets. Using similar code, your game can dynamically select translated text and media; and it can alter its game play based on culture-specific settings which are selected based on the region encoding of the host platform on which it runs.
Click here to: See the video.
Chapter 28, Pixel-Perfect Collision Detection in 2D
In chapter 28, we develop a reusable component which can quickly and easily detect collisions between any two sprites with pixel-perfect accuracy. This component takes into account the opacity of every pixel within the sprites, and includes some simple optimizations to make the collision detection process a little smarter.
Click here to: See the video.
Chapter 29, Optimization
In chapter 29, we cover some common-sense tips and best practices for optimizing your XNA games. You’ll learn how to take advantage of (and avoid counteracting) the optimizations that are built into the XNA Framework and the Common Language Runtime which we get “for free”, and you’ll read about some of the tools that you can use to identify problem code.
Chapter 30, Team Development
In chapter 30, we discuss some of the tools and processes for working with small and mid-sized teams. Many of the tips and best practices in this chapter are also useful when you’re working solo.
Chapter 31, XNA GSE 1.0 Refresh
In chapter 31, we explore some of the most notable new features of the latest update to XNA Game Studio Express — the 1.0 Refresh. While it’s not as “code heavy” as previous chapters, a good depth-of-coverage is provided for the topics discussed.