更新时间:2021-08-05 18:55:56
coverpage
XNA 4 3D Game Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
Reader feedback
Customer support
Chapter 1. Introduction to XNA
System requirements
Installing the Windows Phone SDK
Time for action – installing Windows Phone SDK
Speller – Our first XNA game
Time for action – creating an XNA project
Managing content
Time for action – creating content assets
Member variables
Time for action – declaring new member variables
The Game1 constructor
Initialization
Time for action – customizing the Initialize() method
Loading content
Time for action – creating a square texture
Updating
Time for action – customizing the Update() method
The Draw() method
Time for action – drawing Speller
Helper methods
Time for action – words and letters
Time for action – completing the Speller project
Summary
Chapter 2. Cube Chaser – A Flat 3D World
Designing the game
Creating the project
Time for action – creating the Cube Chaser project
Our view of the world
Time for action – beginning the Camera class
The Projection matrix
Looking at something
Time for action – implementing a look-at point
The View matrix
Time for action – the View matrix
From the ground up
Time for action – creating the Maze classes
Drawing the floor
Time for action – drawing the floor
Moving around
Time for action – expanding the Camera
Time for action – letting the player move
Chapter 3. Cube Chaser – It's A-Mazing!
Maze generation
Time for action – defining a MazeCell
Time for action – generating the Maze class
Constructing the walls
Time for action – building walls
Time for action – drawing the walls
Solid walls
Time for action – bouncing off the walls
Chapter 4. Cube Chaser – Finding Your Way
The cube
Time for action – placing the cube
Time for action – rotating the cube
Matrices – big scary math things?
Positioning the cube
Time for action – randomly positioning the cube
Catching the cube
Time for action – catching the cube
Chapter 5. Tank Battles – A War-torn Land
Time for action – creating the Tank Battles project
An arc-ball camera
Time for action – the ArcBallCamera class – part 1
Time for action – finishing the ArcBallCamera class
Building the playfield
Time for action – generating the terrain
Time for action – adding the ReadHeightMap() method
Time for action – adding the BuildVertexBuffer() method
Time for action – the buildIndexBuffer() method
Let's see the terrain already!
Time for action – drawing the terrain
Adding texture – a gentle introduction to HLSL
Time for action – HLSL declarations
Time for action – Vertex Shader Input and Output definition
Time for action – the vertex shader
Time for action – the pixel shader
Time for action – utilizing Terrain.fx
Moving the camera
Time for action – moving the camera with the mouse
Chapter 6. Tank Battles – The Big Guns