XNA Game Studio 4.0 Programming Developing for Windows Phone 7 and Xbox 360

by ;
Edition: 1st
Format: Paperback
Pub. Date: 2010-12-12
Publisher(s): Addison-Wesley Professional
List Price: $44.99

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

The fastest, best way to get started with XNA Game Studio 4.0 - and build great games for both Windows Phone 7 and Xbox Live! bull; bull;The only XNA Game Studio 4.0 book written by XNA team members. bull;Includes extensive coverage of game development For The hot new Windows Phone 7 platform. bull;Thoroughly covers 2D, input, audio, storage, GamerServices, networking, and 3D. bull;Includes extensive downloadable code samples. With the release of Microsoft XNA Game Studio 4.0 and Windows Phone 7, developers can write games that will run (and sell) on both Windows Phone 7 devices And The immense installed base of Xbox Live subscribers. Games have already been widely adopted on iPhone and other mobile platforms. Many developers expect that games for Windows Phone 7 will perform similarly - and, with the added advantage of being able to write games once, and sell them for both mobile devices and Xbox 360/Xbox Live, it's expected that many new developers will enter the marketplace. As one of the first books on XNA Game Studio 4.0 - And The only one written by members of Microsoft's XNA development group - XNA Game Studio 4.0 Programming is well positioned to serve this large and growing audience. Tom Miller and Dean Johnson begin by thoroughly introducing XNA Game Studio 4.0: its goals, components, capabilities, and advantages. Miller and Johnson quickly walk through setting up XNA Game Studio 4.0, and getting started with game development. Next, they present thorough, step-by-step introductions to utilizing 2D Sprite Rendering, input, audio, storage, GamerServices, networking, media, and 3D graphics. Throughout, they present extensive code examples, all available for download.

Author Biography

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.

 

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

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

 

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.