Part Three, Libraries …

Game development extends beyond the bits that you see on the screen. No matter how great your content creations tools are, there will be times when you need to write custom tools to manage your game data. And there are many blocks of code that you’ll write as you develop games that you will find yourself referencing again and again.

Writing tools, reusable libraries, and drop-in components is one of my favorite aspects of game programming. Eliminating redundancy, automating tasks, and providing intuitive interfaces for games and tools are usually smaller-scale projects where you can be very creative, produce a product in a relatively short time period, and enjoy the fruits of your labor quicker than would normally be possible in an actual game project.

Chapter 19, Keyboard-Aware Gamepad

In chapter 19, we develop a reusable component that emulates the Xbox 360 controller using the keyboard. This configurable component is a drop-in replacement for the standard controller APIs. It merges input from any controllers that are actually plugged in so that the player can transition from keyboard to controller and back seamlessly. The game never knows where player input is coming from, it just handles it as if the player is using a controller.

Click here to: See the video.

Chapter 20, Game Font Maker Utility

In chapter 20, we develop a Windows-based tool to create bitmap fonts for our games. The XNA Game Studio 1.0 Refresh includes font support, but it’s still handy to understand how things work “under the covers”. The tool processes the selected font, accounting for the specified font options, generating an image which contains the characters and other information, encoded within the image. This image is then loaded in your XNA game where you use the game font library developed in the next chapter to position and draw in-game text.

Click here to: See the video.

Chapter 21, Game Font Library

In chapter 21, we develop an XNA game library that uses the bitmap fonts that were generated by the tool from the previous chapter to render text within our XNA games. This library provides methods to draw text in any color, at any location, and it provides methods to measure strings before they’re drawn so that you can perform text justification and animated effects.

Click here to: See the video.

Chapter 22, Particle System

In chapter 22, we develop a simple, reusable XNA game library to create, manage, and draw particles within our games. This particle system can be used to create a variety of in-game visual effects. The code for this chapter is far from optimized, but it provides a good overview of how particle systems work, and should be a good inspiration for you as you develop your own.

Click here to: See the video.

Chapter 23, Virtual Keyboard

In chapter 23, we develop a reusable XNA game library to display an on-screen keyboard that the player can use to enter textual data using their controller. This component also accepts keyboard input, seamlessly integrating player inputs from either device. This is useful for providing a means for players to enter user names for high scores, naming their player characters, and for labeling save game files.

Click here to: See the video.

Chapter 24, Brick Breaker Level Editor

In chapter 24, we develop a level editor for the game that we wrote in Chapter 14, “Brick Breaker”. This tool is written as a Windows application, and it demonstrates some of the most common user interface topics that should be considered when developing a tool for your team (or your players).

Click here to: See the video.

Source Code

Click the button to download the source code for these chapters.

[Click here to return to the main article.]

Leave a Reply

Your email address will not be published. Required fields are marked *

*