| About the Authors | p. xiii |
| About the Technical Reviewer | p. xv |
| Acknowledgments | p. xvii |
| Introduction | p. xix |
| A .NET Snapshot | p. 1 |
| The .NET Platform | p. 1 |
| Variables | p. 4 |
| Object-Oriented Programming | p. 6 |
| Controlling Flow with Boolean Logic (If Statements) | p. 9 |
| Using the Box Object | p. 10 |
| Debugging | p. 12 |
| Controlling Flow with Arrays and Looping | p. 13 |
| Using Generics and Events | p. 15 |
| Conclusion | p. 17 |
| A Crash Course in XNA | p. 19 |
| Installing XNA Game Studio 2.0 | p. 19 |
| Building XNAPong | p. 20 |
| Creating a New Game Project | p. 20 |
| Loading Textures | p. 23 |
| Loading and Rendering | p. 24 |
| Adding the Game Logic | p. 27 |
| Adding a Background Image | p. 33 |
| Adding Rumble | p. 35 |
| Last But Not Least: Audio with XACT | p. 36 |
| Conclusion | p. 39 |
| Planning Your Game | p. 41 |
| The Dishwasher: Dead Samurai Case Study | p. 42 |
| A Realistically Limited Vision-Bane of the Teenage Game Tycoon | p. 43 |
| Planning the Zombie-Smashing Game | p. 45 |
| 3D or 2D? | p. 45 |
| Initial Design | p. 46 |
| Tool Planning | p. 47 |
| Naming the Game | p. 49 |
| A Game Plan | p. 49 |
| Conclusion | p. 50 |
| The Map Editor | p. 51 |
| Creating a New Project: Zombie Smashers | p. 51 |
| Drawing Text | p. 53 |
| Creating the Map Editor | p. 57 |
| Map Segments | p. 58 |
| Simple Interaction | p. 65 |
| Drawing the Map | p. 67 |
| Interactive Text | p. 72 |
| Scrolling the Map | p. 74 |
| A Collision Map | p. 76 |
| Text Editing | p. 85 |
| Saving and Loading | p. 88 |
| Conclusion | p. 92 |
| The Character Editor | p. 93 |
| Creating a New Project: Character Editor | p. 93 |
| Creating a Windows Game Library | p. 94 |
| Drawing Text | p. 96 |
| Creating the Character Editor | p. 96 |
| The Character Definition | p. 97 |
| Drawing the Character | p. 101 |
| Some Editor Setup | p. 105 |
| The Icon Palette | p. 106 |
| The Parts List | p. 108 |
| Moving, Rotating, and Scaling Parts | p. 111 |
| The Frames List | p. 113 |
| The Animations List | p. 117 |
| The Keyframes List | p. 118 |
| An Onionskin Effect | p. 119 |
| Playback Preview | p. 120 |
| Loading and Saving | p. 122 |
| Conclusion | p. 126 |
| Bringing It to the Game | p. 127 |
| Building the Game | p. 127 |
| Creating a New Project: ZombieSmashers | p. 128 |
| A Random Numbers Class | p. 129 |
| Modifying the Map Functionality | p. 130 |
| Creating the Character Class | p. 133 |
| Updating the Character | p. 136 |
| Drawing the Character | p. 144 |
| Texture Loading | p. 145 |
| Gamepad Input | p. 146 |
| Character Definition | p. 147 |
| Setting Things in Motion | p. 147 |
| Adding a Background Image | p. 150 |
| Super Simple Scripting | p. 153 |
| The Scripting Language | p. 154 |
| Adding Script Editing to the Character Editor | p. 154 |
| Some Script Commands | p. 156 |
| Script Parsing | p. 157 |
| Putting Scripting into Practice | p. 167 |
| Odds and Ends: Cleanup | p. 168 |
| Conclusion | p. 169 |
| Particle Mayhem | p. 171 |
| A Brief History of Rocket Contrails in First-Person Shooters | p. 171 |
| Setting Up a Particle System | p. 172 |
| A Base Class | p. 172 |
| A Smoke Class | p. 174 |
| Particle Management | p. 176 |
| Additive Blending: Fire | p. 180 |
| Putting Fire on the Map | p. 185 |
| Adding Triggers | p. 187 |
| Triggers in the Character Editor | p. 187 |
| Bringing Triggers into the Game | p. 191 |
| Simple Particle Collision | p. 197 |
| Adding Zombies | p. 199 |
| Zombies in the Character Editor | p. 199 |
| Bringing Zombies into the Game | p. 202 |
| Smashing Zombies | p. 204 |
| Shooting Zombies | p. 204 |
| More Zombie Smashing | p. 209 |
| Character-to-Character Collision | p. 216 |
| Conclusion | p. 219 |
| XACT Audio, Rumble, and More | p. 221 |
| Obtaining and Editing Audio | p. 221 |
| Getting Sound Files | p. 222 |
| Simple Audio Editing with Audacity | p. 223 |
| Adding Audio to the Game | p. 229 |
| Setting Up the Game Audio in XACT | p. 229 |
| Auditioning Audio | p. 231 |
| Bringing Sound into the Game | p. 233 |
| Scripting Audio | p. 235 |
| Adding Music | p. 236 |
| Rumble, Quake, and Blast! | p. 240 |
| Setting Up Quaking, Rumbling, and Blasting | p. 240 |
| Changing the Render Loop | p. 244 |
| Conclusion | p. 247 |
| Scripting, AI, and Depth (and Death) | p. 249 |
| Making Enemies Killable | p. 249 |
| Adding Animations | p. 250 |
| Defining New Script Commands | p. 252 |
| Spraying Blood | p. 253 |
| Initializing and Killing the Character | p. 256 |
| Implementing the Character Script | p. 257 |
| Adding AI | p. 259 |
| Dealing Damage | p. 265 |
| Map Scripting | p. 268 |
| Adding a Script Editor in the Map Editor | p. 269 |
| Implementing Map Script Commands | p. 271 |
| Updating the MapEditor Code | p. 273 |
| Implementing Map Scripting in the Game | p. 277 |
| Implementing Monster Buckets | p. 284 |
| Bringing It All Together | p. 285 |
| Conclusion | p. 289 |
| Menus, a HUD, and Deployment | p. 291 |
| Adding a HUD | p. 291 |
| Creating the HUD Class | p. 292 |
| Drawing the Score | p. 296 |
| Creating Map Transitions | p. 298 |
| Designating Segment Transitions | p. 298 |
| Checking for Transitions | p. 301 |
| Adding a Map | p. 303 |
| Adding Menus | p. 305 |
| Designing the Menu | p. 305 |
| Creating the Menu Class | p. 308 |
| Updating the Game | p. 320 |
| Adding the HUD and Menu to the Game | p. 320 |
| Reorganizing the Code | p. 322 |
| Scoring | p. 326 |
| Deploying to Xbox 360 | p. 328 |
| Creating the Xbox 360 Project | p. 328 |
| Connecting to the XBox 360 | p. 329 |
| Debugging | p. 331 |
| Conclusion | p. 332 |
| Postprocessing Effects | p. 333 |
| The Absolute Minimum You Need to Know About Pixel Shaders | p. 333 |
| Color Filter Effects | p. 334 |
| A Blurry Grayscale Pause Effect | p. 337 |
| A Little Bloom Never Hurt Anyone | p. 339 |
| Earth Tones | p. 343 |
| A Water Effect | p. 346 |
| Refraction Effects | p. 353 |
| Conclusion | p. 360 |
| Networking | p. 361 |
| Networking with XNA Game Studio | p. 361 |
| Adding the Gamer Service Component | p. 362 |
| Adding Multiplayer Options to the Menu | p. 363 |
| Options and Levels | p. 365 |
| Navigation | p. 367 |
| Arena Play | p. 369 |
| Creating, Finding, and Joining Sessions | p. 371 |
| Network Control | p. 371 |
| Network Connections | p. 372 |
| Sending and Receiving Game Messages | p. 376 |
| Network Game Interaction | p. 378 |
| Data Packing | p. 383 |
| Character Net Data | p. 385 |
| Particle Net Data | p. 386 |
| Adding the Second Player to the HUD | p. 392 |
| Giving the Second Player a Skin | p. 393 |
| Plugging Everything into the Game | p. 394 |
| Conclusion | p. 396 |
| A Parting Word | p. 397 |
| Designing the Wraith | p. 399 |
| Wraith Graphics | p. 400 |
| Wraith Animation | p. 400 |
| Wraith AI | p. 402 |
| Particles: Rockets and Shockwaves | p. 403 |
| Hit Logic | p. 408 |
| Storage | p. 413 |
| Managing Devices and Containers | p. 413 |
| Reading and Writing | p. 416 |
| Bringing It All Together | p. 417 |
| Index | p. 421 |
| Table of Contents provided by Ingram. All Rights Reserved. |