Acknowledgments. Introduction. Part I: XNA Framework Basics. Chapter 1: Introducing XNA. Introduction to the XNA Framework. XNA Game Studio Express. Application Model. Content Pipeline. Get the Free XNA Game Studio Express. Requirements. Installing. What About Visual Studio 2005 Professional? Configuring Your Xbox 360. Getting Started. Your First Project. F5 and Go. Changing the Code. Notes about XNA. Important Links. Is C# Good for Game Development? Getting Used to the Content Pipeline. Differences with MDX. Additional Tools and Tips. Changes in XNA 2.0. Troubleshooting. Summary. Chapter 2: Creating Your First Game: Pong. Game Ideas. Write Down Your Ideas! Agile Methodology. Solving Initial Difficulties. Creating Some Textures. Let’s Write Pong. Sprites. Unit Testing in Games. Adding the Ball and Paddles. Handling Player Input. Collision Testing. Adding Sound. How This Looks on the Xbox 360. Challenge: Improve the Pong Game. Troubleshooting. Summary. Chapter 3: Helper Classes. Managing the Content Pipeline. Supported File Formats. Advantages and Disadvantages. Handling Content Directories. Importing and Accessing Content. Logging Error Messages. Unit Testing in XNA. NUnit and TestDriven.Net. Starting Unit Tests. Golden Rules. RandomHelper Class. Generate Random Vectors. StringHelper Class. Extracting Filenames. Writing Lists. Other Helpers. SpriteHelper Class. EnumHelper Class. ColorHelper Class. The Breakout Game. Unit Testing in Breakout. Breakout Levels. The Game Loop. Drawing Breakout. Collision Testing Challenge: Improve the Breakout Game. Summary. Chapter 4: Game Components. The Game Class. Game Component. More Helper Classe. TextureFont Class. Input Class. Sound Class. Tetris, Tetris, Tetris! Rendering the Background. Handling the Grid. Block Types. Gravity. Handling Input. Testing. Challenge: Create the NextBlock Game Component. Summary. Part II: Basic Graphics Engine. Chapter 5: Writing Your Own XNA Graphics Engine. What Should Your Engine Be Able to Do? The Engine Unit Test. 3D Models. Rendering of Textures. Line Rendering. 3D Programming. Model Unit Test. Testing Other Models. Plugging in More Game Components. Simple Camera Class. ScreenshotCapturer Class. Making Sure Games Run on the Xbox 360. Downloading the XNA Game Launcher. Xbox 360 Setup and Deploying Games. Console Debugging and Tools. Challenge: Write a Game Component. Summary. Chapter 6: Shader Management. Shader Overview. History. Shaders Everywhere in XNA. Example Games. Step–by–Step Shader Tutorial. FX Composer. FX File Layout. Parameters. Vertex Input Format. Vertex Shader. Pixel Shader. Importing the Shader into Your Engine. Compiling Shaders. Using Parameters. Vertex Formats. Rendering with Shaders. Testing the Shader. Challenge. Summary. Chapter 7: Realism Through Normal Mapping. Adding Detail to Objects. Problems. Asteroids! Wrong Game or What? So How Do Shaders Work? Vertex Shaders and Matrices. Pixel Shader and Optimizations. ShaderEffect Class. TangentVertex Format. Normal Mapping Unit Test. Adding Tangent Data with a Custom Processor. Final Asteroid Unit Test. More Shaders. Offset Mapping. Glass Shader. Reflection and Water. Challenge: Add Parallax Mapping. Summary. Chapter 8: Post–Screen Shaders and the Rocket Commander Game. Handling Post–Screen Shaders. Pre–Screen Sky Cube Mapping. Writing a Simple Post–Screen Shader. Improvements. Implementing Post–Screen Shaders. RenderToTexture Class. PostScreenDarkenBorder Class. Unit Test Result. More Post–Screen Shaders. Motion Blur. Color Correction. Menu Effects. Rocket Commander Game. Performance in XNA. Moving from MDX to XNA. Using Threads to Improve Performance. Result and Screenshots. Challenge: Write an Edge Detection Shader. Summary. Part III: Improving Your Game Engine. Chapter 9: Adding Sound with XACT. No DirectSound. Handling .wav Files. Using XACT. Creating Projects. Creating Your Wave Bank. Compressing Music Data. Sound Banks. Cue Variables. Other Effects. Changes in XNA 2.0. Sound Class. Rocket Motor Sound. Whoosh, What Was That? Menu Sounds. Challenge: Create Your XACT Project. Summary. Chapter 10: Player Input and the User Interface. Input Class. The Update Method in the Input Class. Mouse Rectangles. Entering Text in XNA. Game Screens. Help Screen. In–Game User Interface. Tips. Cameras. Space Camera. Challenge: Write a Free Camera Class. Summary. Chapter 11: Creating XNA Shooter. Putting It All Together. Sounds. User Interface. Textures. 3D Models. Animated Textures. Billboards. Landscape Rendering. Base Texture and Normal Map. Height Map. Adding Objects. XNA Shooter Game. Game Logic. 3D Effects. Unit Class. Projectile Class. Item Class. Final Screenshot. Challenge: Write a Game with Your Engine. Summary. Part IV: Writing a Racing Game. Chapter 12: Generating Landscapes and Tracks. Game Comparisons. Gran Tourismo. Need for Speed. Trackmania. XNA Racing Game. Landscape Rendering. Textures. Rendering. Optimizing Tips. Tracks. Unit Testing to the Rescue. Interpolating Splines. More Complex Tracks. Importing the Track Data. Generating Vertices from the Track Data. Final Result. Challenge: Create a New Unit Test Track. Summary. Chapter 13: Physics. Newton’s Laws of Motion. Keep It Simple. Gravitation. Physics Engines. Ageia PhysX. Havok. ODE. Other. Implementing Physics. Handling Loopings. Spring Physics. Collision Detection. PhysicsAsteroidManager. Car Collision. Challenge: Figure Out the Road Collision. Summary. Chapter 14: Fine–Tuning and “Modding” the Racing Game. Game Concept. Game Idea. Additional Features. Game Screens. Splash Screen. Main Menu. Game Screen. Highscores. Final Unit Testing and Tweaking. Tweaking the Track. Shadow Mapping. Final Testing on Windows. Final Testing on the Xbox 360. Additional Ideas. More Cars. Online Highscore List. More Shaders and Effects. More Game Modes. Multiplayer Mode. Challenge: Write Your Own Mod! Example Game: Speedy Racer. Summary. Part V: Writing Multiplayer Games. Chapter 15: Multiplayer and Xbox Live. What’s New in XNA 2.0. Overview About Networking in XNA 2.0. TCP Versus UDP. Firewalls and Punching Through NATs. Network Architecture. Sending UDP Data. Connecting Two Players. Network Messages. Server Game List. Writing a Chat Application. Game Screens. Handling Chat Messages. The Final Chat Application. Challenge: Write a Multiplayer Application. Summary. Chapter 16: Role–Playing Games. Types of Role–Playing Games. “Hack and Slash” Role–Playing Games. Massively Multiplayer Role–Playing Games. Designing Dungeon Quest. Ideas. Scenario. Story. Characters. Enemies. Weapons and Items. Abilities and Spells. Abilities. Spells. Leveling System. Challenge: Improve the Leveling System. Summary. Chapter 17: Dungeon Quest. Creating the Engine. Changes to the Graphic Engine. Using Collada Model Files. Handling Many Point Lights. Adding AI. Path–Finding. Alert–System via Cries. Multiplayer Support. Network Messages. Xbox LIVE Support. The Dungeon Quest Editor. Summary. Appendix A: Resources. Index.