Chapter 1. Alien Attack
AUTHOR: Brian Peek
DIFFICULTY: Medium
TIME REQUIRED: 5 hours
COST: Windows—free; Xbox 360—cost of hardware, plus $99/year for XNA Creators Club membership (note that there are ways to get this for free, such as DreamSpark for student developers); Zune—cost of Zune device
SOFTWARE: Visual C# 2008 Express or any full edition of Visual Studio 2008 and XNA Game Studio 3.0
HARDWARE: Xbox 360 version requires an Xbox 360 with a hard drive; Zune version requires a Zune device
DOWNLOAD: http://www.c4fbook.com/AlienAttack
With the release of XNA Game Studio, Microsoft has brought homebrew game development to a new level. XNA provides an easy-to-use framework for developing games, and allows those games to be distributed and run not only on a PC, but also on the Xbox 360 and Zune. Additionally, because of a common framework and common development language, XNA provides for an almost perfect"write once and run everywhere" scenario. The code used for the Windows version will, in almost every case, compile and run on the Xbox 360 and Zune with few to no changes.
Overview
In this chapter, we walk through creating a very simple two-dimensional game using the XNA Framework that will run on a PC, Xbox 360, and Zune. We will discuss the concepts of 2-D graphics, sound, user input, and simple artificial intelligence (AI) while writing a clone of the arcade classic Space Invaders called Alien Attack, as shown in Figure 1-1.
Figure 1-1. Alien Attack
As you build this game, keep in mind ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access