1s and 0s, use in binary system, 54
1st PPOV (First-Person Point-of-View) games, 3
2D arrays, displaying for text values, 446–447
3D animation editing tool, Poser, 1081
3D art, types of, 18–19
animaudio.cs program, 148–149
audio profile, 150
See also Audacity; sound
3D games and genres, 12–13
3D modeler, role of, 18–19
3D modeling tools
Blender, 1077
MilkShape 3D, 1078
3D models, 118
backfaces, 118–119
cube example, 115–118
transformation, 120–123
use of, 26
See also rendering 3D models
3D objects, displaying, 124
3D programming, 133
shapes and shape classes, 133–134
translation, 134–142
See also programming best practices
3D shapes, connecting vertices, 118
3D Studio Max, cost and availability, 1080
3D World Studio, cost and availability, 1080
3Dup.com Web site, 1072
3rd PPOV (Third-Person Point-of-View) games, 3
– symbol
meaning of, 72
using, 74
! symbol
meaning of, 73
using, 85–86
!$= symbol, meaning of, 73, 84
$ symbol, using with variables, 65
% symbol
using with variables, 66
meaning of, 72
%= symbol, meaning of, 72
& symbol, meaning of, 72
&& symbol
meaning of, 73
using, 85–86
&= symbol, meaning of, 73
* symbol, meaning of, 72
* = symbol
meaning of, 72
using, 74–75
. symbol, meaning of, 73
+ symbol, meaning of, 72
++ symbol
meaning of, 72
using, 74
+= symbol
meaning of, 72
using, 74–75
<< symbol, meaning of, 72
<<= symbol, meaning of, 73
-= symbol
meaning of, 72
using, 74–75
-> symbol, meaning of, 73
>> symbol, meaning of, 72
>>= symbol, meaning of, 73
/= symbol, meaning of, 72
|| symbol, meaning of, 73
|= symbol, meaning of, 73
@ (at) symbol, meaning of, 72
{} (braces), meaning of, 72
[] (brackets), meaning of, 72
(backslash), using, 141
^ (caret) symbol, meaning of, 72
// (comments), including, 61
" " (NULL string), explained, 100
|| (OR) operator, using, 85–86
()(parentheses), meaning of, 72
| (pipe) symbol, meaning of, 72
; (semicolon), meaning of, 73
/ (slash)
using, 141
meaning of, 72
~ (tilde) symbol
meaning of, 72
using, 61
_ (underscore), using with identifiers, 64
abdomen vertices, 634
action games
1st PPOV, 3
3rd PPOV, 3
FPS (First-Person Shooter), 3
ActionMaps, naming, 183
add operator, symbol for, 72
Add Text tool, using in Gimp Toolbox, 385
addition totalizer operator
symbol for, 72
using, 74–75
add-on terminology, 163
administrative tools, use of, 29
Adobe Photoshop CS5, cost and availability, 1080
adventure games, 4–5
Air Brush tool
using for runabout skin, 412
using in Gimp Toolbox, 383
alpha channels, support in Gimp, 371
ampersand (&) symbol, meaning of, 72
AND (&&) operator, using, 85–86
AngelCode Web site, 1072
Angle and Measurement tool, using in Gimp Toolbox, 384
Angus Ghost, 187
animation, programmed, 144–147
animation mode, leaving, 638
animation sequence bindings, creating, 659
animation sequence files, using, 657–661
animation triggers, 250–251
animations
Blended Animation Sequence system, 569
DSQ system, 569
embedded, 568–569
examples of, 569
support for, 568–569
See also character animation; embedded animations
animator, role of, 19
animaudio.cs program, 148–149
DoAudioMoveTest, 150
InsertTestEmitter, 150
naked statements, 150
using, 150–151
animshape.cs program, 144–147
DoAnimTest, 146
MoveShape, 146
using, 147
anti-aliasing technique, 130
Apple game platform, 16
Arcane Fx Web site, 1071
area triggers, 250–251
arguments. See functions; parameter passing
ARMA series, 259
arms for Hero model
alignment of boxes, 602
bottom row of vertices, 603
completing, 609–610
integrating to torso, 610–612
left hand, 600
moving bottom rows, 603
rotating bottom rows, 602
scaled baby finger, 607
thumb, 605
torso compared with hand, 608
welding hand vertices, 602, 605–606
array index delimiter, symbol for, 72
art file, contents, 281
artwork (original), using for textures, 472–473
assembly language, explained, 54–55
assignment statements
explained, 63
values for variables, 65
Audacity
availability of, 1079
editing, 836
exporting sound effect, 837
installing, 832
main screen, 837–838
playback, 835
Record button, 833
recording sound, 833–836
sample rates, 840–841
selecting part of waveform, 836
shortcut keys, 846
stop recording, 835
toolbars, 837–839
track types, 840
See also 3D audio; sound
Audacity manual, accessing, 841
Audacity menus
File, 841–842
Audacity toolbar tools
Envelope, 838–839
Master Gain, 838–839
Play, 838–839
Record, 838–839
Selection, 838–839
Stop, 838–839
Time Shift, 838–839
Zoom, 838–839
Audacity track types, 838
Audio, 840
Label, 840
MIDI, 840
Time, 840
audio. See Audacity
audio artist, role of, 20
audio datablocks, 847
audio descriptions
AudioTest sound, 848
creating profile, 848–849
is3D, 848
isLoop, 848
SFXDescription, 849
sfxPlay, 848
SFXProfile, 849
type, 848
volume, 847
audio editing tools
Audacity, 1079
SoundEdit Pro, 1079
audio file formats, support for, 150
audio profiles
defining, 150
using, 847
audio project, testing, 850–851
auto-update program, use of, 28–29
avatar, EMAGA5 game, 243–244
avatar properties
EMAGA4 game, 190–191
EMAGA5 game, 224–225
energy depletion, 226
backgrounds, using GUI controls with, 438–440
backslash (), using, 141
base node, explained, 642
BasicCloud object
height, 808
layers, 807
movement speeds, 808
specifications, 807–808
texDirection, 808
textures, 808–810
wind velocity conversion, 809
See also cloud texture
Bell 47 Helicopter, using textures with, 347
best practices for programming, 108–109
binary system
bits in, 54
explained, 54
biped skeleton, 630–631
bits, use in binary system, 54
bitwise symbols, described, 72–73
Blend tool
using in Gimp, 388–389
using with soup can skin, 402
Blended Animation Sequence system, 569
Blender 3D modeling tool, 1077
blocks, use in terrains, 485–486
Blur or Sharpen tool, using in Gimp Toolbox, 383
BodyPaint 3D, cost and availability, 1080
navigating between, 50
removing from Torsion, 49–50
setting in Torsion, 49–50
Boolean logic, defined, 84
boots, creating for Standard Male Character, 431
braces ({}), meaning of, 72
brackets ([]), meaning of, 72
Brampton, Tom, 753
branching
explained, 87
if statement, 87–89
if-else statement, 89–91
switch statement, 93–95
breakpoints
identifying, 104
setting, 103–105
bridge
brush face, 778
building in Constructor, 774–779
Floor_set_stone texture, 777
Oblong brush, 774
with pylons, 776
scaled face texture, 778
Brush tools
Apply Jitter, 386
Brush Dynamics, 386
Brush option, 386
Fade out, 386
Incremental, 386
Mode option, 386
Opacity option, 386
Use color from Gradient, 386
using in Gimp Toolbox, 382–383, 386
Bucket Fill tool, using in Gimp, 388–389
building worlds. See particles
bump mapping, 128
byte code, explained, 166
C language, example of, 55–56
Callstack tab, accessing, 102
cam node, explained, 631
campfire example
flame particle definition, 913, 915
mission file, 914
OnServerCreated, 914
particle definitions, 913
ParticleData, 923–924
ParticleEmitterData, 921–922
ParticleEmitterNodeData, 920
ParticleEmitterNodes, 915–916
smoke particle definition, 913, 915, 917–918
Canvas module, 324–329
CreateCanvas, 329
initializeCanvas, 329
ResetCanvas, 329
video mode, 329
car example. See runabout; vehicle model
caret (^) symbol, meaning of, 72
celsalute animation sequence, described, 625
celwave animation sequence, described, 626
character animation, 623
bone movement, 626
joint rotation, 626
keyframes, 624
method, 624
rigging, 624
sequences, 625–626
skeleton, 627–631
See also animations; embedded animations; Hero model
characters, navigation of, 134
chat window, spamming, 303
ChatBox client interface, 976–979
extracting text from text buffer, 994
font size, 994
getGroup, 994
position, 994
checkerboard texture, using with terrains, 508
client, control/client.cs module, 178–184
client control modules, control/client/client.cs, 198–201
client interfaces
ChatBox, 976–979
FindServer, 975
Host, 974–975
MenuScreen, 970–972
MessageBox, 980–982
SoloScreen, 972–974
client versus server design, 165
client ServerScreen code module, 269–273
Cancel, 272
Close, 272
Join, 273
onServerQueryStatus, 273
onWake, 271
queryLAN, 271
QueryLANServers, 271–272
Update, 273
client ServerScreen interface module, 262–267
GuiScrollCtrl, 268
GuiTextEditCtrl, 268–269
interface definition, 267
QueryStatus, 269
ClientConnection module, 313–320
GameConnection, 318–320
IsNameUnique, 319
client/server networking
CommandToClient, 247–249
CommandToServer, 246–247
triggers, 249–252
See also core code client modules; GameConnection messages; servers
cloud texture, creating, 345–346. See also BasicCloud object
code, improving with loops, 965–966
code blocks, symbols used with, 72
code folding, using in Torsion, 50–52
CodeGuru Web site, 1073
Colada format, importing models into, 673–675
collision meshes, creating for vehicle model, 702–703
collision server code, 943–945
Car class, 945
mountObject, 945
OnCollision, 944–945
%this parameter, 945
coloring objects, 125
command interface control, GuiButtonCtrl, 442–443
CommandToClient, 247–249
CommandToServer
versus CommandToClient, 248
SendMacro(), 246–247
syntax, 246
TellAll, 247
TellEveryone message handler, 247
comments (//), including, 61
community forums, use of, 29
compound statement, defined, 62
Computer Graphics Aerobics, 113
computer model trees
complexity, 719
Forest Editor, 720
forests, 720
interacting with, 719
solid tree, 720–726
conditional expressions
relational operations, 84
testing for equality, 84
true and false values, 83–84
See also expressions; logical expressions
connection messages. See GameConnection messages
console
opening, 61
using with translation, 138–139
Constructive Solid Geometry (CSG) modeling. See CSG modeling
Constructor program, 753–754
bridge model, 774–779
Browse button, 769
brushes selection mode, 775
checking dimensions of brushes, 775
CSX versus MAP format, 765–766
Cube brush, 766–768
Cube test object, 773
default texture, 769
directory structure, 759
downloading, 757
Escape key, 770
forms, 761–764
house model, 779–786
installing, 758
main screen, 758–760
managing textures, 773
Materials form, 764
menu bar, 763
modifying brushes, 775
Oblong brush, 774
OSX Graphite theme, 763
palettes, 761
Planer Scale button, 784
Preferences form, 762
Properties form, 764
relighting scenes, 772
resizable forms, 759–762
Scene form, 763
scenes, 765
selection modes, 781
Selection Modes form, 764
Size Bounds button, 784
Texture Browser, 770–771
tool chain, 765–773
toolbars, 761
Values form, 764
View forms, 764
window, 785
contour map
example of, 495
with grayscale values, 499
control main, 172–175
control subtree, scripts in, 166
control/client.cs module, 178–183
Bind calls, 184
camera datablock, 183–184
“death cam”, 183–184
InitialControlSet, 184
key bindings, 183–184
key mapping, 183
motion functions, 184
PlayerInterface control, 183–184
playerKeymap ActionMap, 183
stub routines, 184
ThreeSpace 3D control, 183
control/client/initialize.cs module, EMAGA6, 260–261
control/client/interfaces/menuscreen.gui, 201–203
bitmap, 203
buttonType, 203
category field, 202
command, 203
core script code, 202
EMAGA6, 260
extent, 203
groupNum, 203
GuiButtonCtrl objects, 203
GuiContentProfile, 202
helpTag property, 203
horizSizing setting, 203–204
MenuScreen, 202–204
nested objects, 202
position properties, 203
profile sizing settings, 203–204
sizing properties, 203–204
text, 203
vertSizing setting, 203–204
visible, 203
control/client/interfaces/playerinterface.gui, 205–207
Canvas container, 204
GuiCrossHairHud object, 208
GuiHealthBarHud controls, 208
HUD (heads Up Display), 208
PlayerInterface control, 204, 207–208
control/client/interfaces/splashscreen.gui, 208–209
GuiInputCtrl, 209
SplashScreen control, 208
control/client/misc/presetkeys.cs, 211–215
ActionMap object, 213–214
exiting game, 214
key bindings, 211–213
MessageDialog objects, 214
motion function definitions, 214
PlayerKeymap object, 213–214
%val parameter, 214
control/client/misc/screens.cs
EMAGA5 game, 209–211
interface display objects, 210
LoadScreen::OnAdd, 211
LoadScreen::OnSleep, 211
LoadScreen::OnWake, 211
methods, 210
OnSleep methods, 210
OnWake methods, 210
PlayerInterface::onWake, 210
Pop, 210
Push, 210
PushDialog, 210
RefreshBottomTextCtrl, 211
RefreshCenterTextCtrl, 211
control/initialize.cs module, 175–177
configureCanvas, 177
GameConnection, 177
InitBaseServer, 177
InitializeClient, 177
InitializeServer, 177
control/main.cs module
callback method, 200
dedicated server, 275–276
EMAGA4 game, 172–173
EMAGA5 game, 197–198
initialize.cs module, 173
LaunchGame, 200
OnExit, 173
parent OnStart, 173
ShowMenuScreen, 200
splash screen, 200
stub routines, 201
control/player.cs module, 188–189
datablocks, 189
PlayerData class, 189
controls, interactive versus noninteractive, 435. See also GUI controls
control/server.cs module, 184–186
CreatePlayer, 187
GameConnection, 186
OnServerCreated, 186
stub routines, 187
control/server/initialize.cs, dedicated server, 276–277
control/server/misc/item.cs, 239–243
dropped items, 242
FirstAidKit::onCollision, 243
getting rid of items, 242
ItemData::Create, 243
ItemData::OnPickup, 242
ItemData::OnThrow, 242
Item::Respawn, 242
Item::SchedulePop, 242
$LoiterDelay variable, 242
picked items, 242
$RespawnDelay variable, 242
control/server/players/player.cs, 220–227
avatar state, 226–227
classname property, 225
energy depletion, 226
environment mapping, 225
“glue module”, 223–224
MaleAvatarClass::onAdd, 226
MaleAvatarClass::onCollision, 226
MaleAvatarClass::onRemove, 226
MaleAvatarDB::Damage, 227
MaleAvatarDB::onDamage, 227
MaleAvatarDB::onDisabled, 227
MaleAvatarDB::onImpact, 227
renderFirstPerson property, 226
control/server/server.cs module, 215–220
game timer, 219
GameConnection, 215
GameConnection::CreatePlayer, 219
GameConnection::OnClientEnterGame, 219
GameConnection::onDeath, 220
GameConnection::SpawnPlayer, 219
OnMissionEnded, 219
OnMissionLoaded, 219
OnServerCreated, 218
Schedule, 218
ServerCmd message handlers, 220
ServerCmdDropCameraAtPlayer, 220
ServerCmdDropPlayerAtCamera, 220
ServerCmdToggleCamera, 220
ServerCmdUse, 220
StartGame function, 218
control/server/weapons/crossbow.cs, 231–238
CrossbowImage::onFire, 238
CrossbowProjectile::OnCollision, 238
MissionCleanup group, 238
projectile object, 238
control/server/weapons/weapon.cs, 228–229
Ammo::onInventory, 230
Ammo::onPickup, 230
EMAGA5 game, 227–231
hooks to inventory system, 227
Item inventory code, 230
namespace helper methods, 227
RadiusDamage, 230–231
Weapon module, 227–231
WeaponImage::onMount, 230
Weapon::onCollision, 230
Weapon::onInventory, 230
Weapon::onPickup, 230
Weapon::onUse, 229–230
Convolve tool, using in Gimp Toolbox, 383
coordinate systems
Computer Graphics Aerobics, 113
explained, 112
geometric center, 113
left-handed, 113
object space, 113
right-handed, 113–114
core code client modules, 324
Canvas, 324–329
Messages module, 337–340
Mission module, 329–333
MissionDownload module, 333–337
See also client/server networking
core folder
art file, 281
fonts file, 281
profile file, 281
scripts file, 281
unifiedShell case folder, 281
core script functions., 1043–1070. See also scripts
core server modules
ClientConnection module, 313–320
Game module, 320–324
message, 298–303
MissionDownload, 308–312
MissionLoad, 303–308
server, 292–298
core subtree, contents of, 165
Corel Paint Shop Pro, cost and availability, 1081
Corel Painter 11, cost and availability, 1080
core/main.cs module, 282–286
corePackage, 286
initializeCore(), 286–292
onStart, 286
CRC (Cyclic Redundancy Check), 308
Crop tool, using in Gimp, 470
crossbow sounds, creating, 870–871
.cs extension, explained, 161
CSG (Constructive Solid Geometry), 754
CSG modeling, 754–757
arch solid, 755
brushes, 756
difference results, 755
Minuend brush, 755
polyhedrons, 754–755
rooms, 765
selecting brushes, 754–755
sphere solid, 755
subtraction operations, 755
Subtrahend brush, 755–756
union operation, 755
CSG tools, creating structures with, 769
CSX versus MAP format, 765–766
axis keys, 117–118
dimensions, 115
geometric center, 115–117
object versus world space, 116
plotting coordinates, 116
space definition, 116
sphere model, 116–117
XYZ-axis, 115–118
current state value, saving with GuiCheckBoxCtrl, 443–444
cylinder shape, creating in MilkShape 3D, 520–523
database, use of, 29
Datablock Editor
described, 910
using, 911
datablock keyword, versus new and singleton, 160
datablocks
3D, 858–859
assignment statements, 160
described, 159
example of, 183–184
identifiers, 159
for lightning, 819
MaleAvatarDB, 224
PlayerData class, 189
DDS format
saving files in, 371
using with Gimp 2, 361–363
death animation, 647–650
sequences, 625
settings, 655
“death cam,” use of, 183–184
deaths in server code, tracking, 967–968
debugging with Torsion, 96, 1079
Add Watch, 100
Breakpoints tab, 103–104
Callstack tab, 102
conditional breakpoints, 104–105
Debug menu, 97
Debug toolbar, 97–98
function definitions, 101
NULL string (” “), 100
program counter, 99
Start command, 98
Step button, 99–101
Step Over button, 103–104
“temporary debugging information”, 99
Watch tab, 100
WormyFruit.cs program, 105–108
See also Torsion text editor
Decal Editor, described, 911
decrement operator
symbol for, 72
using, 72
dedicated servers, 1006–1007
control/main.cs module, 275–276
control/server/initialize.cs, 276–277
root main module, 274–275
See also servers
Deep UV, cost and availability, 1081
Delta Force series, 259
DEM (Digital Elevation Model), 488
designer, role of, 17–18
Designer Today Magazine Web site, 1073
detail map texture, using with terrains, 510
Dictionary of Algorithms and Data Sources, 1073
DIF objects
creating with CSG tools, 769
CSG (Constructive Solid Geometry) modeling, 754–757
defined, 753
diffuse map texture, using with terrains, 510
direct messaging, 246
client/server networking, 246, 249
EMAGA6, 278–279
DirectDraw, working with, 371
dirt_grass material
grass tufts, 738
painting onto terrain, 737
dismounting and mounting server code, 945–947
divide operator, symbol for, 72
division totalizer operator
symbol for, 72
using, 74–75
dollar sign ($), using with variables, 65
Dr. Dobb’s Journal Web site, 1073
Dreamlords online RPG, Lockpick Entertainment, 6
DSQ system, using, 569
DTM (Digital Terrain Model), 488
DTS Exporters in MilkShape 3D
animation sequences, 666
Animation Settings group, 663
Collision Mesh, 662
export options, 663–664
material option flags, 664–665
mesh option flags, 665
Other Settings group, 663
sequence material options, 666
Apply action, 667
Cancel action, 667
collision meshes, 670–671
configuration files, 668–670
Copy Textures action, 667
Create Bounds Mesh action, 667
Edit Material features, 671–672
Edit Sequence dialog box, 673
Export Animations action, 667
features of, 666
Generate .cs file action, 667
Help action, 667
LOS collision meshes, 671
Main dialog box, 667
materials, 671
mesh properties, 670
Output dump file action, 667
root animation sequence, 652
Scale setting, 667
sequences with, 650–653
Sequence Editor features, 674
Split DSQ Export action, 667
Use .cfg File action, 667
dune buggy skin
making, 407
Torque Racing Demo controls, 407–408
DVD contents
extras, xxv
game engine, xxiv
source code, xxiv
tools, xxv
echo statements, using, 143
Edit-Compile-Link-Run cycle, 57
Edit-Run cycle, explained, 57
Emaga project, updating, 788–789
EMAGA4 game
avatar properties, 190
console output, 192
console.log, 192
control main, 172–175
displaying folders, 192
folder tree, 164
naming of game, 153
navigation keys, 191
player avatar, 188
running, 191–193
See also game structure
EMAGA5 game
action bindings, 243
avatar, 243–244
avatar properties, 224–225
control modules, 197–198
control/client/client.cs, 198–201
control/client/interfaces/menuscreen.gui, 201–203
control/client/interfaces/playerinterface.gui, 204–208
control/client/interfaces/splashscreen.gui, 208–209
control/client/misc/presetkeys.cs, 211–215
control/client/misc/screens.cs, 209–211
control/main.cs module, 197–198
control/server/misc/item.cs, 239–243
control/server/players/player.cs, 220–227
control/server/server.cs module, 215–220
control/server/weapons/crossbow.cs, 231–238
control/server/weapons/weapon.cs, 227–231
folder structure, 196
game timer, 219
modules, 197
running, 243–244
screen.cs module, 209–211
splash screen, 200
EMAGA6 game
code modifications, 259–260
control/client/initialize.cs, 260–261
control/client/interfaces/menuscreen.gui, 260
direct messaging, 278–279
No such file line, 278
ServerScreen code module, 269–273
ServerScreen interface module, 262–269
testing, 277–279
See also servers
embedded animations
death, 647–650
explained, 637
head, 646
headside, 646–647
idle, 638–641
look, 647
run, 641–645
sequences with DTSPlus Exporter, 650–653
See also animations; character animation
engine-sourced
console constants, 1040–1042
console variables, 1024–1039
preference variables, 1018–1023
environment mapping, 128, 224–225
environmental sounds
creating, 889–891
Sound Emitter, 889–891
equal to relational operation, symbol for, 84
Eraser tool, using in Gimp Toolbox, 383
errors, examples of, 96
exclamation point (!), meaning of, 73
expressions
evaluations, 63
examples of, 63–64
See also conditional expressions; logical expressions
eye detail, adding to Standard Male Character, 422
eye node, explained, 631
fabric textures, using, 482
Fairfax, Max, 753
fall animation sequence, described, 625
fall character animation, described, 569
Faust Logic Web site, 1072
fenders
building, 693–698
completing, 697
moving vertices, 697
rescaling car, 696
shaping, 695
stretching, 694
vertices, 695–696
Fill tools
FindServer client interface, 975
onServerQueryStatus, 991
OnWake, 991
queryLan, 991
finger lines and fingernails, creating, 427
First-Person Point-of-View (1st PPOV) games, 3
First-Person Shooter (FPS) games, 3
example, 38
ideas, 1007–1008
flags, variables as, 146
flat shading technique, 124
flipCode Web site, 1073
folder hierarchy, example of, 162–163
folders, displaying in EMAGA4 game directory, 192
fonts file, contents, 281
footstep sounds
creating, 864–866
PlayerData datablock, 865
for loop
evaluation, 77
initialization, 77
update operation, 77
using, 77–78
forest brush
creating, 730–731
deleting from forest, 730–731
Forest Editor
described, 911
Move Item button, 729
using with trees, 720, 727–731
See also scenery elements
forests
making, 727–730
tidying up, 730
forums, use of, 29
forward declarations, explained, 56
FPS (First-Person Shooter) games, 3
example, 38
ideas, 1007–1008
frames
using GuiControl with, 440–441
using in MilkShape 3D, 516
Fruit.cs program, 66–67
function definition, use in debugging, 101
functions
arrays, 82
calling in TorqueScript, 157–159
explained, 78
global arrays, 82
methods as, 155
parameters, 82–83
problem decomposition, 78
returning values, 83
TwotyFruity.cs function, 79–81
See also methods
fxFoliageReplicator tool, deprecation of, 726–727
fxShapeReplicator tool, deprecation of, 726–727
Gamasutra Web site, 1073
game cycling, 997–1001
checking mode, 1001
DoExitGame(), 1001
doGameDurationEnd, 998–999
EndGame, 998
game over, 999–1001
game timer, 999
multiplayer mode, 1001
onCycleExec, 998
single-player mode, 1001
StartGame(), 998
constraints, 897–898
requirements, 896–897
game designer, role of, 17–18
Game Developer Magazine Web site, 1074
game developer roles
audio artist, 20
designer, 17–18
producer, 17
programmer, 18
QA (Quality Assurance) specialist, 20
visual artist, 18
game development tools
3D animation editing, 1081
3D modeling, 1077–1078, 1080–1081
3D modeling and texturing, 1082
3D UV texture-mapping utility, 1081
audio editing, 1079
image editing, 1078, 1080–1081
programming editing, 1079
texturing, 1080
UV mapping, 1079
See also retail tools
game development Web sites, 1072–1076
game elements
3D models, 26
administrative tools, 29
auto-update program, 28–29
databases, 29
engine, 21–22
GUI (Graphical User Interface), 25
music, 27
scripts, 22–24
sound, 27
support forums, 29
support infrastructure, 28–29
textures, 26
Web sites, 28
game engine, features of, 21–22
game folder tree, 161
game genres
action games, 3–4
adventure games, 4–5
maze and puzzle games, 8
publishers, 13
role-playing games, 5–6
Serious Games, 11
simulator games, 8
sports games, 9
strategy games, 9–11
game ideas, 1007–1008
game initialization, control/initialize.cs module, 175–177
Game module, 320–324
GameConnection, 324
if-then pairs, 323
OnMissionEnded, 324
OnMissionLoaded, 324
OnMissionReset, 324
OnServerCreated, 323
OnServerDestroyed, 323
stub routines, 324
game platforms
Apple, 16
Linux, 15–16
Microsoft Windows, 14–15
game producer, role of, 16
game programmer, role of, 18
game publishers, 13
game root folder, explained, 160
game server. See server code
game structure
core code, 161
EMAGA4 game folder tree, 164
folder hierarchy, 162–163
game root folder, 160
source files, 161
See also EMAGA4 game; TorqueScript
game testing., See testing games
game timer, starting, 999
GameConnection messages
Connect() function, 253
features of, 252–253
function calls, 253
initialcontrolSet, 257
onConnect(), 254
onConnectionAccepted(), 254
onConnectionDropped(), 255
OnConnectionError(), 256
onConnectionRequest(), 253
onConnectionTimedOut(), 255
onConnectRequestRejected(), 255–256
onConnectRequestTimedOut(), 254
onDataBlockObjectReceived(), 258
onDataBlocksDone(), 257
onDrop(), 256
onFileChunkReceived(), 258
onGhostAlwaysObjectReceived(), 258
onGhostAlwaysStarted(), 258
setLagIcon(), 257
See also client/server networking
GameConnection object, 245
GameDevelopers Conference Web site, 1074
GameDev.net Web site, 1074
games, publishing, 20–21
GameSpy master server, 259
GarageGames Web site, 21
geometric center
in cube example, 115
defined, 113
Geometry.cs program, 90–91
Gimp 2 image processing tool
adding noise, 357–358
Addition layer mode, 381
alpha channel fill, 352
alpha channels, 371
applying materials, 366–369
Brightness-Contrast dialog box, 356
Burn layer mode, 380
checking versions of, 351
Color Balance dialog box, 357
Color layer mode, 381
Darken Only layer mode, 381
Difference layer mode, 381
DirectDraw, 371
Dissolve layer mode, 380
Divide layer mode, 380
Dodge layer mode, 380
DTS images, 350
features of, 349–350
file types, 370–372
Fill tool, 352
floating Toolbox, 377–378
Grain Extract layer mode, 381
Grain Merge layer mode, 381
Hard Light layer mode, 380
Help files, 351
Hue layer mode, 381
Hue-Saturation dialog box, 354–355
installing, 350
JPG format, 370–371
layers, 378–382
Lighten Only layer mode, 381
mipmaps, 361–362
Multiply layer mode, 380
Normal layer mode, 380
normal maps, 362–366
Overlay layer mode, 380
pine texture, 353
PNG file type, 371
Random Pick dialog, 359
raster versus vector images, 372–373
Saturation layer mode, 381
Save Desaturate dialog, 363
saving texture files, 360–366
Screen layer mode, 380
sidewalk texture, 354–358
Soft Light layer mode, 381
Subtract layer mode, 381
task switching, 359
Tool Options area, 352
tools, 352
transparency and translucency, 373–377
Transparency fill, 352
Value layer mode, 381
before view, 359–360
wood texture, 351–353
See also textures
Gimp image editing tool, availability of, 1078
Gimp Toolbox, Tool Options pane, 385–387
Gimp Toolbox tools, 402
Add Text, 385
Angle and Measurement, 384
Blur or Sharpen, 383
Convolve, 383
creating skybox images, 793
Crop, 470
Eraser, 383
Fill Bucket, 410–411
Ink Pen, 383
Measure, 389
Pencil, 383
Rectangular Selection, 471
Selection, 383
Smudge, 383
gizmos, using in Object Editor, 906
“glue module,” player.cs, 223–224
Gnometech Web site, 1072
gouraud shading technique, rendering 3D models, 125
greater than value, symbol for, 73, 84
grid texture, using with terrains, 508
Ground Cover object, 732–739
auto-generating terrain, 732–739
maxElements property, 739
Terrain Material layer, 736–739
GUI (Graphical User Interface), 25
.gui, comparing to .cs source module, 201
GUI controls, 436–438
backgrounds, 438–440
GuiButtonCtrl, 442
GuiCheckBoxCtrl, 443–444
GuiChunkedBitmapCtrl class, 438–440
GuiControl class, 440–441
GuiScrollCtrl class, 444–446
GuiTextCtrl class, 441–442
GuiTextEditCtrl class, 447–448
GuiTextListCtrl, 446–447
maxLength property, 442
menu screens, 438–440
See also controls
GUI Editor
Content pane, 450–452
grayed out menu items, 453
Inspector pane, 453
Keyboard commands, 459
keyboard commands, 460
preparing for use of, 448–450
screen resolution, 459–462
testing interface with, 461–462
Toolbar, 453–455
Tree view, 452–453
GUI elements
examples of, 433–434
scroll bar widgets, 435
GuiButtonCtrl class, 442–443
buttonType, 443
command, 443
GuiCheckBoxCtrl class, 443–444
GuiChunkedBitmapCtrl class, 438–440
GuiControl class, 440–441
GuiScrollCtrl class, 444–446
childMargin, 446
constantThumbHeight, 446
defaultLineHeight, 446
GuiTextListCtrl, 445
hScrollBar property, 445
vScrollBar property, 445
willFirstRespond, 445
GuiTextCtrl class, 441–442
GuiTextEditCtrl class, 447–448
hair color RGB settings, 424
hair textures, creating, 423–425
hands
creating for Standard Male Character, 425–427
finger lines and fingernails, 427
Hardy Boys mystery, 187
head for Hero model
back of, 576
bottom vertices, 572
completing, 582
cylinder, 571
dragging vertices, 580
ear vertices, 578–579
eye-socket vertices, 582
Front view, 577
grid display, 572
hiding, 584
matching to torso, 594–596
neck, 576
nose vertices, 581
reshaping, 596
rigging, 632
Right Side view, 575–576
scaling cranium, 578
scaling vertices, 575
selecting vertices, 579
Shape Primitives approach, 570–583
shaping, 575
shaping jaw, 574
shaping scalp, 581
shifting layers, 574
tapering cylinder, 573
temple vertices, 577
views, 571
Heads Up Display (HUD), 25, 208
headside animation, 625, 646–647
Health Kit
model, 707–710
testing, 710–714
height maps
blurred, 500
contour map, 495
drawing contours, 495
elevation RGB values, 497
establishing scale, 496
locating contour features, 501
opacity mask, 503–504
Palette Editor, 497–504
Palettes dialog box, 496–497
powers-of-two for image sizes, 506–507
resizing images, 496
scale and unit numbers, 496
selecting images for, 503
terraced, 500
Terrain Materials Editor, 503
terrain placement, 504–505
terrain sizes, 506
TerrainBlock, 505–506
use in terrain modeling, 489–490
world camera, 501
See also terrains
Hello World program
comments in, 61
error messages, 58–60
executable code, 61
function body, 62
function header comment, 61
module header block, 61
output, 59
running, 58
script file, 57–58
Hero model
adjusting scale of, 942
animations, 942–943
arms, 600–610
completing, 611
head, 570–583
head, torso, and legs, 601
legs, 597–600
mounting in vehicle, 942–943
myHero.cs file, 941
rigging, 637
scaling mesh, 611–612
segmented-mesh model, 570
Shape Primitives approach, 570
sitting pose, 943
testing, 653–657
torso, 583–594
updating, 939–942
using player in game, 656–657
See also character animation; Standard Male Character
Hero skeleton
abdomen vertices, 634
bending at spine, 636
biped, 630–631
building, 627–631
chest vertices, 635
child nodes, 628
labeled nodes, 628
order of nodes, 629
pose adjustments, 630
replacing, 658–659
rigging, 632–637
rotating joints, 629
rotating leg bones, 635–636
selecting joints, 627
testing nodes, 635
unlink node, 627–628
Hero skin
adjusted triangles, 618
Box Mapping settings, 620
creating, 615
Planar mapping settings, 616
reorganized map, 619
spherical mapping of head, 617
unwrapped head, 618
unwrapped model, 616
UV template texture, 623
UV-mapped feet, 621
UV-mapped hands, 620
UV-mapping layout, 622
See also player skin; skins
high-level language, explained, 55
highlight maps, using, 126
Host client interface, 974–975
hosted servers, 1006–1007
Hothead Games, Penny Arcade, 5
house
brush within brush, 781
building, 779–786
completing, 786
Door brush, 784
Hollow brush, 783
initial brush, 780
selection modes, 781
views, 782
HUD (Heads Up Display), 25, 208
IDE tool, Torsion, 1079
ideas for games, 1007–1008
iDevGames Web site, 1074
idle animation, 638–641
cyclic, 640
Keyframer control panel, 638
poses, 640
if statements
nesting, 91–93
using, 87–89
if-else statement
versus switch statement, 94
using, 89–91
image editing tools, Gimp, 1078
increment operator
symbol for, 72
using, 74
initialization, control/initialize.cs module, 175–177
InitializeFruit function, 83
Ink Pen tool, using in Gimp Toolbox, 383
insert credit Web site, 1074
installing
Audacity, 832
Gimp 2 image processing tool, 350
GUI (Graphical User Interface), 516–517
microphone setup, 833
MilkShape 3D modeling tool, 516
Torque 3D, 36–38
Torque Constructor program, 758
interiors
creating with CSG tools, 769
CSG (Constructive Solid Geometry) modeling, 754–757
defined, 753
jacket, creating for Standard Male Character, 428–430
joints, selecting, 627
JPG format, saving files in, 370–371
jump animation, described, 569, 625
Kabus, John, 753
key bindings
explained, 183
saving, 869
key mapping, explained, 183
Keyframer
enabling, 638
using with idle animation, 638
keyframes, copying and pasting, 639
keys, remapping, 869–870
keywords, 1013
kills in server code, tracking, 968
Koob game
3D datablocks, 858–859
audio initialization code, 855
AudioEffect, 859
AudioMusic, 859
barriers, 932–933
checkpoint locations, 933
controlclientpresets.cs, 855
core/scripts/client/audioDescriptions.cs, 856–858
defining tracks, 931–932
direction sign, 932
initialize.cs, 854
items and structures, 930–934
launching, 876
moving items, 931
preferences code, 855
prepping, 900
profile setup, 854
requirements, 898–899
rotating objects, 931
scaling objects along axes, 931
script file, 854
SFXDescriptions, 858
startfinish item, 931
start/finish line, 930
terrains, 928–930
transform operations, 931
labels, using GuiTextCtrl with, 441–442
Lambert shading technique, 125
land animation, described, 569, 625
latency, explained, 35
leather jacket, creating for Standard Male Character, 428–430
leg bones, rotating, 635–636
legs for Hero model
completing, 599–600
cylinders, 597
foot, 598
integrating to torso, 600
knee, 598
thigh, 598
less than value, symbol for, 73, 84
LevelInfo object, 805
aerial perspective, 806
decalBias, 806
fogDensity, 806
nearClip, 806
visibleDistance, 806
light_recoil animation sequence, described, 625
Lightning object, using with storms, 818–820
lines, anti-aliasing, 130
Linux game platform, 15–16, 1074, 1078
logical expressions
AND (&&) operator, 85–86
NOT (!) operator, 85–86
operators, 85–86
OR (||) operator, 85–86
See conditional expressions; expressions
logical operators, using, 86–87
lookms animation sequence, described, 625
looknw animation sequence, described, 626
looksn animation sequence, described, 625
loops
explained, 75
for loop, 77–78
improving code with, 965–966
while loop, 76–77
machine code, example of, 53–54
Machinima.com Web site, 1074
Macintosh tool sources on Web, 1078
main.cs module
control code, 172–175
function of, 163
location of, 161
MAP versus CSX format, 765–766
Marble Blast maze-and-puzzle hybrid, GarageGames, 7
massive multiplayer support, 898
Material Editor, 910
MathWorld Web site, 1075
maxElements property, 739
Maya 3D modeling tool, cost and availability, 1081
maze and puzzle games, 6–7
Measure tool, using in Gimp, 389
menu screens, using GUI controls with, 438–440
MenuScreen client interface, 970–972
Mesh Factory Web site, 1075
Mesh Road Editor, described, 911
Message module, 298–303, 337–340
addMessageCallback, 340
ClientCmdServerMessage, 340
DefaultMessageCallback, 340
InitBaseServer, 298–302
OnChatMessage, 340
OnChatMessage pseudo-handler, 339–340
ServerMessage messages, 340
spam control functions, 303
MessageBox client interface, 980–982
Close, 997
Eval, 997
OnEscape, 997
Open, 996
ToggleMessageBox, 997
ToggleState, 997
metallic textures, using, 482–483
methods
accessing through objects, 155
as functions, 155
of objects, 157
See also functions
Microsoft Windows. See Windows 7 game platform
MilkShape 3D modeling tool
adjusting scale size, 519
availability of, 1078
coordinate display system, 519–520
DTS Exporters, 661–666
features of, 515
File menu, 529–530
frames, 516
Front View, 577
Groups tab, 521
Hero skin, 615–623
installing, 516
Left viewport, 575
Message Panel, 551
navigating in views, 517–518
plug-ins, 537–538
scaling vertices, 575
scrolling in and out, 519
Shift key, 584
soup can model, 526–529
Texture Coordinate Editor, 551
toolbox contents, 517–518
turning off grid display, 572
UVMapper BMP export options, 525
UVMapper OBJ export options, 524
Vertex menu, 532–533
view scale and orientation, 518–520
viewports, 516
views, 516
Window menu, 538–539
windows, 516
See also modeling techniques
MilkShape 3D Toolbox
Materials tab, 539–540, 545–547
Model tab, 539–542
mipmapping, 129
Mission Area Editor
described, 911
flightCeiling property, 911
flightCeilingRange property, 911
values in area property, 911
Mission Editor, relighting scenes in, 772
mission files, determining, 915
Mission module, 329–333
ClientCmdMissionEnd, 333
ClientCmdMissionStart message handler, 332
ExpandMissionFileName, 333
MissionDownload module, 308–312, 333–337
ClientCmdMissionStartPhase2, 336
ClientCmdMissionStartPhase3, 336
ClientCmdMissionStratPhase1, 336
connect function, 337
download process, 311–313
GameConnection, 311–312
LightScene, 337
MissionStartPhase3Ack, 312
MissionStartPhasen, 312
OnDataBlockObjectReceived, 336
OnGhostAlwaysObjectReceived, 336
OnGhostAlwaysStarted, 336
SceneLightingComplete, 337
UpdateLightingProgress, 337
updating progress display, 336
MissionLoad module, 303–307
CRC (Cyclic Redundancy Check), 308
EndMission, 308
ResetMission, 308
Mod terminology, explained, 163
modeling techniques
Arbitrary Extrusion, 567
Axial Extrusion, 567
Box method, 566
Hybrids, 568
Incremental Polygon Construction, 566–567
Shape Primitives, 566
Topographical Shape Mapping, 568
for Torque 3D, 568–569
See also MilkShape 3D modeling tool
module terminology, explained, 163
modulus operator, symbol for, 72
modulus totalizer operator
symbol for, 72
using, 74–75
money in server code, 961–964, 966–967
adding coins, 965–966
MissionArea box, 965
rotate, 965
search mask, 965
mount nodes
camera mount, 700
creating for vehicle model, 698–701
explained, 631
eye mount, 700
seat mounts, 700
mounting and dismounting server code, 945–947
Move Manager variables, 1017
Move tool, using in Gimp, 384, 389–390
movement
direct, 134–139
programmed, 134–139
moveshape.cs code module
creating, 139–140
using, 141–142
mSTREET 3D Serious Game, TubettiWorld, 12
multiplication totalizer operator
symbol for, 72
using, 74–75
multiply operator, symbol for, 72
music
creating, 891–893
start-up, 892–893
use of, 27
music and sound. See Koob game
mycan.xcf, saving, 401
myHero.cs file, creating, 941
Mysterious Circumstance of Reincarnation and the Angus Ghost, 187
namespaces, using, 158
naming conventions, 187
NeHe Productions Web site, 1075
networking
CommandToClient, 247–249
CommandToServer, 246–247
triggers, 249–252
See also core code client modules; GameConnection messages; servers
new keyword
versus datablock and singleton, 160
using with objects, 156
newline append macro, symbol for, 72
NeXe Web site, 1075
nodes
base, 642
cam, 631
eye, 631
mount, 631
ski, 631
testing, 635
unlink, 631
noise, adding with Gimp 2, 357–358
normal mapping, 130
NOT (!) operator, using, 85–86
NULL string (" "), explained, 100
numbers versus strings, 73
Object Editor
Inspector, 906
Library Drop Location command, 906–907
Library keyboard operations, 907
Library mouse operations, 907
Scene Tree view, 905–906
object space, explained, 113
object type masks, 1011–1012
Object-Oriented Programming (OOP), 55–56
objects
BasicCloud object, 807–810
LevelInfo object, 805–806
Sun Mission, 802–805
objects in TorqueScript
accessing methods through, 155
assigning by name, 157
calling functions, 157–159
controlling, 157
copies, 155
creating, 156–157
datablocks, 159–160
described, 155
handles, 155–156
instances, 155–156
methods, 157
namespaces, 157–158
new keyword, 156
properties, 155
singleton keyword, 156–157
using, 157
See also Torque objects
octahedron, displaying, 135–137
OOP (Object-Oriented Programming), 55–56
OpenAL audio API, 847
operator precedence, 72–74, 1015
operators, using, 71–72, 1013–1015
OR (||) operator, using, 85–86
Oxford Dynamics Web site, 1075
package terminology, explained, 163–164
packet loss, explained, 35
Palette Editor, using with height maps, 497–504
pants, creating for Standard Male Character, 430
parallax mapping, 130–131
parameter passing, explained, 82–83
parentheses (()), meaning of, 72
ParticleEmitterNodes, using, 915–916
particles
attached, 912–913
campfire example, 913–920
explained, 912
freestanding, 912–913
in game world, 912–913
parts of, 912
placing, 918
Paths tool, using for runabout skin, 413–414
patterned textures, using, 481
Pencil tool, using in Gimp Toolbox, 383
Penny Arcade Adventure-FPS game, Hothead Games, 5
percent sign (%), using with variables, 66
phong shading technique, 126
photography
digital versus film, 464–466
as source for textures, 464–472
photos
color matching for textures, 466–468
cropping for textures, 469–470
lighting for textures, 468–469
postprocessing for textures, 466–472
pipe (|) symbol, meaning of, 72
pixel shaders, using, 128
PlanetTribes- -Torque Web site, 1072
plastic textures, using, 482–483
platforms
Apple, 16
Linux, 15–16
Microsoft Windows, 14–15
play testing, 1005
player, control/player.cs module, 188–191
Player Camera, switching between World Camera, 915
player event control triggers, 250–251
player skin
boots, 431
clothes, 428–431
described, 416
hair textures, 423–425
hands, 425–427
head and neck, 417–423
jacket, 428–430
RTTW (Return to Tubettiworld), 416–417
Standard Male Character, 416
trousers, 430
See also Hero skin; skins
3D sounds, 860
client-only sounds, 860
crossbow, 870–871
environmental, 889–891
footsteps, 864–866
music, 891–893
rustlers, 861–864
utterances, 866–869
vehicles, 882–888
weapons, 869–870
world sounds, 859–860
See also sound; tommy gun sounds
player spawning, 935–938
marker, 935–936
MissionMarkerData, 935–936
PlayerDropPoints group, 938
player.cs files
datablock definition, 224
“glue module”, 223–224
locating, 940
PlayerInterface control, 204
PNG file type, saving files in, 371
Polycount Web site, 1075
polygon
creating, 118
decomposing into mesh, 118–119
faces, 118
Poser 3D animation editing tool, cost and availability, 1081
Prairie Games Web site, 1072
problem decomposition, explained, 78
problem solving, 95–96
procedural language, explained, 55
producer, role of, 16
profile file, contents, 281
programmer, role of, 18
Programmers Heaven Web site, 1075
programming best practices, 108–109. See also 3D programming
programming editing tools
PS-Pad, 1079
Torsion, 1079
programming languages
assembly language, 54–55
high-level language, 55
procedural language, 55
programs
Hello World, 57–58
organization and use of, 53
properties
of avatar in EMAGA4 game, 190–191
of objects, 155
proving tool chain
explained, 612
modeling work flow, 613
steps, 614–615
PS-Pad text editing tool, availability of, 1079
publishers of games, 13
publishing games, 20–21
puzzle and maze games, 6–7
QA (Quality Assurance) specialist, role of, 20. See also testing games
Racing Demo controls, 407–408
rain
boxWidth, 822
datablock, 822
doCollision, 822
dropSize, 821
dropTexture, 820
maxMass, 822
maxTurbulence, 822
Precipitation datablock, 820
Precipitation object declaration, 821–822
rotateWithCamVel, 822
soundProfile, 821
splashMS, 821
splashSize, 821
splashTexture, 820
turbulenceSpeed, 822
useTrueBillboards, 821
useTurbulence property, 822
raster versus vector images, 372–373
Realm Wars Development site, 1072
Real-Time Strategy (RTS) games, 10
Rectangular Selection tool, using, 471
reflective textures, using, 482–483
relational operators, symbols for, 84
rendering 3D models
bump mapping, 128
environment mapping, 128
faces, 124
fake phong shading, 126
flat shading, 124
gouraud shading, 125
Lambert shading, 125
mipmapping, 129
normal mapping, 130
parallax mapping, 130
phong shading, 126
process of, 123–124
shaders, 127–128
specular maps, 126
texture mapping, 126–127
See also 3D models
replicators, benefit of, 727
retail tools
3D Studio Max, 1080
3D World Studio, 1080
Adobe Photoshop CS5, 1080
BodyPaint 3D, 1080
Corel Paint Shop Pro, 1081
Deep UV, 1081
Maya, 1081
Poser, 1081
See also game development tools
Return to Tubettiworld (RTTW), 416–417
Rev racing sim, Luma Arcade, 9
rigging
head, 632
skeleton, 632–637
torso, 633–637
River Editor, described, 911
Road Editor, described, 911–912
rock model
creating, 715–718
testing, 718
role-playing games, 5–6
root character animation, described, 569, 625
root main module, 166–172
callback functions, 170
control code modules, 172
core code, 172
dedicated server, 274–275
finding add-ons, 171
Help information, 171
initializations section, 170
in-line program statements, 171
LoadAddOns routine, 171
loading add-ons, 172
log mode, 170
OnStart, 172
ParseArgs function, 171
stub routines, 171
Usage function, 171
$usageFlag, 171
root main module, location of, 160, 162
root main.cs module, 167–170
root package, functions of, 166
Rotate Tools options, accessing in Gimp, 471
rotation
programmed, 142–143
writing, 120–121
rotation angle, reading, 139
RTS (Real-Time Strategy) games, 10
RTTW (Return to Tubettiworld), 416–417
run animation, 569, 625, 641–645, 654
runabout
making car go, 952–953
as mountable vehicle, 948–952
scaling nose of, 689
sketch of, 678
testing, 703–705
WheeledVehicleData properties, 949–951
See also vehicle model
runabout skin, testing, 415–416
runabout skinning procedure
Air Brush tool, 412
editable anchors, 411
editing path, 410
fender thingies, 414–415
Fill Bucket, 410–411
Layers dialog box, 408–409
Paintbrush tool, 412
racing stripe, 413
rearranging layers, 411
tracing cab roof, 410
rustler sounds
GoAhead, 863–864
hearing, 863
message handler, 862
serverPlay3D, 862
StartRustle message, 862
saving
key bindings, 869
source art, 360–361
texture files in Gimp 2, 360–366
scale operation, writing, 120
scaling, programmed, 143–144
scene graphs, 131–133
example of, 132
group nodes, 132
nodes, 131
scenery, Ground Cover object, 732–739
scenery elements, placing, 727. See also Forest Editor
CheckProgress, 960
commandToClient, 961
DoScore, 960
DoScores, 961
laps and checkpoints, 958–961
methods, 958–960
money, 961–964
ResetCPs, 960
ScoreBox, 961
UpdateLap, 960
variables, 958
scoutroot animation sequence, described, 625
screen.cs module, 209–211
scripts
debugging with trace, 173–175
use of, 23–24
See also core script functions
scripts file, contents, 281
scroll bar widgets, 435
scrolling lists, using GuiScrollCtrl class with, 444–446
segmented-mesh model, using, 570
Selection tools, using in Gimp Toolbox, 383
semicolon (;), meaning of, 73
Serious Games, 11–12
server, control/server.cs module, 184–187
server code
collision, 943–945
creating triggers, 953–956
deaths, 967–968
dismounting, 946–947
Hero model, 939–943
improving, 965–966
kills, 968
making car go, 952–953
mounting, 945–946
player spawning, 935–938
scoring, 957–968
triggering events, 953–956
vehicle datablock, 948–952
vehicle model, 948
vehicle mounting, 939
server module, 292–297
AddToServerGuidList, 298
CreateAndConnectToLocalServer, 297
CreateServer, 297
DestroyServer, 297–298
InitiBaseServer, 297
OnServerInfoQuery, 298
PortInit, 297
ResetServerDefaults, 298
server versus client design, 165
servers
ARMA series, 259
dedicated, 1006–1007
Delta Force series, 259
GameSpy, 259
hosted, 1006
master, 259
Tribes series, 259
See also client/server networking; dedicated servers; EMAGA6 game
ServerScreen code module (client), 269–273
Cancel, 272
Close, 272
Join, 273
onServerQueryStatus, 273
onWake, 271
queryLAN, 271
QueryLANServers, 271–272
Update, 273
ServerScreen interface module (client), 262–267
GuiScrollCtrl, 268
GuiTextEditCtrl, 268–269
interface definition, 267
QueryStatus, 269
Setup screen, accessing, 869
shaders
pixel, 128
using, 127–128
vertex, 128
shading objects, 125
Shape Editor
described, 912
using to check Hero model, 655–656
Shape Primitives approach, using, 570
shapes, connecting vertices, 118
side character animation, described, 569, 625
sidewalk texture
creating, 354–358
photography source for, 465–466
simulator games, 8
singleton keyword
versus datablock and new, 160
using with objects, 156–157
sitting animation sequence, described, 625
sizeshape.cs program, 143
skeleton
abdomen vertices, 634
bending at spine, 636
biped, 630–631
building, 627–631
chest vertices, 635
child nodes, 628
labeled nodes, 628
order of nodes, 629
pose adjustments, 630
replacing, 658–659
rigging, 632–637
rotating joints, 629
rotating leg bones, 635–636
selecting joints, 627
testing nodes, 635
unlink node, 627–628
Sketch tool, using, 910
ski nodes, explained, 631
skins
creation process, 392–394
defined, 391
dune buggy, 407
tommy gun, 748–749
UV unwrapping, 391–392
See also Hero skin; player skin; soup can skinning procedure; textures
sky texture, creating, 345
skyboxes
adding to scenes, 798–799
adjusting for perspective, 799–800
creating images for, 793–798
distorted image, 791
drawBottom, 801
drawing clouds on horizon, 793–798
edge distances, 791
exploded, 790
face adjustments, 797
fogBandHeight, 801
FOV (Field of View), 792–793
image with gradient, 796
images on faces of, 789
inside faces, 790
Material property, 801
perspective, 791
pictorial, 789
predistorted image, 792
preparing to make gradient, 795
properties, 801
removing distortion, 792
rendering images, 796–797
resolution, 792–793
using, 790
Warp tool, 799–800
slash (/), using, 141
Smudge tool, using in Gimp Toolbox, 383
solid tree
creating, 720–726
testing, 720–726
SoloScreen client interface, 972–974
adding comments, 987
braces and indenting, 987
findFirstFile, 987–988
getMissionDisplayName, 988
level information while loading, 988–989
statement context, 985–986
syntax, 985
sop can skin, testing, 406
sound, use of, 27. See also 3D audio; Audacity; player sounds
sound and music. See Koob game
Sound Emitter, using, 889–891
sound processing tools
Audacity, 1079
SoundEdit Pro, 1079
SoundEdit Pro, availability of, 1079
soup can example
bottom vertices, 526
center vertex, 527
components of, 392–394
enhancing with MilkShape 3D, 526–529
lid open, 528
shaping in MilkShape 3D, 520–523
unwrapping in UVMapper, 523–525
UV Unwrapping tool, 393
soup can skinning procedure
adding text, 405–406
Blend tool, 402
concentric crawling ants, 402
Ellipse Select options, 400–401
filled rectangle, 397
Gaussian Blur dialog box, 399
gradient fill, 401–402
lid after concentric ring, 404
metal lips, 400
New Layer dialog box, 395
Radial gradient, 403
rectangular selection, 396
saving mycan.xcf, 401
selecting mapped sides, 398
selection, 404
selection circle, 401
white rectangle, 397
See also skins
source files, .cs extension for, 161
SourceForge.net Web site, 1076
space append macro, symbol for, 72
spamming chat window, 303
specular maps, using, 126–127
spine, bending at, 636
sports games, 9
Standard Male Character
concept artwork, 418
eye detail, 422
face and neck, 423
flesh tone, 419–420
Hilite template, 420–422
prototype, 416–417
UV template, 419
viewing, 432
See also Hero model
standjump animation sequence, described, 626
statements
examples of, 62–63
expressions, 63
inline, 150
naked, 150
Steering Behaviors for Autonomous Characters, 1076
Step Over button, using, 103–104
stone bridge
brush face, 778
building in Constructor, 774–779
Floor_set_stone texture, 777
Oblong brush, 774
with pylons, 776
scaled face texture, 778
storms
grid setup, 817
lightning, 818–820
materials, 817
rain, 820–822
rain image file, 817–818
setting up sound, 811–817
See also water
strategy games, 9–11
string append operator, symbol for, 72
string formatting codes, 1016
string relational operators, symbols for, 84
strings
in TorqueScript, 154–155
structure of games
core code, 161
EMAGA4 game folder tree, 164
folder hierarchy, 162–163
game root folder, 160
source files, 161
See also EMAGA4 game; TorqueScript
structures
creating with CSG tools, 769
CSG (Constructive Solid Geometry) modeling, 754–757
defined, 753
subtract operator, symbol for, 72
Sun Mission object
ambient, 805
azimuth, 804
canSave, 803
canSaveDynamicFields, 803–804
color, 805
coronaEnabled, 805
elevation, 804
locked, 803
properties, 802
setting at sunrise, 804
support forums, use of, 29
switch statement
versus if-else, 94
using, 93–95
system requirements
Apple-based, xxii
Windows, xxii
T3Ddemo.exe executable, 162
tab append macro, symbol for, 72
TER files, importing, 505
Terrain brush, using, 827–828
terrain data
DEM (Digital Elevation Model), 488
DTM (Digital Terrain Model), 488
Terrain Editor
Action toolbar, 908–909
Settings toolbar, 908
toolbar functions, 829
terrain height maps, importing, 502
Terrain Material layer, creating, 736–739
terrain material, using, 732
Terrain Materials Editor, using with height maps, 503, 511–512
terrain modeling
height maps, 489–490
terrain surface, 490–491
textures, 491
tiling, 492–494
See also textures
features of, 909
Settings toolbar, 910
using, 509
terrain sizes, establishing, 506
terrains
auto-generating, 732–739
blocks, 485–486
characteristics, 485–488
checkerboard texture, 508
detail map texture, 510
diffuse map texture, 510
fidelity, 486–487
freedom, 486–488
grid texture, 508
Material Selection panel, 510
“painting”, 507–513
spread, 486–487
tiles, 485–486
WU (world unit), 494
See also height maps
test harnesses, creating, 1005
testing games
play testing, 1005
regression, 1004–1005
steps, 1001
See also QA (Quality Assurance) specialist
testing tool chain
explained, 612
modeling work flow, 613
steps, 614–615
text adventures, evolution of, 4
text editing tools
PS-Pad, 1079
Torsion, 1079
text editors, features of, 41–42. See also Torsion text editor
text strings, entering manually, 447–448
Text tool
Antialiasing option, 390
Color option, 390
Font option, 390
Hinting option, 390
Indent option, 390
Justify option, 390
Letter Spacing option, 390
Line Spacing option, 390
Path from Text, 390
Text along Path option, 390
text values, displaying 2D arrays for, 446–447
texture artist, role of, 19
texture files, saving in Gimp 2, 360–366
texture types
fabric, 482
irregular, 478
metallic, 482–483
patterned, 481
pebbled, 479–480
plastic, 482–483
reflective, 482–483
rough, 478–479
smooth, 480–481
woodgrain, 480
textures
BasicCloud object, 808–810
Bell 47 Helicopter, 347
checkerboard for terrains, 508
clouds, 345–346
default, 769
detail map, 510
diffuse map, 510
grid for terrains, 508
managing in Constructor, 773
sky, 345
structure through definition, 343–344
terrain accents, 345–346
use of, 26–27
using, 343–349
vehicle detail and structure, 347–348
water, 345
weapon detail, 346–347
wood, 351–353
See also Gimp 2 image processing tool; skins; terrain modeling
textures for structures
artwork (original), 472–473
color matching photos, 466–468
cropping photos for textures, 469–470
lighting for photos, 466–468
photography as source, 464–472
scaling, 473–474
sources, 464–472
tiling, 475–478
uses of, 463
ThinkTanks PPOV action game, BraveTree Productions, 4
Third-Person Point-of-View (3rd PPOV) games, 3
tilde (~) symbol
meaning of, 72
using, 61
tiles, use in terrains, 485–486
tiling terrain surfaces, 492–494
tokens, 1016
tommy gun
barrel and forestock faces, 742
completing, 750
extrusion, 745
metal body faces, 743
model, 740–747
muzzle faces, 742
nodes, 747
remapped view, 749
rotating, 747
script, 750
shoulder stock faces, 743
shrinking, 746
sketch, 740
skinning, 748–749
technique, 739–740
testing, 749–750
Texture Coordinate Editor, 748
vertices, 741
tommy gun sounds
ammo boxes, 880–881
audio profiles, 875
creating, 871–875
model, 879
NoAmmo state, 875
pointers, 875
Preactivate state, 875
preparation, 871
properties, 875
repositioned gun, 880
Scripted Weapon view, 878
ShapeBaseImageData datablock, 875
state handler, 875
state machine, 875–876
testing, 876–882
WeaponImage namespace, 875
Z-axis label, 879
See also player sounds
Toolbox utility, 38
Torque 3D
3D rendering, 32–33
animation and shapes, 34
animations, 568–569
Apple-based users, 37
bandwidth problem, 34–35
bitmap file types, 32
byte code, 166
console, 30–31
Control class, 32
control flow, 30
core script functions, 1043–1070
directories and folders, 16
event procession functions, 30
extrapolation, 35
graphics, 32
GUI library, 32
home site, 1071
input model, 31
installing, 36–38
interpolation, 35
latency, 35
massive multiplayer support, 898
modeling tool chain, 568
modifying and extending, 1008–1009
naming conventions, 16
networking, 34–35
packet loss, 35
platform layer, 30
prediction, 35
Profile class, 32
resource manager, 31–32
shapes and animation, 34
simulation, 31
terrain library, 33–34
texture manager, 32
Toolbox utility, 38
use of, 35–36
utility functions, 32
World Editor, 134–139
Torque Constructor program, 753–754
bridge model, 774–779
Browse button, 769
brushes selection mode, 775
checking dimensions of brushes, 775
CSX versus MAP format, 765–766
Cube brush, 766–768
Cube test object, 773
default texture, 769
directory structure, 759
downloading, 757
Escape key, 770
forms, 761–764
house model, 779–786
installing, 758
main screen, 758–760
managing textures, 773
Materials form, 764
menu bar, 763
modifying brushes, 775
Oblong brush, 774
OSX Graphite theme, 763
palettes, 761
Planer Scale button, 784
Preferences form, 762
Properties form, 764
relighting scenes, 772
resizable forms, 759–762
Scene form, 763
scenes, 765
selection modes, 781
Selection Modes form, 764
Size Bounds button, 784
Texture Browser, 770–771
tool chain, 765–773
toolbars, 761
Values form, 764
View forms, 764
window, 785
Torque GUI Editor. See GUI Editor
Torque objects
applying materials to, 366–369
restoring textures, 370
selecting in World Editor, 368
Skywalk, 367
See also objects in TorqueScript
Torque Racing Demo controls, 407–408, 706
Torque Toolbox, launching World Editor, 366
Torque-related Web sites, 1071–1072
TorqueScript
ActionMaps, 183
ASCII characters, 155
break keyword, 65
carriage return character, 155
case keyword, 65
versus C/C++, 56
client, 178–184
code fragment, 23–24
color code for strings, 155
color table, 155
continue keyword, 65
control main, 172–175
control subtree, 166
core subtree, 165
datablock keyword, 65
datablocks, 159–160
debugging scripts with trace, 173–175
default keyword, 65
defining code blocks in, 50–51
display color, 155
do keyword, 65
else keyword, 65
engine-sourced console constants, 1040–1042
engine-sourced console variables, 1024–1039
engine-sourced preference variables, 1018–1023
false keyword, 65
features of, 153–154
folder hierarchy, 162–163
for keyword, 65
foreach keyword, 65
function keyword, 65
identifier rules for variables, 64
if keyword, 65
initialization, 175–177
Move Manager variables, 1017
new keyword, 65
newline character, 155
object type masks, 1011–1012
objects, 155–159
operator precedence, 1015
player, 188–191
return keyword, 65
root main module, 166–172
root package, 166
scope prefixes, 56
server, 184–187
singleton keyword, 65
string formatting codes, 1016
strings, 154–155
switch keyword, 65
tab character, 155
tokens, 1016
true keyword, 65
typeless aspect of, 56
while keyword, 65
See also game structure
Torsion text editor
adding skybox to scene, 798–799
assigning variables to be watched, 47–48
auto-complete feature, 51–52
availability of, 1079
Base Directory field, 45
bookmarks, 49–50
breakpoints, 48–49
Callstack debugging tool, 48, 102
code folding, 50–52
commands, 50
configuration field, 44
configuring, 42–43
creating projects, 44–46
echo of script console, 47–48
editor panel, 47
features of, 41–43
Find Results tab, 49
hard drive browser dialog, 45
Hello World script, 57–58
IDE (Integrated Development Environment), 43, 53
interface, 46–49
keyboard shortcuts, 50
launching, 44
locating game folders, 45
“meatball,” 49
menus, 46
Output tab, 47
panels, 46–47
Project tab, 46
setting up, 42–43
Show All Mods button, 46
syntax highlighting, 51–52
tool tips, 46
toolbar, 46
viewing project contents, 46
warning about hidden files, 42–43
Watch tab, 47–48
See also debugging with Torsion; text editors
torso for Hero model
ab cylinder relative to chest, 587
ab vertices, 588
aligned vertices, 593
back vertices, 587
chest and ab vertices, 592
comparing with hand, 608
completing, 594
cylinder caps, 585
cylinder shapes, 583–584
dragging cap vertices, 589
dragging vertices, 590
Front view layout, 590
hiding chest vertices, 588
integrating arms to, 610–612
matching head to, 594–596
positioning head mesh, 583
rigging, 633–637
selecting and hiding vertices, 591
shoulder socket vertices, 597
snapping to grid, 592
sternum vertices, 586
top center cylinder vertex, 591
totalizers, using, 74–75
trace function, debugging scripts with, 173–175
transform operations, selecting, 931
transformation
applying in order, 122
changing order of, 122–123
explained, 120
full transformation, 122–123
rotation, 120–121
scaling, 120
translation
applying to objects, 121–122
direct movement, 134–139
echo(), 138
identifying objects, 134–139
octahedron, 135–137
opening console, 138–139
programmed movement, 139–142
programming, 134–142
rotation angle, 139
spawn sphere, 138
specifying vectors, 122
StaticShape class, 139
transparency and translucency, 373–377
tree scenery, painting, 728
trees
complexity, 719
Forest Editor, 720
forests, 720
interacting with, 719
solid tree, 720–726
Trial Trouble 3D RTS game, Oddlabs, 9
triangles, referring to, 118
Tribes series, 259
trigger handler, defining, 251–252
triggering events on server side, 953–956
adding checkpoints, 956
datablock declaration, 954
OnEnterTrigger, 954
OnLeaveTrigger, 954
OnTrigger, 953
placement, 954–955
triggers
animation, 250
area, 250
player event control, 250–251
weapon state, 250
trousers, creating for Standard Male Character, 430
Tube Twist puzzle game, 21–6 Production, 8
TubettiWorld, main screen of, 25
turnshape.cs program, 142
TwotyFruity.cs function, 79–81
underscore (_), using with identifiers, 64
unifiedShell case folder, contents, 281
University of Ontario Institute of Technology, 1073
unlink node, explained, 631
unmounting and mounting server code, 945–947
utterances
creating, 866–869
death sounds, 869
HurlInsult message, 867
message from client to server, 867
pain sounds, 869
ReferenceDistance, 867
serverCmdHurlInsult message handler, 867
SFXProfiles, 868
UV Coordinate Mapping, 392
UV mapping
Cylindrical Cap method, 558, 562
UVMapper tool, 1079
UV unwrapping, 391–393
UVMapper program
availability of, 1079
BMP export options, 525
features of, 551
File menu, 553–554
hot keys, 557
OBJ export options, 524
UVMapper.exe, launching, 523
variables
$ (dollar sign), 65
% (percent sign), 66
arrays, 67–70
assigning values to, 65
defined, 64
as flags, 146
global scope, 65
identifier rules, 64
keywords, 64–65
scoping prefix, 65–66
strings, 70–71
type characteristic of, 56
underscore (_) symbol, 64
vector triplet notation, applying to objects, 122
vector versus raster images, 372–373
vehicle body
adding width to body, 686
aligning vertices, 688
centering Front view, 692
duplicating copies, 688
extruding body faces, 687
extrusion, 686
faces, 683–685
moving copies, 688
overlapping faces, 685–686
placing vertices, 681
scaling bottom rows, 690
scaling tail, 691
shaping Front view, 692
vertex order for faces, 682
Vertex tool, 680
vehicle model
collision meshes, 701–703
fenders, 693–698
mount nodes, 698–701
Side view, 678
sketch, 678–679
skins, 701
Top view, 678–679
wheels, 703
See also runabout
vehicle mounting, 939
vehicle skin
dune buggy, 407
runabout, 408–416
vehicle sounds
creating, 882–888
dismounting car, 887
eject, 888
engineSound, 885
impact properties, 885
inserting car in game world, 888
jetSound, 885
mounting car, 887
recording effects, 882
squealSound, 885
wheelImpactSound, 885
vertex shaders, using, 128
visual artist, role of, 18–19
walk character animation, 569, 625
water, forms of, 810. See also storms
Water Blocks, described, 822–823
described, 822–823
example of, 823–824
length and width, 824
properties, 825–826
water texture, creating, 345
waterfall example
particle system datablocks, 920, 924–926
Weapon module, EMAGA5 game, 227–231
weapon sounds, creating, 869–870
weapon state triggers, 250–251
weapons, creating, 740
Web sites
game development, 1072–1076
Torque-related, 1071–1072
use of, 28
wheels, creating for vehicle model, 703
while loop, using, 76–77
widgets, explained, 435
Windows, warning about hidden files, 42–43
Windows 7 game platform, 14–15
APIs (Application Programming Interfaces), 14–15
Direct3D, 14–15
OpenGL, 14–15
Windows Explorer, locating files in, 60
wood texture, creating, 351–353
woodgrain textures, using, 480
world building. See particles
World Camera
switching between Player Camera, 915
using with height maps, 501
World Editor
launching, 366
loading in Torque, 135
movement and action keys, 136
moving player in, 367
navigating, 135
selecting object in, 368
World Editor menus
Editors, 902
File, 900–901
Help, 903
Lighting, 902–903
world space, defining, 114
WormyFruit.cs program, 105–108
Wotsit’s Format Web site, 1076
WU (world unit), using with terrains, 494
Wyand, Dave, 753
XCF native format, saving files in, 372
XYZ-axis system, explained, 112, 114–115
Yacketta, Ron, 753
ZBrush 3 tool, cost and availability, 1082
Z-flat shading technique, 124
18.226.34.25