XNA Game Studio 4.0 Programming: Developing for Windows Phone and Xbox Live

Paperback (Print)
Buy Used
Buy Used from BN.com
$26.47
(Save 41%)
Item is in good condition but packaging may have signs of shelf wear/aging or torn packaging.
Condition: Used – Good details
Used and New from Other Sellers
Used and New from Other Sellers
from $6.79
Usually ships in 1-2 business days
(Save 84%)
Other sellers (Paperback)
  • All (14) from $6.79   
  • New (6) from $24.76   
  • Used (8) from $6.79   

Overview

Get Started Fast with XNA Game Studio 4.0–and Build Great Games for Both Windows® Phone 7 and Xbox 360®

This is the industry’s best reference and tutorial for all aspects of XNA Game Studio 4.0 programming on all supported platforms, from Xbox 360 to Windows Phone 7 and Windows PCs. The only game development book authored by Microsoft XNA development team members, it offers deep insider insights you won’t get anywhere else–including thorough coverage of new Windows Phone APIs for mobile game development.

You’ll quickly build simple games and get comfortable with Microsoft’s powerful XNA Game Studio 4.0 toolset. Next, you’ll drill down into every area of XNA, including graphics, input, audio, video, storage, GamerServices, and networking. Miller and Johnson present especially thorough coverage of 3D graphics, from Reach and HiDef to textures, effects, and avatars. Throughout, they introduce new concepts with downloadable code examples designed to help you jumpstart your own projects. Coverage includes

  • Downloading, installing, and getting started with XNA Game Studio 4
  • Building on capabilities provided in the default game template
  • Using 2D sprites, textures, sprite operations, blending, and SpriteFonts
  • Creating high-performance 3D graphics with XNA’s newly simplified APIs
  • Loading, generating, recording, and playing audio
  • Supporting keyboards, mice, Xbox 360 controllers, Touch, accelerometer, and GPS inputs
  • Managing all types of XNA storage
  • Using avatars as characters in your games
  • Utilizing gamer types, player profiles, presence information, and other GamerServices
  • Supporting Xbox LIVE and networked games
  • Creating higher-level input systems that seamlessly manage cross-platform issues

From Windows Phone 7 mobile gaming to Xbox 360, XNA Game Studio 4.0 creates huge new opportunities for experienced Microsoft developers. This book helps you build on skills you already have, to create the compelling games millions of users are searching for.

Read More Show Less

Product Details

  • ISBN-13: 9780672333453
  • Publisher: Addison-Wesley
  • Publication date: 12/26/2010
  • Series: Developer's Library Series
  • Pages: 505
  • Sales rank: 1,451,801
  • Product dimensions: 6.90 (w) x 8.90 (h) x 1.30 (d)

Meet the Author

Tom Miller has been with Microsoft for a full decade. He specializes in bringing together managed code and gaming. He wrote and supported Managed DirectX, and for the past few years, he has been largely responsible for implementing the framework (graphics, audio, input, storage, and other core features) included in XNA Game Studio products. He currently works for Microsoft Game Studios.

Dean Johnson joined Microsoft in 2006 and helped launch the XNA Creators Club pipeline allowing hobbyists and independent developers to release their games on the Xbox LIVE Indie Games Marketplace. He currently is a Lead Software Development Engineer working on the XNA Game Studio product team.

Both authors actively blog and participate in game development conferences.

Read More Show Less

Table of Contents

Introduction 1

So You Want to be a Game Developer? 1

A Brief History of XNA Game Studio 1

What Is Available in Game Studio 4.0? 3

Why This Book? 4

1 Getting Started 5

Installing XNA Game Studio 4.0 5

Downloading the Tools 6

App Hub Membership 6

XNA Game Studio Connect 9

Writing Your First Game 11

Your First XNA Game Studio Windows Game 11

Your First XNA Game Studio XNA Xbox 360 Game 11

Your First XNA Game Studio Windows Phone 7

Game 12

Download Samples 12

Summary 12

2 Sprites and 2D Graphics 13

What Does 2D Mean? 13

Show Me Something on Screen 14

Spritebatch 16

Drawing 16

Moving Things Around 19

Animation 20

Controlling State 21

Rendering Text 25

Summary 27

3 The Game Object and the Default Game Loop 29

What Is in a New Project? 29

The Game Class 32

Virtual Methods 32

Methods 33

Properties 34

GameTime 34

Game Loop 36

Update and Draw 36

Components 38

GameComponents 38

Summary 40

4 Introduction to 3D Graphics 41

3D Graphics in XNA Game Studio 41

What Are 3D Graphics? 42

Makeup of a 3D Image 42

3D Math Basics 43

Coordinate Systems 44

Vectors in 3D Graphics 46

Matrix 53

Graphics Pipeline 61

Graphics Card 62

Vertex Shader 62

Backface Culling 63

Viewport Clipping 63

Rasterization 64

Pixel Shader 64

Pixel Tests 64

Blending 65

Final Output 65

Reach and HiDef Graphics Profiles 65

Graphics Profiles Define Platform Capabilities 66

The Reach Profile 66

The HiDef Profile 66

Let the 3D Rendering Start 67

GraphicsAdapter 67

GraphicsDevice 69

Drawing with Primitives 71

Summary 83

5 Lights, Camera, Action! 85

Why Do I See What I See? 85

View Matrix 87

Projection Matrix 88

Perspective 89

Orthographic 93

Camera Types 93

Static Cameras 94

Models 95

What Is a Model? 95

Rendering Models 99

Summary 103

6 Built-In Shader Effects 105

Using BasicEffect 106

Basic Lighting 108

Textures, Vertex Colors, and Fog 114

Using the Effect Interfaces 121

Using DualTextureEffect 122

Using AlphaTestEffect 124

Using EnvironmentMapEffect 124

Using SkinnedEffect 127

Summary 140

7 States, Blending, and Textures 141

Device States 141

BlendState 142

DepthStencilState 149

Render Targets 155

Faking a Shadow with a Depth Buffer and Render

Targets 158

Back to Device States 161

The Stencil Buffer 161

RasterizerState 164

SamplerStates 166

Other Texture Types 169

Summary 170

8 Introduction to Custom Effects 171

What Is a Custom Effect? 171

High Level Shading Language 172

Creating Your First Custom Effect 172

Parts of an Effect File 173

Global Variables 174

Vertex Structures 174

Drawing with a Custom Effect 177

Vertex Color 179

Texturing 180

Setting Sampler States in Effect File 183

Textures Repeating 184

Lighting 186

Ambient Lighting 186

Triangle Normals 190

Diffuse Lighting 192

Emissive Lighting 198

Specular Lighting 199

Fog 202

Point Lights 206

Effect States 209

Alpha Blending Using Effect States 211

Summary 213

9 Using the Content Pipeline 215

Tracing Content Through the Build System 215

Content Processors 216

Content Importers 223

Combining It All and Building Assets 226

Combining What You Learned So Far 235

Summary 238

10 Having Fun with Avatars 239

Introduction to Avatars 239

Accessing Avatar Information Using

AvatarDescription 240

Loading Avatar Animations with AvatarAnimation 243

Drawing the Avatar Using AvatarRenderer 246

Modifying Avatar Lighting 248

Playing Multiple Animations 249

Blending Between Animations 253

Interacting with Objects 260

2D Avatars Using Render Targets 263

Custom Avatar Animations 265

Creating the Custom Animation 266

Building the Custom Animation Type 267

Creating the Content Processor 273

Adding the Custom Animation to Your Game 283

Updating Your Game to Use the Custom

Animation 284

Summary 285

11 Understanding Performance 287

General Performance 287

Who Takes Out the Garbage? 289

Multithreading 292

Graphics Performance 293

Measuring Performance 295

Performance Measurement Tools 306

Cost of Built-In Shaders 307

Summary 309

12 Adding Interactivity with User Input 311

Using Input in XNA Game Studio 311

Polling versus Event-Based Input 312

The Many Keys Of A Keyboard 312

Reading Keyboard State 313

Moving Sprite Based on Keyboard Input 315

Onscreen Keyboard 316

Precision Control of a Mouse 320

Reading Mouse State 320

Moving Sprite Based on Mouse Input 322

Setting the Mouse Position 324

Xbox 360 Gamepad 324

Reading Gamepad State 325

Moving Sprites Based on Gamepad Input 329

Thumb Stick Dead Zones 332

Other Types of Controllers 332

Is the Gamepad Connected? 333

Multitouch Input For Windows Phones 334

Reading the TouchPanel Device State 334

Determine Number of Touch Points 336

TouchPanel Width, Height, and Orientation 337

Moving Sprite Based on Multitouch Input 337

Reading Gestures from the TouchPanel 339

Displaying GestureSample Data 341

Windows Phone Sensors and Feedback 342

Acceleration Data using the Accelerometer 344

Locating a Windows Phone with the Location

Service 348

Providing User Feedback using Vibration 351

Summary 351

13 Turn Up the Volume 353

Playing Sound Effects 353

Using SoundEffect for Audio Playback 354

Microsoft Cross-Platform Audio Creations

Tool (XACT) 360

Dynamic Sound Effects 368

Recording Audio with a Microphone 368

Generating Dynamic Sound Effects 371

Summary 374

14 Storage 375

What Is Storage? 375

Isolated Storage 375

Saving and Loading Data 377

The IsolatedStorageFile Object 379

XNA Game Studio Storage 380

Recreating the Project on Xbox 380

Devices and Containers 382

Getting a Device 383

Looking at the API 387

Loading Loose Files from Your Project 388

Summary 390

15 Gamer Services 391

GamerServicesComponent 391

Guide Class 392

Trial Mode 392

Now the Bad News 397

Platform-Specific Guide Functionality 397

Gamers and Profiles 402

GameDefaults 405

Presence 406

Privileges 406

With Friends Like This... 407

Summary 408

16 Multiplayer Networking 409

Multiplayer Games 409

Getting Ready for Networking Development 410

Main Menu and State Management 412

Creating a Network Session 416

Building a Game Lobby 423

Playing the Game 425

Searching for an Available Network Session 430

Joining an Available Network Session 435

Sending Player Invites 438

Simulating Real World Network Conditions 439

Summary 440

17 Using Media in XNA Game Studio 441

What Is Media? 441

Playing a Song 441

MediaPlayer 442

Songs and Metadata 443

Media Enumeration 444

Media Library 444

Video 448

Rendering a Video 448

Visualizations 451

Rendering Visualization Data 451

Summary 453

A Reach vs. HiDef Chart 455

B Using the Windows Phone FMRadio 459

C Windows Phone 7 Launchers and Choosers 463

D Dealing with Tombstoning 479

Index 487

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted December 22, 2011

    No text was provided for this review.

  • Anonymous

    Posted June 17, 2011

    No text was provided for this review.

Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)