Now you can build your own games for Windows, Xbox 360, and Zune—as you learn the underlying skills and concepts for computer programming. Use this hands-on guide to dive straight into your first project—adding new tools and tricks to your arsenal as you go. No experience required!
Teach yourself how to program—and bring your game ideas to life!
Learn XNA and C# fundamentals—and extend the challenge with each chapter
Write code to create and control game behavior
Build your game’s display—colors, graphics, text, lighting, 3-D effects
Capture and cue sounds
Process input from gamepads and keyboards
Add excitement to gameplay with timers, scoring, and survival
Create multiplayer features
Tweak existing games—and invent totally new ones
Getting Started
Chapter 1 Computers, C#, XNA, and You
Introduction
How the Book Works
C# and XNA
Getting Started
Writing Your First Program
Conclusion
Chapter Review Questions
Chapter 2 Programs, Data, and Pretty Colors
Introduction
Making a Game Program
Working with Colors
Controlling Color
Conclusion
Chapter Review Questions
Chapter 3 Getting Player Input
Introduction
Reading a Gamepad
Using the Keyboard
Adding Vibration
Program Bugs
Conclusion
Chapter Review Questions
Images, Sound, and Text
Chapter 4 Displaying Images
Introduction
Resources and Content
Using Resources in a Game
Conclusion
Chapter Review Questions
Chapter 5 Writing Text
Introduction
Text and Computers
Getting the Date and Time
Making a Prettier Clock with 3-D Text
Creating Fake 3-D
Conclusion
Chapter Review Questions
Chapter 6 Creating a Multi-Player Game
Introduction
Conclusion
Chapter Review Questions
Chapter 7 Playing Sounds
Adding Sound
Conclusion
Chapter Review Questions
Chapter 8 Creating a Timer
Making Another Game
Finding Winners Using Arrays
Conclusion
Chapter Review Questions
Chapter 9 Reading Text Input
Using the Keyboard in XNA
Working with Arrays, Objects, and References
Displaying Keys
Conclusion
Chapter Review Questions
Writing Proper Games
Chapter 10 Using C# Methods to Solve Problems
Introduction
Playing with Images
Creating a Zoom-Out
Conclusion
Chapter Review Questions
Chapter 11 A Game as a C# Program
Introduction
Creating Game Graphics
Projects, Resources, and Classes
Creating Game Objects
Conclusion
Chapter Review Questions
Chapter 12 Games, Objects, and State
Introduction
Adding Bread to Your Game
Adding Tomato Targets
Conclusion
Chapter Review Questions
Chapter 13 Making a Complete Game
Introduction
Making a Finished Game
Improving Code Design
Adding a Background
Adding a Title Screen
Conclusion
Chapter Review Questions
Chapter 14 Classes, Objects, and Games
Introduction
Design with Objects
Classes and Structures
References
Value and Reference Types
Creating a Sprite Class Hierarchy
Adding a Deadly Pepper
Conclusion
Chapter Review Questions
Chapter 15 Creating Game Components
Introduction
Objects and Abstraction
Constructing Class Instances
Adding 100 Killer Tangerines
Adding Artificial Intelligence
Adding Game Sounds
From Objects to Components
Conclusion
Chapter Review Questions
Chapter 16 Creating Multi-Player Networked Games
Introduction
Networks and Computers
Xbox Live
Bread and Cheese Pong
Conclusion
Making Games for Fun
verysillygames.com
Chapter Review Questions
Appendix Answers to the Chapter Review Questions
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Glossary
Appendix About the Author
Rob Miles
Title:
Microsoft® XNA® Game Studio 3.0: Learn Programming Now!, 2nd Edition
Rob Miles has been teaching computer programming for more than 25 years. An expert on Visual C# and a Microsoft MVP for Device Application Development, Rob enjoys inspiring new and experienced programmers. As well as writing his own games, programs, and poetry, Rob has consulted on a wide range of commercial software projects.