3D Game Programming

(C. Jardin) #1
points bonuses, 201
purple fruit monster
game, 139
river-rafting game, 189
scoreboard, 100 , 174 ,
181 , 276
solar-system project, 119
sound, 277
tilt-a-board game, 155–
156
wiggling animation in
fruit-hunt game, 103
torus, see donuts
Toy Story, 125 , 162
tree_with_treasure, 101
trees
boundaries, 94–98
creating, 40–43
fruit-hunt game, 99–107,
234–240
triangle errors, 19
troubleshooting, see also er-
rors
code, 19–23
freeze-ups, 14 , 23 , 120
tubes, see cylinders
Tumblr, posting to, 212–215
turn(), 80–84
Tween
about, 273
jumping animation in
fruit-hunt game, 104
spinning avatar anima-
tion, 82
wiggling animation in
fruit-hunt game, 102 ,
274

U
uncommenting, 135
“undefined is not a function”
error, 21

undefined things, 68 , 155
underscores in dirtyPosition, 149
update(), 83
updateCamera(), 197
updateMatrixWorld(), 205
updateScore(), 201

V
var keyword
about, 68
bunching variables with,
122
variables
bunching, 122
geometry, 71–72
keyword, 68 , 122
numbers, 69
vectors, 96 , 137
velocity, 138 , 170 , 197
vertices, pulling corners, 193

W
walking animation, 61–66
waning moon, 132
warping shapes, 189–193
water, creating for river-raft-
ing game, 193
wave amplitude and frequen-
cy, 193 , 205 , see also co-
sine; sine
waxing moon, 132
web browsers
about, 208–212
aspect ratio, 87 , 214
choosing, xv, 2
freezing, 14 , 23 , 120
publishing code, 207–215
scene renderers, 88–89
web hosting
companies, 209 , 212

publishing code, 207–215
Tumblr example, 212–
215
web pages, see also HTML
about, 208–212
changing with Java-
Script, 78
web servers
Internet requests and,
208
public availability, 209
WebGL
renderer, 89
switching to, 111
testing for, xvi, 111 , 146
while, 74 , 120
white and specular colors,
112
wiggling animation in fruit-
hunt game, 102
Wikipedia color list, 43 , 110
wireframing, 154
WordPress, 212
worker for physics, 134 , 147
world coordinates, 205

X
X errors, 19 , 86
x_diff, 122

Y
y_diff, 122
yellow-triangle errors, 19

Z
zero
approximating, 72
counting from, 180–181
deselecting gravity with 0
constant, 151

Index • 287


Prepared exclusively for Michael Powell

Free download pdf