Get Started Fast with XNA Game Studio 4.0-and Build Great Games for Both Windows (R) Phone 7 and Xbox 360 (R) 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.
Les mer
Introduction 1So You Want to be a Game Developer? 1A Brief History of XNA Game Studio 1What Is Available in Game Studio 4.0? 3Why This Book? 41 Getting Started 5Installing XNA Game Studio 4.0 5Downloading the Tools 6App Hub Membership 6XNA Game Studio Connect 9Writing Your First Game 11Your First XNA Game Studio Windows Game 11Your First XNA Game Studio XNA Xbox 360 Game 11Your First XNA Game Studio Windows Phone 7Game 12Download Samples 12Summary 122 Sprites and 2D Graphics 13What Does 2D Mean? 13Show Me Something on Screen 14Spritebatch 16Drawing 16Moving Things Around 19Animation 20Controlling State 21Rendering Text 25Summary 273 The Game Object and the Default Game Loop 29What Is in a New Project? 29The Game Class 32Virtual Methods 32Methods 33Properties 34GameTime 34Game Loop 36Update and Draw 36Components 38GameComponents 38Summary 404 Introduction to 3D Graphics 413D Graphics in XNA Game Studio 41What Are 3D Graphics? 42Makeup of a 3D Image 423D Math Basics 43Coordinate Systems 44Vectors in 3D Graphics 46Matrix 53Graphics Pipeline 61Graphics Card 62Vertex Shader 62Backface Culling 63Viewport Clipping 63Rasterization 64Pixel Shader 64Pixel Tests 64Blending 65Final Output 65Reach and HiDef Graphics Profiles 65Graphics Profiles Define Platform Capabilities 66The Reach Profile 66The HiDef Profile 66Let the 3D Rendering Start 67GraphicsAdapter 67GraphicsDevice 69Drawing with Primitives 71Summary 835 Lights, Camera, Action! 85Why Do I See What I See? 85View Matrix 87Projection Matrix 88Perspective 89Orthographic 93Camera Types 93Static Cameras 94Models 95What Is a Model? 95Rendering Models 99Summary 1036 Built-In Shader Effects 105Using BasicEffect 106Basic Lighting 108Textures, Vertex Colors, and Fog 114Using the Effect Interfaces 121Using DualTextureEffect 122Using AlphaTestEffect 124Using EnvironmentMapEffect 124Using SkinnedEffect 127Summary 1407 States, Blending, and Textures 141Device States 141BlendState 142DepthStencilState 149Render Targets 155Faking a Shadow with a Depth Buffer and RenderTargets 158Back to Device States 161The Stencil Buffer 161RasterizerState 164SamplerStates 166Other Texture Types 169Summary 1708 Introduction to Custom Effects 171What Is a Custom Effect? 171High Level Shading Language 172Creating Your First Custom Effect 172Parts of an Effect File 173Global Variables 174Vertex Structures 174Drawing with a Custom Effect 177Vertex Color 179Texturing 180Setting Sampler States in Effect File 183Textures Repeating 184Lighting 186Ambient Lighting 186Triangle Normals 190Diffuse Lighting 192Emissive Lighting 198Specular Lighting 199Fog 202Point Lights 206Effect States 209Alpha Blending Using Effect States 211Summary 2139 Using the Content Pipeline 215Tracing Content Through the Build System 215Content Processors 216Content Importers 223Combining It All and Building Assets 226Combining What You Learned So Far 235Summary 23810 Having Fun with Avatars 239Introduction to Avatars 239Accessing Avatar Information UsingAvatarDescription 240Loading Avatar Animations with AvatarAnimation 243Drawing the Avatar Using AvatarRenderer 246Modifying Avatar Lighting 248Playing Multiple Animations 249Blending Between Animations 253Interacting with Objects 2602D Avatars Using Render Targets 263Custom Avatar Animations 265Creating the Custom Animation 266Building the Custom Animation Type 267Creating the Content Processor 273Adding the Custom Animation to Your Game 283Updating Your Game to Use the CustomAnimation 284Summary 28511 Understanding Performance 287General Performance 287Who Takes Out the Garbage? 289Multithreading 292Graphics Performance 293Measuring Performance 295Performance Measurement Tools 306Cost of Built-In Shaders 307Summary 30912 Adding Interactivity with User Input 311Using Input in XNA Game Studio 311Polling versus Event-Based Input 312The Many Keys Of A Keyboard 312Reading Keyboard State 313Moving Sprite Based on Keyboard Input 315Onscreen Keyboard 316Precision Control of a Mouse 320Reading Mouse State 320Moving Sprite Based on Mouse Input 322Setting the Mouse Position 324Xbox 360 Gamepad 324Reading Gamepad State 325Moving Sprites Based on Gamepad Input 329Thumb Stick Dead Zones 332Other Types of Controllers 332Is the Gamepad Connected? 333Multitouch Input For Windows Phones 334Reading the TouchPanel Device State 334Determine Number of Touch Points 336TouchPanel Width, Height, and Orientation 337Moving Sprite Based on Multitouch Input 337Reading Gestures from the TouchPanel 339Displaying GestureSample Data 341Windows Phone Sensors and Feedback 342Acceleration Data using the Accelerometer 344Locating a Windows Phone with the LocationService 348Providing User Feedback using Vibration 351Summary 35113 Turn Up the Volume 353Playing Sound Effects 353Using SoundEffect for Audio Playback 354Microsoft Cross-Platform Audio CreationsTool (XACT) 360Dynamic Sound Effects 368Recording Audio with a Microphone 368Generating Dynamic Sound Effects 371Summary 37414 Storage 375What Is Storage? 375Isolated Storage 375Saving and Loading Data 377The IsolatedStorageFile Object 379XNA Game Studio Storage 380Recreating the Project on Xbox 380Devices and Containers 382Getting a Device 383Looking at the API 387Loading Loose Files from Your Project 388Summary 39015 Gamer Services 391GamerServicesComponent 391Guide Class 392Trial Mode 392Now the Bad News 397Platform-Specific Guide Functionality 397Gamers and Profiles 402GameDefaults 405Presence 406Privileges 406With Friends Like This... 407Summary 40816 Multiplayer Networking 409Multiplayer Games 409Getting Ready for Networking Development 410Main Menu and State Management 412Creating a Network Session 416Building a Game Lobby 423Playing the Game 425Searching for an Available Network Session 430Joining an Available Network Session 435Sending Player Invites 438Simulating Real World Network Conditions 439Summary 44017 Using Media in XNA Game Studio 441What Is Media? 441Playing a Song 441MediaPlayer 442Songs and Metadata 443Media Enumeration 444Media Library 444Video 448Rendering a Video 448Visualizations 451Rendering Visualization Data 451Summary 453A Reach vs. HiDef Chart 455B Using the Windows Phone FMRadio 459C Windows Phone 7 Launchers and Choosers 463D Dealing with Tombstoning 479Index 487
Les mer

Produktdetaljer

ISBN
9780672333453
Publisert
2010-12-29
Utgiver
Vendor
Addison-Wesley Educational Publishers Inc
Vekt
800 gr
Høyde
226 mm
Bredde
178 mm
Dybde
28 mm
Aldersnivå
06, P
Språk
Product language
Engelsk
Format
Product format
Heftet
Antall sider
528

Biographical note

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.