Introduction

Welcome to XNA 3.1 Game Development for Teens! XNA Game Studio 3.1 is an integrated development environment (IDE) extension to Microsoft Visual Studio. Microsoft created XNA Game Studio 3.1 with one purpose in mind, to facilitate the development of computer games. Using Microsoft XNA Game Studio 3.1 you can create your own computer games and run them on your computer. If you have a Zune portable media player or an Xbox 360, you can run your games there as well. If you want, you can even sell your computer games on Xbox Live!

XNA Game Studio 3.1 relies on the XNA Framework. This framework provides a basic template for all new games, which includes access to resources needed to facilitate game execution. XNA Game Studio 3.1 provides you with everything needed to create professional quality computer games of all types and even supports the development of network games. Best of all, XNA Game Studio 3.1 does not require you to have an advanced degree in computer science to use it.

This book will provide everything you need to know to get up and running with XNA Game Studio 3.1 and Microsoft Visual C# 2008 Express, the programming language you will learn how to use when developing computer games. Using step-by-step, hands-on instruction, you will learn how to create all sorts of games and small programs, complete with graphics and sound effects. You will find that XNA Game Studio 3.1 provides everything you need to create professional-quality computer games. Once created, you can even market your games on Xbox Live.

XNA Game Studio 3.1 supports both 2D and 3D game development. This book will focus on 2D development, since it is easier to get started. You’ll be given the skills and knowledge that you need should you later decide to jump into the world of 3D game development. Whether you are just getting started or are interested in finding out how to create and market the world’s next game, XNA Game Studio 3.1 and this book will suit your needs well.

Why XNA 3.1?

Together XNA Game Studio 3.1 and Microsoft Visual C# 2008 Express provide an intuitive development environment that supports the creation of computer games. They provide everything needed to create, test, run, and debug computer games on a Windows computer. XNA Game Studio 3.1 supplies access to an enormous collection of pre-written program code, which you can call upon to simplify game development. This allows you to create professional-quality computer games, which you can then distribute and even sell royalty-free to other Windows and Zune users. In addition, if you elect to sign up with Xbox Live, you can sell Xbox 360 versions of your games.

Examples of the games that you can create include:

  • Classic arcade games like Space Invaders, Asteroids, and Missile Command

  • First-person shooter games like Doom and Call of Duty, and third-person shooters like Atari’s original Tank game

  • Maze games like Pac-man and Ms. Pac-man

  • Multiple-player games like Monopoly or Warcraft

  • Strategy games like the Command and Conquer series

  • Network games that can be played on a home network or over the Internet like Star Wars Galaxies

  • Sports games like classic Atari Pole Position racing game or NBA Live 2009

Of course, XNA Game Studio 3.1 doesn’t limit you to the types of games listed above. You can use it to create pretty much any type of game you can imagine.

Who Should Read This Book?

XNA 3.1 Game Development for Teens has been designed to meet the needs of those gamers who love playing games and who want to make the leap from player to game developer. As this book will show you, playing games is fun, but creating your own games is where the real action and fun is. This book will not only teach you how to use XNA Game Studio 3.1 and Microsoft Visual C# 2008 Express to create all sorts of different games, but it will also teach you good programming about good game development principles.

XNA Game Studio 3.1 is easy enough for beginners to use to get started while at the same time is powerful to meet the need of advanced game developers. In fact, it provides everything you need to make the most advanced professional-looking games, everything that is except for the graphic and audio files that you will also need to give your applications the right look and feel. Fortunately, even if you are not a graphic artist or an audio engineer or musician, you will find there is no shortage of multimedia content available on the Internet.

As this book will show you, thanks to XNA Game Studio 3.1, game development is no longer the exclusive domain of veteran programmers with computer science degrees and decades of experience. While previous programming experience is certainly helpful, first-time game developers only require a good understanding of Microsoft Windows to get started. If you know how to operate a computer and are comfortable working with applications like Microsoft Office, you’ll be surprised how quickly you will pick things up.

Advanced game developers, on the other hand, will be pleased to know that XNA Game Studio 3.1’s game framework provides all of the programming power required to develop even the most complex games. It can be used to create standalone and network games. Whether you are just interested in having a little fun or you want to create and sell the next great Xbox 360 game, XNA Game Studio 3.1 will fit your needs quite nicely. With this book and a little time and effort you’ll be creating all kinds of games and perhaps even taking your first steps in a new career in no time at all.

What You Need to Begin

XNA Game Studio 3.1 is free and so is Microsoft Visual C#, the programming languages that you will use when developing XNA games and applications. These are the only resources that you will need to begin developing games for execution on Windows and the Zune portable media player. XNA games are supported on any type of Zune player. However, if you want to make your games available for execution on the Xbox 360, your Xbox 360 will have to be connected to Xbox Live and you will have to sign up for an XNA Creators Club membership. Also, your Xbox 360 must also be equipped with a hard drive to store your games.

Since almost all of the program code that you will develop is portable to both the Xbox 360 and Zune execution platforms, this book will demonstrate XNA game development on Microsoft Windows. XNA Game Studio 3.1 works with any of the following versions of Microsoft Windows.

  • Windows XP with Service Pack 2 (Home Edition, Professional Media Center Edition, Tablet PC Edition)

  • Windows Vista (Home Basic, Home Premium, Business, Enterprise, Ultimate)

All of the figures and examples presented in this book are shown using XNA Game Studio 3.1, running on Microsoft Windows Vista. Later in the book, you will learn how to port your games over to the Xbox and Zune player and to make any required adjustments to your program code. If your computer has a different version of Windows installed, you may notice small differences in how things look. However, all basic features and functionality work exactly the same.

Hint

Full support for XNA Game Studio 3.1 on Windows 7 is expected. XNA Game Studio 3.1 will install on Windows Server 2003 and 2008. However, it is not officially supported on either of these operating systems and may not operate as expected.

In order install and operate XNA Game Studio 3.1, your computer must meet the minimum hardware requirements listed in Table I.1. However, for good performance, you will want to make sure that your computer meets the recommended requirements.

Table I.1. Minimum Requirements for XNA 3.1

Requirement

Minimum

Recommended

Processor

1.6 GHz

2.2 GHz

Memory

192 MB

384 MB

Hard Disk

5400 RPM hard disk

7200 RPM hard disk

Disk Space

1.3 GB free space

1.3 GB free space

Note: On Windows Vista you’ll need a 2.4 GHz processor and 768 MB of memory.

In addition to the hardware requirements listed in Table I.1, your computer will require a graphics card that supports Shader Model 1.1 or higher and DirectX 9.0c. DirectX is a Microsoft technology that facilitates the development and execution of high-performance graphics and audio applications. Unless your computer is more than several years old, it should meet these requirements. If this is not the case, you can download and install it by visiting http://www.microsoft.com/windows/directx.

As previously stated, game development using Microsoft XNA Game Studio 3.1 requires that you install Microsoft Visual C# 2008 Express Edition or Visual Studio 2008 Professional Edition. Microsoft Visual C# 2008 Express Edition is free and is the version that will be used throughout this book. You can download Microsoft Visual C# 2008 Express Edition at http://www.microsoft.com/express/vcsharp/.

Trap

Microsoft XNA Game Studio 3.1 is not compatible with versions of Visual Studio prior to 2008. If you are using an older version, you’ll need to upgrade it to 2008 before installing Microsoft XNA Game Studio 3.1.

Assuming your computer meets the hardware and software requirements previously outlined, all you need to get started developing your own games is this book. Of course, if you want to develop games for the Xbox 360 or the Zune, you will need access to these devices.

Conventions Used in This Book

This book uses a number of conventions in order to make it easier for you to read and work with the information that is provided. These conventions are as follows.

Hint

Tips for doing things differently and things that you can do to become a more proficient XNA programmer.

Trap

Areas where problems are likely to occur and advice on how to stay away from or deal with those problems, hopefully saving you the pain of learning about them the hard way.

Trick

Programming shortcuts designed to help make you a better and more efficient programmer.

Companion Website Downloads

You may download the companion website files from www.courseptr.com/downloads.

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.23.79.149