440 INDEX
for adding coordinates to script line,
273–274
incrementing heartFrame with, 293
modifying character-collision routine, 257
setting character keys in, 260
turning button presses into values for
pressedKey, 165–166
updating location by trajectory in, 218
UpdateGame() method, moving code into,
322–323
UpdateKeys(), calling from Game1.Update(),
114
V
v parameter, using to compare a pixel to its
neighbor, 339–340
value type variables, 4
variable types
converting from one to another, 5
data loss when converting from one to
another, 5
variables
assigning values to, 4
storage of, 4
using, 4–5
value type, 4
Vector2, using for scroll, 74
Visual C# 2005 Express Edition, installing, 19
Visual Studio, saving sprites.dds to XNAPong
project in, 24
Visual Studio 2005, creating new console
application in, 10–12
W
wait ticks case, 272
wait command, settings for, 280
water effect
adding to ZombieSmashers game,
346–353
drawing foreground twice, 349
implementing in the game, 348
plan for adding to game, 346
render loop to use feedback, 350
setting the water level, 350–352
shader for, 347–348
wave bank, 229
creating new file for XACT project,
229–231
wave banks, creating new, 37
waves, 229
weapon creation, for The Dishwasher, 43
weapons texture, checking to see if part is
using, 102
weaponsTex[], using to store textures,
104–105
web site addresses
Apress Source Code/Download section,
11, 23, 222
Audacity, 223
Creators Club Premium Membership, 328
FlashKit, 222
Freesound Project, 222
.NET Reflector, 2
Paint.Net, 24
Sounddogs, 222
Visual C# 2005 Express Edition, 19
XNA Game Studio 2.0, 19
while loop
processing incoming messages with, 380
using instead of for loop, 14
vs. do while loop, 14
Windows Build Path and Xbox 360 Build Path
setting for sound banks, 38
setting for wave banks, 38
Windows Game library, creating, 94–96
wraith
adding and loading graphics to
ZombieSmashers game, 410
adding new triggers to, 401
AI, 402–403
animation, 400–402
assembling animation frames, 400–402
441
INDEX
creating AI class for, 402
creating characters for the game, 399–411
designing with, 399–411
getting previous state and location of,
408–410
graphics, 400
initialization script for, 401
wraith characters
definition script, sounds added to, 402
process of creating, 399–400
wrench triggers
adding new to appropriate frames of
animation, 210
defining, 209–210
in character editor, 210
putting to use for smashing zombies,
209–216
Write() function
creating in character editor, 122–124
making in Map class, 88
using device and container to get a path,
415
WriteToNet() function, 385–386
X
XACT. See also Cross-Platform Audio
Creation Tool (XACT)
setting up game audio in, 229–231
XACT Audio, Rumble, and More, 221–248
XACT Auditioning Utility, for auditioning
sound files, 231–232
XACT project
creating new, 229
creating new wave bank file in, 229–231
Xbox 360
deploying ZombieSmashers game on, 328
deployment, 291
storage container object, 413
Xbox 360 project
creating, 328
debugging, 331
XNA, a crash course in, 19–39
XNA Framework, eliminating classic
networking hassles with, 361
XNA Framework Remote Performance
Monitor for Xbox 360, 331
XNA Game Studio, connecting the Xbox 360
to, 329–330
XNA Game Studio 2.0
installing, 19
networking with, 361–362
working with pixel shaders in, 333
XNA Game Studio Connect
downloading and launching, 329–330
XNAPong
adding a background image, 33–35
adding rumble to, 35–36
adding the game logic, 27–32
ball logic for, 31–32
building, 20–39
class-level (Game1.cs) variables, 28
coding audio for, 38–39
creating file for graphics in, 24
loading textures, 23
paddles and gamepad logic, 28–31
task list for game logic, 27
Y
you-are-dead screen, for ZombieSmashers
game, 325
Z
zap cue object, playing from XNAPong, 38
.zdx filename extension, 59
zombie attack, adding animation for, 251
zombie bloodsplosions, adding triggers for,
250–251
Zombie class, extending AI base class with,
265
zombie head splatter, 267
zombie hit trigger, adding in
CharacterEditor, 250–251
442 INDEX
Zombie Smashers XNA game, keeping
separate functions organized, 136
ZombieSmashersXna project. See also
ZombieSmashers game
adding CharacterEditor to, 93–94
building the game, 127–153
cleaning up odds and ends, 168–169
combat concept art, 46
creating, 51–53
hero concept art, 46
maps concept art, 47
naming, 49
rough game plan for, 49–50
super simple scripting, 153–167
tool planning for, 47–48
zombie.zmx file, adding to ZombieSmashers
game, 199–204
zombies
adding animations to, 250–251
adding to ZombieSmashers game,
199–204
bringing into ZombieSmashers game,
202–204
in CharacterEditor, 199–201
making killable, 249–267
putting wrench to use for smashing,
209–216
shooting, 204
smashing, 204–216
ZombieSmashers game
adding a background image to, 150–153
adding the HUD and menu to, 320–321
bringing it all together, 285–289
bringing triggers into, 191–196
bringing zombies into, 202–204
class-level objects, 147
creating, 128
drawing one character for, 149
fields used in, 147–148
implementing the action in, 210–216
in-game scoring, 327
initializing, 148
loading game content, 148
making enemies killable, 249–267
manually changing namespaces in, 128
parting word from author, 397–398
plugging everything into, 394–395
reorganizing the code, 322–326
setting character’s facing, scale, state and
starting animation in, 135–136
setting things in motion, 147–149
super simple scripting, 153–167
updating, 320–326
updating frameTime calculating and
sound, 324–325
updating scroll and handling input,
148–149
ZombieSmashers project
adding MapEditor project to, 52–53
creating, 51–53
ZombieSmashersXna project
adding audio to, 229–239
adding music to, 236–239
bringing audio functionality into, 233
sounds used for, 222–223
ZombieSmashersXNA.Particles namespace
creating BloodDust class in, 255–256
Zombie-Smashing game
choosing 2D or 3D for, 45
concept image for protagonist, 46
initial design, 46–47
maps, 47
planning, 45–50
tool planning for, 47–48