2D avatars, render targets, 263–265
2D graphics
coordinate system, 13
drawing to screen, 14–16
animation, 20–21
controlling state, 21–25
Draw method, 16–19
moving things around, 19–20
explained, 13–14
GraphicsDeviceManager, 14
SpriteBatch object, 16
animation, 20–21
controlling state, 21–25
drawing, 16–19
moving things around, 19–20
text rendering, 25–27
Texture2D class, 14
2D sprites, 43
3D audio positioning, 356–357
3D graphics, 41–43
coordinate systems, 44–45
defined, 42
matrix, 53–54
combining matrix transforms, 58
identity, 54–55
rotation, 56–57
scale, 57
translation, 55
vectors, 46
addition, 47–48
cross product, 50
dot product, 49
negation, 49
point versus direction and magnitude, 46
scalar multiplication, 48
subtraction, 48
Vector4, 46
3D math, 43
3D rendering
drawing primitives, 71–72
DrawPrimitives, 78–80
DrawUserIndexedPrimitives, 75–78
DrawUserPrimitives, 72–75
primitive types, 71
vertex types, 71
GraphicsAdapter class, 67–68
GraphicsDevice, 69–70
creating, 70
reference devices, 71
acceleration data
accelerometer, 344–346
autorotation and, 348
reading, 344
accelerometer, 344–346
moving sprites, 346–347
AccelerometerSensor, 344
accessing AvatarDescription, 240–241
adding
custom animation to games, 283–284
SoundEffectInstance, 357–360
wave files, XACT, 361, 363–364
AllowOnlineCommunication, 407
AllowOnlineSessions, 407
AllowPremiumContent, 407
AllowPurchaseContent, 407
AllowTradeContent, 407
AllowUserGeneratedContent, 407
alpha blending, effect states, 211–213
AlphaTestEffect, 105, 124, 309
analog input, 312
angles, converting to radians, 19
animated model properties, 138
animation
2D graphics, 20–21
avatars, 243–244
functionality through interfaces, 246
playing multiple, 249–252
transforms and expressions, 245
updating, 244
custom animations
avatars, 265–273
content processors, creating, 273–282
AnimationBlender, 254, 257, 259
API, storage, 387–388
App Hub membership, installing XNA Game Studio 4.0, 6–7
Apply3D, 360
ApplyChanges, 31
aspect ratio, 90
AspectRatio, 90
assets, content pipeline, 226–234
AsyncCallback, 385
attenuation, 209
audio playback
looping with SoundEffect, 356
using cue, 364–366
AudioEmitter, 356
AudioEngine, 365
AudioListener, 357
autorotation, accerlation data and, 348
AvailableNetworkSession, 433
functionality through interfaces, 246
transforms and expressions, 245
updating, 244
AvatarAnimationPreset, 244
AvatarCustomAnimation, 270, 285
AvatarDescription
accessing avatar information, 240–241
Changed event, 243
constructing from byte arrays, 242
creating random, 242
AvatarExpression, 270
AvatarEye, 245
AvatarEyebrow, 245
AvatarMouth, 245
AvatarRenderer, 246–247
deterring current state of, 248
drawing while loading, 247–248
avatars, 239–240
2D avatars, render targets, 263–265
accessing information using AvatarDescription, 240–241
Changed event, 243
constructing AvatarDescription, 242
creating random, 242
animations, 243–244
functionality through interfaces, 246
playing multiple, 249–252
transforms and expressions, 245
updating, 244
custom animations, 265–273
adding to games, 283–284
content processors, 273–282
updating games to use, 284–285
drawing with AvatarRenderer, 246–247
deterring current state of, 248
while loading, 247–248
interacting with objects, 260–263
modifying lighting, 248–249
backbuffer, 65
backface culling, 63
base.Draw method, 303
effect interfaces, 121–122
fog, 119–121
lighting, 108–114
vertex colors, 115–118
Begin method, 22
BeginMark, 299
BeginShowKeyboardInput, 316, 318–320
BeginShowMessageBox, 396
BeginShowSelector method, 387
BinaryWriter helper class, 379
BlendFactor, 147
blending, 65
animations for avatars, 253–260
BlendState object, 142–148
premultiplied alpha, 148–149
Blinn-Phong shading, specular lighting, 200–202
bones, 98–99
BouncingImage class, 38
build systems, tracing content, 215–216
BuildAndLoadAsset method, 232, 237
built-in shaders, cost of, 307–308
ButtonPressed method, 415
byte arrays, constructing AvatarDescription, 242
calculating lighting, 110
cameras, 85–86
static cameras, 94–95
Changed event (AvatarDescription), 243
chatpad input, 313
chatpads, input, 313
choosers, Windows Phone 7, 472–476
choosing
content processors, 220
storage devices, 385
Clamp, 168
CleanSkeleton method, 280
ClearOptions, 153
CLR (Common Language Runtime), 2
CLR profiler, 306
color, vertex, 179–180
color value, 65
combining
content, 226–234
matrix transforms, 58
Common Language Runtime (CLR), 2
CompareFunction.LessEqual, 151
components, GameComponents, 38–40
connections, Xbox 360 gamepad, 333
constructing AvatarDescription from byte arrays, 242
containers, storage, 382–383
content, tracing through build system, 215–216
content importers, 223–226
Content object, 15
content pipeline, 216
combining and building assets, 226–234
combining what you have learned so far, 235–237
content importers, 223–226
content processors, 216–222
extensions, debugging, 222
tracing content, 215
content processors, 216–222
choosing, 220
properties, 221
ContentManager, 237
controllers, Xbox 360 gamepad, 332–333
converting angles to radians, 19
coordinate systems, 13
3D graphics, 44–45
CopyAbsoluteBoneTransformsTo, 99
CopyBoneTransformsFrom method, 99
CopyBoneTransformsTo method, 99
cost, 288
of AlphaTestEffect, 309
of built-in shaders, 307–308
of DualTextureEffect, 308
of EnvironmentMapEffect object, 308
of SkinnedEffect object, 308
CPU bound, 294
CreateFile method, 378
CreateOrthographic, 93
CreateOrthographicOffCenter, 93
CreatePerspective method, 92
CreatePerspectiveFieldOfView, 86, 89
CreatePerspectiveOffCenter method, 92
CreateSessionDraw, 417
CreateSessionUpdate, 424
cross product, vectors, 50
cue, audio playback, 364–366
culling, backface, 63
CullMode, 166
custom animations
adding to games, 283–284
avatars, 265–273
content processors, 273–282
updating games to use, 284–285
custom effects, 171
creating, 172–173
drawing with, 177–178
effect states, 209–210
alpha blending, 211–213
HLSL (High Level Shading Language), 172
lighting, 186
ambient lighting, 186–190
diffuse lighting, 192–197
emissive lighting, 198
fog, 202–206
point lights, 206–209
specular lighting, 199–202
triangle normals, 190–192
parts of effect files, 173
global variables, 174
vertex structures, 174–177
texturing, 180–183
repeating textures, 184–186
setting sampler states, 183–184
vertex color, 179–180
cutouts, depth, 153
DancePad, 332
data, isolated storage, saving and loading, 377–379
dead zones, thumb sticks (Xbox 360 gamepad), 332
DebugCommandUI, 306
debugging content pipeline extensions, 222
DebugManager, 306
DefaultProcessor, 231
depth, cutouts, 153
depth buffer, faking shadows, 158–161
depth test, 65
DepthBufferEnable property, 154
DepthBufferFunction, 154
DepthBufferWriteEnable, 154
DepthStencilState, 149–155
deterring current state of AvatarRenderer, 248
device states, 141–142
BlendState object, 142–148
premultiplied alpha, 148–149
DepthStencilState, 149–155
RasterizerState, 164–166
getting, 383–386
storage, 382–383
choosing, 385
diffuse lighting, 192–196
multiple lights, 196–197
oversaturation, 197
digital input, 312
direction versus point (vectors), 46
directional diffuse lighting, 196
directional lighting, 109–111, 193
DirectX, 2
DiscardContents, 156
displaying GestureSample data, 341–342
dot product, 49
downloading tools, installing XNA Game Studio 4.0, 6
Draw method, 16–19
game loop, 36–38
virtual methods, Game class, 32
drawing
2D objects to screen, 14–16
animation, 20–21
controlling state, 21–25
Draw method, 16–19
moving things around, 19–20
avatars with AvatarRenderer, 246–248
with custom effects, 177–178
primitives, 71–72
DrawPrimitives, 78–80
DrawUserIndexedPrimitives, 75–78
DrawUserPrimitives, 72–75
primitive types, 71
vertex types, 71
DrawModel call, 101–102
DrawModeViaMeshes, 101
DrawOrder property, 40
DrawPrimitives, 78–80
DrawString method, 25
DrawUserIndexedPrimitives, 75–78
DrawUserPrimitives, 72–75
DrumKit, 332
DualTextureEffect, 105, 122–124, 160, 308
dynamic sound effects, generating, 371–374
DynamicSoundEffectInstance, 370–371
effect files, 173
global variables, 174
sampler states, setting, 183–184
vertex structures, 174–177
effect interfaces, 121–122
effect states, 209–210
alpha blending, 211–213
Effect type, 177
effects. See custom effects
Effects collection, 96
ElapsedGameTime, 35
emissive lighting, 198
EmissiveColor, 114
EnableDefaultLighting, 111
EndMark, 299
enumerating microphones, 368
enumerations
SpriteEffects, 19
SpriteSortMode, 22
EnvironmentMapAmount parameter, 127
EnvironmentMapEffect, 105, 124–127, 308
EnvironmentMapSpecular parameter, 126
event-based input versus polling, 312
expressions, avatar animation, 245
extensions, debugging content pipeline, 222
faking shadows with depth buffer and render targets, 158–161
feedback, Windows Phones, 342, 344
vibration, 351
fields of matrix, 59
FindSession method, 431–432
FindSessionDraw, 432
FindSkeleton method, 279
fire and forget audio playback, 354–355
FlattenSkeleton method, 279
FlattenTransforms helper method, 135
FlightStick, 332
floats, 90
FMRadio, 459–460
fog, 202–206
BasicEffect, 119–121
FontName node, 25
FresnelFactor parameter, 126
FriendRequestReceivedFrom, 407
FriendRequestSentTo, 408
methods, 33
ResetElapsedTime, 33
Run, 33
RunOneFrame, 33
SuppressDraw, 33
properties, 34
InactiveSleepTime, 34
IsActive, 34
IsFixedTimeStep, 34
LaunchParameters, 34
TargetElapsedTime, 34
time, 34–36
virtual methods, 32
Draw, 32
Initialize, 32
OnActivated, 33
OnDeactivated, 33
ShowMissingRequirementMessage, 33
Update, 32
game loop
Draw, 36–38
Update, 36–38
Game Studio 2.0, 3
GameComponents, 38–40
GameDefaults, 405–406
GameLobbyUpdate method, 439
gamepad (Xbox 360), 324–325
connections, 333
controllers, 332–333
moving sprites, 329–331
reading gamepad state, 325–326
gamepad buttons, 326–328
gamepad direction pad, 328
gamepad thumb sticks, 329
gamepad triggers, 329
thumb stick dead zones, 332
gamepad state, reading, 325–326
gamepad buttons, 326–328
gamepad direction pad, 328
gamepad thumb sticks, 329
gamepad triggers, 329
GamePad.GetState, 327
GamePadButtons, 326–328
GamePadDPad, 328
GamePadThumbSticks, 329
GamePadTriggers, 329
GamePadType, 332
Gamer Services, 391
GameDefaults, 405–406
gamers, 402–405
GamerServicesComponent, 391–392
Guide class, 392
platform-specific guide functionality, 397–402
trial mode, 392–396
IsFriend, 407–408
Presence property, 406
Privileges property, 406–407
profiles, 402–405
GamerObject, 427
GamerPresence object, 406
GamerProfile, 404
gamers, 402–405
GameDefaults, 405–406
IsFriend, 407–408
Presence property, 406
Privileges property, 406–407
GamerServicesComponent, 391–392
Gamertag, 426
games
multiplayer. See multiplayer games
writing first game, 11–12
GameServices, 409
GameState, 413
GameTime object, 35
garbage collectors, 289, 291–292
general performance, 287–289
garbage collectors, 289, 291–292
multithreading, 292–293
generating
sound effects, 371–374
vectors, 301
GeoCoordinate, 350
geometry, 43
GestureSample, 340–341
displaying data, 341–342
GestureType, 339–340
GetFriends, 407
GetGamerPicture, 403
GetState method, 321
GetUserStoreForApplication method, 378
global variables, effect files, 174
GPU (graphics processing unit), 62
graphics. See 2D graphics; 3D graphics
graphics cards, 62
graphics performance, 293, 295
graphics pipeline, 61
backface culling, 63
blending, 65
color value, 65
graphics cards, 62
pixel shaders, 64
pixel tests, 64
depth test, 65
scissor test, 64
stencil test, 64
rasterization, 64
vertex shaders, 62
projection space, 63
view space, 62
world space, 62
viewport clipping, 63
graphics processing unit (GPU), 62
graphics profiles
HiDef profile, 66–67
platform capabilities, 66
Reach profile, 66
graphics resources, tombstoning, 484–485
GraphicsAdapter class, 67–68
creating, 70
reference devices, 71
Guide class, 392
platform-specific guide functionality, 397
messaging and signing in, 400–402
notifications, 397
players, 398–400
trial mode, 392–396
Windows Phone 7, 397
Guide.DelayNotifications method, 397
Guitar, 333
HiDef profile, 3
graphics profiles, 66–67
history of XNA Game Studio, 1–3
HLSL (High Level Shading Language), 172
homogeneous divide, 63
IAvatarAnimation, 246
identity matrix, 3D graphics, 54–55
images. See 2D graphics; 3D graphics
InactiveSleepTime, 34
IndexBuffer, 82
Initialize virtual methods (Game class), 32
input, 311
analog, 312
chatpads, 313
digital, 312
event-based input versus polling, 312
keyboards, 312–313
moving sprites, 315–316
onscreen keyboards, 316, 318–320
reading keyboard state, 313–315
mouse, 320
moving sprites, 322–324
reading mouse state, 320–322
setting position, 324
multitouch. See multitouch input
polling versus event-based input, 312
Xbox 360 gamepad, reading gamepad state, 325–326
gamepad buttons, 326–328
gamepad direction pad, 328
gamepad thumb sticks, 329
gamepad triggers, 329
input vertex structures, 174
installing XNA Game Studio 4.0, 5
App Hub membership, 6–7
downloading tools, 6
XNA Game Studio Connect, 9–10
XNA Windows Phone Developer Registration tool, 11
integers, 90
interacting with objects (avatars), 260–263
interfaces, avatar animation, 246
InverseDestinationColor, 146
InverseSourceColor, 146
InviteAccepted, 408
InviteREjectedProperty, 408
IsActive, 34
IsFixedTimeStep, 34
IsFriend, 407–408
IsFullScreen, 30
isolated storage, 375–377
IsolatedStorageFile object, 379–380
saving and loading data, 377–379
IsolatedStorageFile object, 379–380
IsTrial, 394
IsVisualizationEnabled, 443
jaggies, 31
joining available network sessions, 435–436
JoinSession method, 435–436
key lights, 111
keyboard state, reading, 313–315
keyboards, input, 312–313
moving sprites, 315–316
onscreen keyboards, 316, 318–320
reading keyboard state, 313–315
launchers, Windows Phone 7, 463–472
LaunchParameters, 34
Level object, 227–228
libraries, time ruler, 306
lightDirection, 193
lighting, 186
ambient lighting, 108, 186–190
BasicEffect, 108–114
calculating, 110
diffuse lighting, 192–196
multiple lights, 196–197
oversaturation, 197
directional lights, 109–111
emissive lighting, 198
fog, 202–206
key lights, 111
modifying avatars, 248–249
point lights, 206–209
specular color, 113
specular highlights, 112
specular lighting, 199
Blinn-Phong shading, 200–202
Phong shading, 199
triangle normals, 190–192
LinearClamp, 168
LinearWrap, 168
loading
avatars while drawing, 247–248
data, isolated storage, 377–379
loose files from projects, 388–390
location service, Windows Phones, 348
reading location data, 348–351
looping audio playback (SoundEffect), 356
main menu, multiplayer games, 412–416
MainMenuDraw, 416
Managed DirectX, 2
managing performance, 295–303, 305
performance measurement tools, 306–307
manipulating vectors with matrices, 59, 61
matrix
3D graphics, 53–54
combining matrix transforms, 58
identity, 54–55
rotation, 56–57
scale, 57
translation, 55
fields of, 59
methods, 60–61
properties of, 60
MeasureString method, 27
media, 441
MediaPlayer, 442–443
songs
metadata and, 443–444
playing, 441–442
media enumeration, 444–448
media libraries, 444–448
Meshes, 96–98
messaging, Guide class, 400–402
metadata, songs and, 443–444
methods, 86
Begin, 22
Draw, 16–19
DrawString, 25
Game class, 33
ResetElapsedTime, 33
Run, 33
RunOneFrame, 33
SuppressDraw, 33
LoadContent, 15
MeasureString, 27
ToRadians, 19
microphones
enumerating, 368
reading data, 369
recording with, 368–371
Microsoft Cross-Platform Audio Creation Tool (XACT), 353
Microsoft.Xna.Framework.Net, 410
mipmapping, 169
ModelBone object, 98
models, 95
bones, 98–99
Meshes property, 96–98
rendering, 99–103
modifying avatar lighting, 248–249
mouse, 320
moving sprites, 322–324
reading mouse state, 320–322
setting position, 324
mouse state, reading, 320–322
mouse window handle, setting, 324
MouseState structure, 322
moving sprites
with accelerometer data, 346–347
with keyboard input, 315–316
with mouse, 322–324
multitouch input, 337–339
Xbox 360 gamepad, 329–331
multiplalyer networking, 409
multiplayer games, 409–410
joining available network sessions, 435–436
main menu and state management, 412–416
network sessions, creating, 416–417, 424
networking development, 410, 412
playing, 427–430
searching for available network sessions, 430–434
sending player invites, 438–439
simulating real world network conditions, 439–440
multiple lights, diffuse lighting, 196–197
multisampling, 31
multithreading, 292–293
multitouch input for Windows Phones, 334
displaying GestureSample data, 341–342
moving sprites, 337–339
number of touch points, 336
reading gestures from TouchPanel, 339–341
reading TouchPanel device state, 334–336
TouchPanel width, height, orientation, 337
MyContentProcessor class, 236
namespaces, table of, 3
.NET runtime, 289
network sessions
joining, 435–436
multiplayer games, 416, 418, 424
searching for available, 430–434
networking, multiplayer, 409
networking development, multiplayer games, 410, 412
networks, simulating real world network conditions, 439–440
NetworkSession, 424–425
NetworkSession.Create, 432
NetworkSession.Find, 432
NetworkSession.SimulatedLatency property, 439
NetworkSession.SimulatedPacketLoss property, 440
new projects, 29–32
nonuniform scale, 57
normals, triangle normals, 190–192
notifications, Guide class, 397
NumVertices, 97
objects
Content, 15
GraphicsDevice, 17
interacting with (avatars), 260–263
SpriteBatch, 16
animation, 20–21
controlling state, 21–22, 24–25
drawing, 16–19
moving things around, 19–20
OnActivated virtual methods (Game class), 33
OnDeactivated virtual methods (Game class), 33
onscreen keyboard, 316, 318–320
OpaqueDataDictionary, 237
opening XACT, 360
orthographic (projection matrix), 93
otherPlayer, 398
output vertex structures, 175
oversaturation, diffuse lighting, 197
packetReader, 429
Pan, 356
party invites, 439
party user interfaces, 400
passes, effect files, 176
performance
general performance, 287–289
garbage collectors, 289, 291–292
multithreading, 292–293
graphics performance, 293, 295
performance measurement tools, 306–307
perspective, projection matrix, 89–92
phone-specific features, handling tombstoning, 482–484
Phong shading, specular lighting, 199
photo choosers, Windows Phone 7, 472
photos, rendering, 473
Pitch, 356
pixel tests, 64
depth test, 65
scissor test, 64
stencil test, 64
platform capabilities, graphics profiles, 66
PlatformContents, 156
playback, DynamicSoundEffectInstance, 370–371
player invites, sending, 438–439
players, Guide class, 398–400
playing
multiplayer games, 427–430
multiple animations, 249–252
songs, 441–442
sound effects, 353
SoundEffect. See SoundEffect
XACT. See XACT
PlayingGameUpdate, 427–428
point versus direction (vectors), 46
point lights, 206–209
polling versus event-based input, 312
PreparingDeviceSettings, 31
Presence property, 406
PresenceMode, 406
PresentInterval, 69
PreserveContents, 156
primitives, drawing, 71–72
DrawPrimitives, 78–80
DrawUserIndexedPrimitives, 75–78
DrawUserPrimitives, 72–75
primitive types, 71
private void CreateSession(GameType gameType), 425
private void CreateSessionDraw(), 418
Privileges property, 406–407
ProcessAnimation, 282
processAnimations helper methods, 136
profilers, 307
profiles, 402–405
GameDefaults, 405–406
IsFriend, 407–408
Presence property, 406
Privileges property, 406–407
projection matrix, 88
orthographic, 93
perspective, 89–92
projection space, 63
projects
loading loose files from, 388–390
new projects, 29–32
recreating on Xbox, 380–382
XACT, creating new, 360
properties
content processors, 221
Game class, 34
InactiveSleepTime, 34
IsActive, 34
IsFixedTimeStep, 34
LaunchParameters, 34
TargetElapsedTime, 34
matrix, 60
radians, converting to angles, 19
rasterization, 64
RasterizerState, 164–166
Reach profile, 3
graphics profiles, 66
reacting to tombstoning, 480–482
reading
acceleration data, 344
gamepad state, 325–326
gamepad buttons, 326–328
gamepad direction pad, 328
gamepad thumb sticks, 329
gamepad triggers, 329
gestures from TouchPanel, multitouch input, 339–341
keyboard state, 313–315
location data, 348–351
microphone data, 369
mouse state, 320–322
TouchPanel device state, 334–336
ReceiveData, 429
recording with microphones, 368–371
reference devices, GraphicsDevice, 71
reference types, 288
ReferenceStencil value, 163
render targets
2D avatars, 263–265
faking shadows, 158–161
rendering
3D. See 3D rendering
models, 99–103
photos, 473
targets, 155–158
text, 25–27
video, 448–450
visualization data, 451–453
RenderScene helper, 160
RenderState object, 141
RenderTargetUsage options, 156
repeating textures, 184–186
ReverseSubtract value, 145
rotation matrix, 3D graphics, 56–57
Run, 33
RunOneFrame, 33
Sampler, 182
sampler states, 166–169
setting in effect files, 183–184
texture types, 169
SampleRate, 372
SamplerState object, 141
saving data, isolated storage, 377–379
scissor test, 64
screens, drawing 2D objects to, 14–16
animation, 20–21
controlling state, 21–22, 24–25
Draw method, 16–19
moving things around, 19–20
searching for available network sessions, 430–434
SearchQuery, 471
SecularColorPower, 201
SendDataOptions, 429
sending player invites, 438–439
sensors, Windows Phones, 342, 344
sessions, creating, 423
shader models, 172
shaders
built-in, cost of, 307–308
vertex, 182
vertex shaders, 175
shading
Blinn-Phong, 200–202
Phong, 199
shadows, faking with depth buffer and render targets, 158–161
ShowGameInvite, 400
ShowMarketplace, 394
ShowMissingRequirementMessage virtual methods (Game class), 33
SignedIn event, 403
signing in Guide class, 400–402
SimulateTrialMode, 393
simulating real world network conditions, 439–440
Size node, 25
SkinnedEffect, 105, 127–140, 308
songs
metadata and, 443–444
playing, 441–442
sound effects
generating, 371–374
playing, 353
SoundEffect. See SoundEffect
XACT. See XACT
recording audio with microphones, 368–371
SoundEffect, 354
3D audio positioning, 356–357
adding SoundEffectInstance to games, 357–360
adjusting Pitch, Pan, and Volume, 356
fire and forget, 354–355
loading from files, 354
looping audio playback, 356
SoundEffectInstance, 355
SoundEffectInstance, 355
adding to games, 357–360
Spacing node, 25
specular color, 112–113
specular highlights, 112
specular lighting, 199
Blinn-Phong shading, 200–202
Phong shading, 199
SpecularColor, 113
SpecularLightColor, 201
SpriteBatch object, 16
animation, 20–21
controlling state, 21–25
drawing, 16–19
moving things around, 19–20
SpriteEffects enumeration, 19
sprites, moving
with accelerometer data, 346–347
with keyboard input, 315–316
with mouse, 322–324
with multitouch input, 337–339
with Xbox 360 gamepad, 329–331
SpriteSortMode enumeration, 22
StartIndex, 97
state management, multiplayer games, 412–416
StateBlock object, 141
controlling (2D graphics), 21–25
device state
BlendState object. See BlendState object
DepthStencilState, 149–155
device states, 141–142
RasterizerState, 164–166
sampler states, 166–169
texture types, 169
static cameras, 94–95
stencil test, 64
storage, 375
API, 387–388
containers, 382–383
devices, 382–383
choosing, 385
getting, 383–386
isolated storage, 375–377
IsolatedStorageFile object, 379–380
saving and loading data, 377–379
loading loose files from your project, 388–390
recreating projects on Xbox, 380–382
StorageContainer object, 388
streaming XACT, 366–368
StreamReader class, 226
Style node, 26
SupportedOrientations, 31
SuppressDraw, 33
SurfaceFormatColor, 31
SynchronizeWithVerticalRetrace, 31
synchronizing vertical retrace, 31
SystemLink, 410
Tag property (models), 96
TargetElapsedTime, 34–35
targets, rendering, 155–158
techniques, effect files, 176
tex2D function, 182
text, rendering, 25–27
Texture parameter, 126
TextureContent, 229
TextureCoordinate values, 185
TextureCube, 169
textures
AlphaTestEffect, 124
DualTextureEffect, 122–124
repeating, 184–186
sampler states, 166
texturing custom effects, 180–183
repeating textures, 184–186
setting sampler states, 183–184
thumb sticks, dead zones (Xbox 360 gamepad), 332
time, game class, 34–36
time ruler library, 306
TimeRuler, 296
TimeSpan, 351
ToggleFullscreen, 31
graphics resources, 484–485
handling with phone-specific features, 482–484
reacting to, 480–482
tools
downloading for installing XNA Game Studio 4.0, 6
Windows Phone Developer Registration tool, 11
ToRadians method, 19
TotalGameTime, 35
touch points, multitouch input, 336
TouchCollection, 335
TouchPanel
device state, reading, 334–336
reading gestures from, 339–341
width, height, and orientation, 337
TouchPanelCapabilities, 336
tracing content through build system, 215–216
transforms, avatar animation, 245
translation matrix, 3D graphics, 55
trial mode, Guide class, 392–396
triangle normals, 190–192
Update, 35
game loop, 36–38
virtual methods, Game class, 32
UpdateBoneTransforms, 273
UpdateOrder property, 40
updating
avatar animation, 244
games to use custom animation, 284–285
user input. See input
ValidateMesh call, 135
value types, 289
variables, global, 174
vector addition, 47–48
vector cross product, 50
vector dot product, 49
vector negation, 49
vector scalar multiplication, 48
vector subtraction, 48
Vector2 class, 18
Vector4, 46
vectors, 46
3D graphics, 46
addition, 47–48
cross product, 50
dot product, 49
negation, 49
point versus direction and magnitude, 46
scalar multiplication, 48
subtraction, 48
Vector4, 46
generating, 301
manipulating with matrices, 59, 61
vertex buffer, 116–117
vertex color, 179–180
BasicEffect, 115–118
projection space, 63
view space, 62
world space, 62
vertex structures, effect files, 174–177
vertex types, drawing primitive types, 71
VertexBuffer, 78–79
VertexDeclaration, 116
VertexElement, 116
VertexOffset, 97
vertical retrace, synchronizing, 31
VibrateController, 351
vibration, Windows Phones feedback, 351
video, rendering, 448–450
VideoPlayer object, 449
view matrix, 87–88
view space, 62
viewport clipping, 63
virtual methods, Game class, 32
Draw, 32
Initialize, 32
OnActivated, 33
OnDeactivated, 33
ShowMissingRequirementMessage, 33
Update, 32
visualization data, rendering, 451–453
visualizations, 451–453
visualizers, 442
Volume, 356
wave files, adding to XACT projects, 361, 363–364
Wheel, 332
Windows desktop runtime, 291
Windows Game SDK, 1
Windows Phone 7
choosers, 472–476
FMRadio, 459–460
Guide class, 397
launchers, 463–472
writing first game, 12
Windows Phone Developer Registration tool, installing XNA Game Studio 4.0, 11
Windows Phones
acceleration data using accelerometer, 344–346
vibration, 351
location service, 348
reading location data, 348–351
multitouch input, 334
displaying GestureSample data, 341–342
moving sprites, 337–339
number of touch points, 336
reading gestures from TouchPanel, 339–341
reading TouchPanel device state, 334–336
TouchPanel width, height, and orientation, 337
WireFrame, 165
world space, vertex shaders, 62
Wrap, 169
wrap texture, 168
writing first game, 11–12
X axis, 13
XACT (Microsoft Cross-Platform Audio Creation Tool), 353, 360
adding wave files to projects, 361, 363–364
creating new projects, 360
opening, 360
sound playback using cue, 364–366
streaming, 366–368
Xbox, recreating projects, 380–382
Xbox 360
chatpad input, 313
devices, 382
game data, 382
shader models, 172
writing first game, 11
Xbox 360 gamepad, 324–325
connections, 333
controllers, 332–333
moving sprites, 329–331
reading gamepad state, 325–326
gamepad buttons, 326–328
gamepad direction pad, 328
gamepad thumb sticks, 329
gamepad triggers, 329
thumb stick dead zones, 332
XNA Game Studio
3D graphics, 41–42
XNA Game Studio 4.0, installing, 5
App Hub membership, 6–7
downloading tools, 6
Windows Phone Developer Registration tool, 11
XNA Game Studio Connect, 9–10
XNA Game Studio Connect, installing XNA Game Studio 4.0, 9–10
XNA Game Studio Device Center, 10
Y axis, 13