XNA 4.0 Game Development by Example: Beginner's Guide
eBook - ePub

XNA 4.0 Game Development by Example: Beginner's Guide

  1. 428 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

XNA 4.0 Game Development by Example: Beginner's Guide

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

XNA Game Studio enables hobbyists and independent game developers to easily create video games. It gives you the power to bring your creations to life on Windows, the Xbox 360, the Zune, and the Windows Phone platforms. But before you give life to your creativity with XNA, you need to gain a solid understanding of some game development concepts.

This book covers both the concepts and the implementations necessary to get you started on bringing your own creations to life with XNA. It details the creation of four games, all in different styles, from start to finish using the Microsoft XNA Framework, including a puzzler, space shooter, multi-axis shoot-'em-up, and a jump-and-run platform game. Each game introduces new concepts and techniques to build a solid foundation for your own ideas and creativity.

Beginning with the basics of drawing images to the screen, the book then incrementally introduces sprite animation, particles, sound effects, tile-based maps, and path finding. It then explores combining XNA with Windows Forms to build an interactive map editor, and builds a platform-style game using the editor-generated maps. Finally, the book covers the considerations necessary for deploying your games to the Xbox 360 platform.

By the end of the book, you will have a solid foundation of game development concepts and techniques as well as working sample games to extend and innovate upon. You will have the knowledge necessary to create games that you can complete without an army of fellow game developers at your back.

A step-by-step tutorial to using Microsoft XNA by creating four different styles of video games.

Approach

This book is a step-by-step tutorial that includes complete source code for all of the games covered. It adopts an engaging style to teach all the game development concepts. Each block of code is explained, and game development concepts are diagrammed and covered in detail. Each game begins with a concept description and concludes with suggestions for expanding on the finished game.

Who this book is for

If you are an aspiring game developer who wants to take a shot at creating games for the Microsoft Windows platform with the XNA Framework, then this book is for you. Using this book, you can get started with creating games without any game development experience. A basic knowledge of C# would be helpful to kick-start your game development, but it's not essential.

Frequently asked questions

Simply head over to the account section in settings and click on β€œCancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access XNA 4.0 Game Development by Example: Beginner's Guide by Kurt Jaegers in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Games. We have over one million books available in our catalogue for you to explore.

Information

Year
2010
ISBN
9781849690669
Edition
1

XNA 4.0 Game Development by Example Beginner's Guide


Table of Contents

XNA 4.0 Game Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
What just happened?
Have a go hero – heading
Reader feedback
Customer support
Errata
Piracy
Questions
1. Introducing XNA Game Studio
Overview of the games
System requirements
Installing XNA Game Studio
Time for action – installing XNA Game Studio
What just happened?
Building your first game
Time for action – creating a new Windows game project
What just happened?
Anatomy of an XNA game
The declarations area
Time for action – adding variables to the class declaration area
What just happened?
The Game1 class constructor
The Initialize() method
Time for action – customizing the Initialize() method
What just happened?
The LoadContent() method
Time for action – creating the squareTexture
What just happened?
The Update() method
Time for action – coding Update() for SquareChase
What just happened?
The Draw() method
Time for action – draw SquareChase!
What just happened?
Time for action – play SquareChase!
What just happened?
Have a go hero
Summary
2. Flood Control – Underwater Puzzling
Designing a puzzle game
Time for action – set up the Flood Control project
What just happened?
Introducing the Content Pipeline
Time for action – reading textures into memory
What just happened?
Sprites and sprite sheets
Classes used in Flood Control
The GamePiece class
Identifying a GamePiece
Time for action – build a GamePiece class – declarations
What just happened?
Creating a GamePiece
Time for action – building a GamePiece class: constructors
What just happened?
Updating a GamePiece
Time for action – GamePiece class methods – part 1 – updating
Rotating pieces
Time for action – GamePiece class methods – part 2 – rotation
What just happened?
Pipe connectors
Time for action – GamePiece class methods – part 3 – connection methods
Sprite sheet coordinates
Time for action – GamePiece class methods – part 4 – GetSourceRect
What just happened?
The GameBoard class
Time for action – create the GameBoard.cs class
What just happened?
Creating the game board
Time for action – initialize the game board
What just happened?
Updating GamePieces
Time for action – manipulating the game board
What just happened?
Filling in the gaps
Time for action – filling in the gaps
What just happened?
Generating new pieces
Time for action – generating new pieces
What just happened?
Water filled pipes
Time for action – water in the pipes
What just happened?
Propagating water
Time for action – making the connection
What just happened?
Building the game
Declarations
Time for action – Game1 declarations
What just happened?
Initialization
Time for action – updating the Initialize() method
What just happened?
The Draw() method – the title screen
Time for action – drawing the screen – the title screen
What just happened?
The Draw() method – the play screen
Time for action – drawing the screen – the play screen
What just happened?
Keeping score
Time for action – scores and scoring chains
What just happened?
Input handling
Time for action – handling mouse input
What just happened?
Letting the player play!
Time for action – letting the player play
What just happened?
Play the game
Summary
3. Flood Control – Smoothing Out the Rough Edges
Animated pieces
Classes for animated pieces
Time for action – rotating pieces
What just happened?
Time for action – falling pieces
What just happened?
Time for action – fading pieces
What just happened?
Managing animated pieces
Time for action – updating GameBoard to support animatedpieces
What just happened?
Fading pieces
Time for action – generating fading pieces
What just happened?
Falling pieces
Time for action – generating falling pieces
What just happened?
Rotating pieces
Time for action – modify Game1 to generate rotating pieces
What just happened?
Calling UpdateAnimatedPieces()
Time for action – updating Game1 to update animated pieces
What just happened?
Drawing animated pieces
Time for action – update Game1 to draw animated pieces
What just happened?
SpriteBatch overloads
SpriteFonts
Time for action – add SpriteFonts to Game1
What just happened?
Score display
Time for action – drawing the score
What just happened?
ScoreZooms
Time for action – creating the ScoreZoom class
What just happened?
Time for action – updating and displaying ScoreZooms
What just happened?
Adding the GameOver game state
Time for action – game over
What just happened?
The flood
Time for action – tracking the flood
What just happened?
Displaying the flood
Time for action – displaying the flood
What just happened?
Difficulty levels
Time for action – adding difficulty levels
What just happened?
Have a go hero
Summary
4. Asteroid Belt Assault – Lost in Space
Creating the project
Time for action – creating the Asteroid Belt Assault project
What just happened?
Another definition for "sprite"
Building the Sprite class
Time for action – declarations for the Sprite class
What just happened?
Time for action – Sprite constructor
What just happened?
Time for action – basic Sprite properties
What just happened?
Time for action – animation and drawing properties
What just happened?
Collision detection
Time for action – supporting collision detection
What just happened?
Animation and movement
Time for action – adding animation frames
What just happened?
Time for action – updating the Sprite
What just happened?
Time for action – drawing the Sprite
What just happened?
A sprite-based star field
Time for action – creating the StarField class
What just happened?
Time for action – updating and drawing the StarField
What just happened?
Time for action – viewing the StarField in action
What just happened?
Animated sprites – asteroids
Time for action – building the AsteroidManager class
What just happened?
Posi...

Table of contents

  1. XNA 4.0 Game Development by Example Beginner's Guide