Index

Symbols

2D graphics

characters, 54

isometric tile maps, 38-39

maps, 35-36

rendering, 20-22

scrolling, 30-34

sprites, 22-23

animating, 25-28

drawing, 23-25

sheets, 28-29

tile maps, 36-37

3D graphics

cameras. See cameras

coordinate systems, 56-57, 67

converting, 298

homogenous coordinates, 68

model spaces, 67

projection spaces, 74-76

transforming 4D vectors by matrices, 69

view/camera spaces, 72-73

world spaces, 68-72

lighting/shading, 76-83, 85

colors, 76

Phong reflection models, 82-83

vertex attributes, 77-79

object representations, 91

overview of, 66

polygons, 66

sound, 115-119

vectors, 42, 60-61

visibility, 85-87

world transforms, 88-90

4D vectors, 42, 69

5.1 surround sound systems, 118

A

AAA titles, 4

A* algorithm, 189-192

absolute coordinates, 218, 298

abstract syntax tree. See AST

accelerometers, 106-108, 293

accounts, GitHub, 311

adding

breakpoint conditions, 307

watches, 306-307

addition

matrices, 58

vectors, 43-44

addresses

ping, 245

protocols. See protocols

admissible heuristics, 184-185

advantages

game state cheats, 256

hosts, 253

AI (artificial intelligence)

pathfinding, 180-192

planning/strategies, 198-200

state-based behaviors, 192-198

strategies, 298

types of, 180

AIController class, 195

aiming reticules, 211-212, 298

algebra

matrices, 58

addition/subtraction, 58

inverse, 60

multiplication, 59-60

scalar multiplication, 58

transforming 3D vectors, 60-61

transposes, 60

solutions, 290-291

vectors, 42-43

addition, 43-44

coordinate systems, 56-57

cross products, 51-53

dot products, 48

length, 45-46

linear interpolation, 55-56

reflection, 50-51

rotating 2D characters, 54

scalar multiplication, 47

subtraction, 44-45

algorithms

A+, 189-192

Bresenham’s line-drawing, 66

cameras, 175-178

culling, 88

Dijkstra’s, 192, 297

greedy best-first, 185-189

instantaneous collision detection, 141, 295

occlusion, 88

painter’s, 23, 85-86, 289, 292

pathfinding, 180-192

Rubine, 106, 293

ambient components, 82

ambient light, 80, 292

analog

filtering, 97, 293

input devices, 97-99

analysis

code

side scrollers, 262-267

tower defense games, 273-284

lexical, 230

syntax, 232-233

Angry Birds Space, 33

angular mechanics, 153

AnimatedSprite class, 26

animating sprites, 25-28

AnimFrameData structure, 26

AppDelegate class, 263

application debuggers, 304

breakpoints, 305-307

call stack windows, 307

data breakpoints, 308

watches, 306-307

applying

GitHub clients, 311-312

multiple transforms, 71

apps, mobile phones, 33

arbitrary convex polygons, 133

arbitrary points, planes, 295

arcade versions, 6

areas, nodes, 296

arrows, waypoint, 208-211, 298

artifacts, 66

Artificial Intelligence and Interactive Digital Entertainment (AIIDE) conference, 198

artificial intelligence. See AI

ASCII characters, 299

aspect ratios, 163

Assassins Creed: Revelations, 4

AST (abstract syntax tree), 232

Atari, 2-3

attacks, man-in-the-middle, 256-257, 301

attitudes, 108

Audacity, 112

audio

3D sound, 115

emitters/listeners, 116-118

falloff, 118

surround sound, 118-119

Doppler effects, 122-123

DSP, 119-122

obstruction, 123

sound

cues, 112-115

occlusion, 123

source data, 112

augmented reality games, 293

automating edges, 182

axis-aligned bounding boxes, 132, 135-136, 295

B

back face culling, 79

backgrounds, parallax scrolling, 32-34

Backus-Naur Form. See BNF

basic sounds, 112

sound cues, 112-115

source data, 112

basis vectors, 57

behaviors, state-based, 192-198

design patterns, 196-198

finite state machines, 193-194

state machines, implementing, 195-196

bidirectional reflectance distribution function (BRDF), 82

binary files, 235, 300

binary formats, 236

binary spatial partitioning. See BSP

binding, native, 227

BioShock, 163

BioShock: Infinite, 221

bit depth, 76

bitfield, 250

BNF (Backus-Naur Form), 232

bounding spheres, 131

branches, 310

BRDF (bidirectional reflectance distribution function), 82

breakpoints

conditions, 307

configuring, 304-305

data, 308

Bresenham’s line-drawing algorithm, 66

BSP (binary spatial partitioning), 88, 148

buffers

colors, 21-22, 289

double buffering, 22

z-buffering, 86-87, 292

bugs, issue tracking, 313

Bugzilla, 313

builds, Release, 306

bullet through paper problem, 141

bullet time, 10

Burnout, 160

Bushnell, Nolan, 2

buttons, menus, 205-206

C

calculating

force, 151

frames, 27

length, 45-46

points, 177

Call of Duty, 217

call stack windows, 307

cameras, 158

algorithms, 175-178

cutscene, 161

_Defense, 279

first-person, 159-160, 170

fixed, 158

follow, 160-165

implementing, 164-175

non-player controlled, 158

orbit, 168-170

perspective projections, 161-163

positioning, 296

spaces, 72-73

splines, 172-175, 296

spring follow, 165-168

capsules, 133

Carmack, John, 46-47

Cartesian coordinate spaces, 67

case studies, World of Warcraft, 239-241

cathode ray tubes. See CRTs

Catmull-Rom splines, 173, 296

CCD (continuous collision detection), 141

central processing units. See CPUs

ChangeAnim function, 27

change of basis matrix, 57

channels, LFE, 118

characters

2D, rotating, 54

ASCII, 299

NPCs, 180

cheats, 255

game state, 256

information, 255-256, 301

man-in-the-middle attacks, 256-257

chords, 94, 293

Chrono Trigger, 3

Civilization, 181

C language, 2

C# language, 270-272

classes

AIController, 195

AnimatedSprite, 26

AppDelegate, 263

encapsulation, 271

Enemy, 265

Game, 274

GameObject, 276-277

GameplayScene, 263

GameState, 275

MainMenuLayer, 263

ObjectLayer, 266-267

Pathfinder, 278

Projectile, 265

ScrollingLayer, 264

Ship, 265

Singleton, 274

Timer, 278

clicks, mouse, 100

clients, 300

diff/merging tools, 312

Git, 310-312

predication, 252

server/client models, 250-253

closed sets, 186

cocos2d, 262

code. See also languages

analysis

side scrollers, 262-267

tower defense games, 273-284

debuggers, 304

breakpoints, 304-307

call stack windows, 307

data breakpoints, 308

watches, 306-307

duplication, 293

executing, 233-234

letter key, 298

scripting languages, 224

implementing, 229-234

Lua, 227

tradeoffs, 224-225

types of, 225-226

UnrealScript, 227-228

visual scripting systems, 229

source control, 310. See also source control

coefficient of restitution, 147

collisions

cameras, 175-176

detection, 134

axis-aligned bounding box intersection, 135-136

line segment versus plane intersection, 136-137

line segment versus triangle intersection, 138-139

optimizing, 147-148

responses, 146-147

sphere intersection, 134

sphere versus plane intersection, 140

swept sphere intersection, 141-145

geometry, 130-134

colors, 76

buffers, 21-22, 289

resolution, 20

column-major vectors, 61

Company of Heroes, 227, 255

components

ambient, 82

diffuse, 82

specular, 83

w-components, 68

compressors, 120

Computer Space, 2

conditions

breakpoints, adding, 307

hit count, 307

configuring

breakpoints, 304-305

conditions, 307

data, 308

_Defense, 273

source control, 309

Git, 310-312

SVN, 309

watches, 306-307

conjugate of quaternions, 90

connections

peer-to-peer, 253-254

server/client models, 250-253

TCP, 246. See also TCP

UDP, 249. See also UDP

consoles, 9, 288

ConstructPlan function, 199

continuous collision detection. See CCD

control

flow

game loops, 5

multithreaded, 7-8

objects in game loops, 13-15

phases of game loops, 5-7

source, 309

Git, 310-312

SVN, 309

converting

3D coordinates, 298

coordinate systems, 56

vectors, 46

convexes

hulls, 133

polygons, 121, 294

coordinate systems, 56-57

3D, converting, 298

absolute, 218, 298

coordinate spaces, 67, 291

model spaces, 67

projection spaces, 74-76

view/camera spaces, 72-73

world spaces, 68-72

homogenous coordinates, 68

textures, 77

UV, 78

CPUs (central processing units), 7

Crane, David, 3

crashes, issue tracking, 313

Crazy Taxi, 208

cross products, 48-53

CRTs (cathode ray tubes), 20-21

Crysis, 2

cues, sound, 112-115, 294

culling

algorithms, 88

back face, 79

cutscenes, 161, 296

cycles, development, 2

D

Dabney, Ted, 2

data breakpoints, 308

data formats, 235

binary, 236

INI, 236-237

JSON, 238

tradeoffs, 235-236

XML, 237

dBs (decibels), 118, 294

dead zones, 97

debuggers, 304

breakpoints, 304-308

call stack windows, 307

watches, 306-307

decibels, 118, 294

dedicated servers, 253

_Defense, 270

C# language, 270-272

code analysis, 273-284

exercises, 284-285

MonoGame, 273

XNA, 272

delta time, 10-12, 288

depth

bit, 76

buffers, 86

design, 196-198. See also configuring

Design Patterns, 196

detection, collision, 134

axis-aligned bounding box intersection, 135-136

line segments

versus plane intersection, 136-137

versus triangle intersection, 138-139

optimizing, 147-148

responses, 146-147

spheres

intersection, 134

versus plane intersection, 140

swept sphere intersection, 141-145

development, cycles, 2

devices

digital, 292

event-based input systems, 99-104

input, 94

analog, 97-99

digital, 95-97

mobile input, 105

accelerometers/gyroscopes, 106-108

touch screens, 105-106

Diablo III, 74

Diablo, 38

diamond problem, 14

diff tools, 312

diffuse component, 82

digital devices, 292

digital input devices, 95, 97

digital signal processing. See DSP

Dijkstra’s algorithm, 192, 297

dimensions

matrices

inverse, 60

multiplication, 59-60

scalar multiplication, 58

transforming 3D vectors, 60-61

transposes, 60

vectors, 42-43

addition, 43-44

coordinate systems, 56-57

cross products, 51-53

dot products, 48

length, 45-46

linear interpolation, 55-56

reflection, 50-51

rotating 2D characters, 54

scalar multiplication, 47

subtraction, 44-45

directional light, 81, 292

distance

Euclidean, 185

Manhattan, 184

documentation, issue tracking, 313

Doppler effects, 122-123, 294

Doppler shifts, 120

dot products, vectors, 48

double buffering, 22

doubly linked lists, 289

drawing

sprites, 23-25

vectors, 43

dropping frames, 12

DSP (digital signal processing), 119-122, 294

duplication of code, 293

E

echo packets, 245

edges, 181-182

effects

Doppler, 122-123, 294

DSP, 119-122, 294

electron guns, 289

elements, HUD, 207

aiming reticules, 211-212

radar, 212-217

waypoint arrows, 208-211

emitters, 116-118

encapsulation, 271

encryption, 257

Enemy class, 265

enumerations, keycode, 95

equality, vectors, 43

equations, parametric, 295

errors, operator precedence, 226

Euclidean distance, 185

Euler integration, 151-152

Euler rotations, 70, 292

event-based input systems, 99-104

events, 293

evolution of video game programming, 2

Atari era (1977-1985), 2-3

future of, 4-5

NES/SNES era (1985-1995), 3

Playstation/Playstation 2 era (1995-2005), 3

PS3/Wii/Xbox 360 era (2005-2013), 4

executing code, 233-234

exercises

Ship Attack, 267-268

tower defense games, 284-285

experience, UX, 221

expressions, regular, 231, 299

Extensible Markup Language. See XML

F

falloff, 118

Fallout, 38

field of view. See FOV

fields, vectors, 42

files

audio

sound cues, 112-115

source data, 112

binary, 235, 300

images, 28

INI, 236-237, 300

JSON, 113, 238

source control, 309

Git, 310-312

SVN, 309

text-based, 235

XML, 237

filtering

analog, 97, 293

low-pass filters, 120

finite state machines, 193-194

Fire script function, 101

first-person cameras, 159-160, 170

fixed cameras, 158

flat shading, 83

floating point numbers, 46-47

flow control, game loops, 5

multithreaded, 7-8

objects, 13-15

phases, 5-7

follow cameras, 160-168

force, 149-151

formatting. See also design

binary files, 300

data formats, 235

binary, 236

INI, 236-237

JSON, 238

tradeoffs, 235-236

XML, 237

_Defense, 273

side scrollers, 260

cocos2d, 262

code analysis, 262-267

exercises, 267-268

Objective-C language, 261

tower defense games, 270

C# language, 270-272

code analysis, 273-284

exercises, 284-285

MonoGame, 273

XNA, 272

four-way scrolling, 34

FOV (field of view), 76, 161-162

FPS (frames per second), 5, 289

frame buffers, 86

FrameData, 26

frames

calculating, 27

dropping, 12

limiting, 12

rates, 288

frames per second. See FPS

frameworks

cocos2d, 262

MonoGame, 273

XNA, 272

Fresnel acoustic diffraction, 123

Full Spectrum Warrior, 4

functions

ChangeAnim, 27

ConstructPlan, 199

Fire script, 101

getter/setter, 271

Initialize, 27

LoadLevel, 277

parametric, 129

SetState, 196

storing, 293

Update, 196

UpdateAnim, 27

UpdateInput, 101

G

Game class, 274

GameObject class, 276-277

GameplayScene class, 263

games

3D graphics, 66-76

AI

pathfinding, 180-192

planning/strategies, 198-200

state-based behaviors, 192-198

types of, 180

augmented reality, 293

cameras. See cameras

collision geometry, 130-134

data formats, 235-238

history of programming, 2-5

HUD elements, 207-217

linear algebra for

matrices, 58-61

vectors, 42-57

localization, 219-221

loops, 5, 288

multithreaded, 7-8

objects, 13-15

phases, 5-7

menus, 204-207

networked, 244. See also networked games

objects, 13, 91

protocols, 244-250

scripting languages, 224-234

side scrollers, 260-268

sound, 112-115

state, 256, 275

third-person, 117, 294

time, 9-12

topologies, 250-254

tower defense, 270-285

GameState class, 275

Gears of War, 183, 253

generating

code, 233-234

outputs, 5

geometry, collision, 130

arbitrary convex polygons, 133

axis-aligned bounding boxes, 132

bounding spheres, 131

capsules, 133

lists, 134

oriented bounding boxes, 132

gestures, 105-106

getter functions, 271

ghosts in Pac Man, 194

Git, 310-312

GitHub, 311-313

God of War, 158

Gouraud shading, 83, 292

GPS data, 108

GPUs (graphics processing units), 66

Grand Theft Auto III, 3

Grand Theft Auto IV, 4

graphical artifacts, 66

graphics

2D. See 2D graphics

3D. See 3D graphics

_Defense, 281

rendering, 7

graphics processing units. See GPUs

graphs, representing search spaces, 181-183

Grassmann products, 90

greedy best-first algorithms, 185-189

grids, matrices, 58

Grim Fandango, 227

guitar controllers, 94

gyroscopes, 106-108, 293

H

Halo, 255

handedness of coordinate systems, 52

hard-coding UI text, 298

Havok, 153

Havok Physics, 4

headers, 244-245

heads-up display. See HUD elements

heads (vectors), 43

head-tracking devices, 94

height, aspect ratios, 163

heuristics, 184-185, 297

history

of video game programming, 2

Atari era (1977-1985), 2-3

future of, 4-5

NES/SNES era (1985-1995), 3

Playstation/Playstation 2 era (1995-2005), 3

PS3/Wii/Xbox 360 era (2005-2013), 4

source control, 309

Git, 310-312

SVN, 309

hit count conditions, 307

homogenous coordinates, 68

hosts, advantages, 253

HTTP (Hypertext Transfer Protocol), 257

HTTPS (Secure HTTP), 257

HUD (heads-up display) elements, 207

aiming reticules, 211-212

radar, 212-217

waypoint arrows, 208-211

I

ICMP (Internet Control Messaging Protocol), 245-246, 300

identifiers, tokenization, 230

if statements, 31

image files, 28

implementing

cameras, 158, 164-175

algorithms, 175-178

cutscene, 161

first-person, 159-160, 170

fixed, 158

follow, 160-165

non-player controlled, 158

orbit, 168-170

perspective projections, 161-163

splines, 172-175

spring follow, 165-168

HUD elements, 207-217

menus, 204-207

scripting languages, 229-234

state machines, 195-196

impulse-driven systems, 120

infinite scrolling, 32

information cheats, 255-256, 301

INI files, 236-237, 300

Initialize function, 27

input

_Defense, 280

devices, 94

analog, 97-99

digital, 95-97

event-based systems, 99-104

lag, 8, 288

menus, typing, 206-207

mobile, 105

accelerometers/gyroscopes, 106-108

touch screens, 105-106

inputs, processing, 5

instantaneous collision detection algorithms, 141, 295

integration

Euler, 151-152

methods, 153

numeric methods, 295

semi-implicit Euler, 151-152

velocity Verlet, 152-153, 295

interfaces, 293. See also UIs

Internet Control Messaging Protocol. See ICMP

Internet Protocol. See IP

interpolation, 55-56, 117

intersections

axis-aligned bounding boxes, 135-136

line segment, 136-139

planes, 136-140

spheres, 134, 140-145, 295

triangles, 138-139

inverse matrices, 60

inverse square roots, 46-47

IP (Internet Protocol), 244-245, 300

isometric tile maps, 38-39

isometric views, 290

issue tracking, 313

Iwatani, Toru, 194

J–K

JavaScript Object Notation. See JSON

Jetpack Joyride, 30, 33

Jobs, Steve, 261

joysticks, 6. See also input

JSON (JavaScript Object Notation), 113, 238

key codes, 95, 298

KeyState value, 96

keywords, tokenization, 230

Kinect, 94

Kismet, 229

L

lag, input, 8, 288

Lammers, Susan, 194

languages

C, 2

C#, 270-272

Objective-C, 261

scripting, 224, 299

implementing, 229-234

Lua, 227

tradeoffs, 224-225

types of, 225-226

UnrealScript, 227-228

visual scripting systems, 229

XML, 237

Last of Us, The, 2

latency, 245

Legend of Zelda, The, 3, 35

length

vectors, 45-46

squared, 46

lerp. See linear interpolation

letter key codes, 298

lexical analysis, 230

LFE (low-frequency effects) channels, 118

libraries, XNA game, 272

lighting, 76, 79, 292

colors, 76

per pixel, 84

Phong reflection models, 82-83

shading, 83-85

vertex attributes, 77-79

limiting frames, 12

linear algebra

matrices, 58-61

vectors, 42-43

addition, 43-44

coordinate systems, 56-57

cross products, 51-53

dot products, 48

length, 45-46

linear interpolation, 55-56

reflection, 50-51

rotating 2D characters, 54

scalar multiplication, 47

subtraction, 44-45

linear interpolation, 55-56

linear mechanics, 149

line segments, 129-130, 136-139

listeners, 116-118, 294

lists of collision geometries, 134

LoadLevel function, 277

localization, 219-221, 280

local lighting models, 82

lockstep models, 301

logic as function of delta time, 10-12

look-at matrices, 72

loops, game, 5, 288

multithreaded, 7-8

objects, 13-15

phases, 5-7

Lord of the Rings: Conquest, 57, 117

loss, packets, 247

low-frequency effects. See LFE channels

low-pass filters, 120

Lua, 225, 227

M

machines, state

design patterns, 196-198

finite, 193-194

implementing, 195-196

macro strategies, 198

magnitude, 46. See also length

MainMenuLayer class, 263

Manhattan distance, 184

man-in-the-middle attacks, 256-257, 301

maps, 35-36

textures, 77

tiles, 35-39

marking regions, 121-122

mass, 149

math

matrices, 58-61

vectors, 43-53

matrices, 58

3D vectors, transforming, 60-61

4D vectors, transforming, 69

addition/subtraction, 58

inverse, 60

look-at, 72

multiplication, 59-60

rotation, 70

scalar multiplication, 58

scale, 69

transform, 69

translation, 70

transposes, 60

maximum transmission units. See MTUs

Max Payne, 10

mechanics

angular, 153

linear, 149

memory, 2

menus, 204

buttons, 205-206

stacks, 204-205, 298

typing, 206-207

merging tools, 312

meshes, 66

messages, Objective-C, 261

methods. See also functions

integration, 153

numeric integration, 295

partitioning, 148

metrics, 313

micro strategies, 198

middleware, 4, 153-154, 221, 288

mipmapping, 28

mobile input, 105

accelerometers/gyroscopes, 106-108

touch screens, 105-106

mobile phones, apps, 33

models

local lighting, 82

lockstep, 301

peer-to-peer, 253-254

Phong reflection, 82-83, 292

server/client, 250-253, 300

spaces, 67

monitors, CRTs, 20-21

MonoGame, 273

Moon Patrol, 33

Mountain Lion, 260

mouse clicks, 100, 293

movement, physics, 148

angular mechanics, 153

calculating force, 151

Euler/semi-implicit Euler integration, 151-152

integration methods, 153

linear mechanics, 149

variable time steps, 150

velocity Verlet integration, 152-153

MTUs (maximum transmission units), 247

multicore consoles, 9

multicore CPUs, 7. See also CPUs

multiplayer support, 5

multiple resolution support, 218-219

multiple transforms, applying, 71

multiplication

matrices, 58-60

order of, 291

vectors, 47

multithreaded game loops, 7-8

multi-touch, 105

N

Namco, 6

native binding, 227

navigating

accelerometers/gyroscopes, 106-108

HUD elements, 207

aiming reticules, 211-212

radar, 212-217

waypoint arrows, 208-211

menus, 204

buttons, 205-206

stacks, 204-205

typing, 206-207

touch screens, 105-106

near planes, 75

NES (Nintendo Entertainment System), 3

networked games

cheats, 255-257

protocols, 244

ICMP, 245-246

IP, 244-245

TCP, 246-249

UDP, 249-250

topologies, 250-254

NeXT, 261

nodes, 181

areas, 296

path, 182

scene, 262

non-player characters. See NPCs

non-player controlled cameras, 158

normalization, 46

normal to planes, 51

NPCs (non-player characters), 180

numbers

floating point, 46-47

matrices, 58

sequence, 250

numeric integration methods, 295

O

Objective-C language, 261

ObjectLayer class, 266-267

objects, 13

categories of, 289

game loops, 13-15

polygons, 66

representations, 91

sprites, 22-23

animating, 25-28

drawing, 23-25

sheets, 28-29

static, 13

types of, 13

obstruction, sound, 123

occlusion

algorithms, 88

sound, 123, 294

octets, 245

octrees, 148

Oculus Rift, 108

online multiplayer support, 5

OpenAL, 112

open sets, 186

operators

precedence errors, 226

tokenization, 230

optimizing collisions, 147-148

orbit cameras, 168-170

order

of multiplication, 291

winding, 78

oriented bounding boxes, 132

orthographic projections, 292

outputs, 5, 288

overdraw, 85

P

packets, 244

echo, 245

ICMP, 246

loss, 247

UDP, 249

Pac-Man, 3, 6-7, 194

painter’s algorithm, 23, 85-86, 289, 292

parallax scrolling, 32-34

parallelogram rule, 44

parametric equations, 295

parametric functions, 129

partitioning, 148

Pathfinder class, 278

pathfinding, AI, 180-192

path nodes, 182

patterns

design, 196-198

state design, 297

peer-to-peer models, 253-254

performance, TCP, 248

per pixel lighting, 84

perspective, projections, 74, 161-163

phases, game loops, 5-7

Phong

reflection models, 82-83, 292

shading, 84

physics

collision detection, 134

axis-aligned bounding box intersection, 135-136

line segment versus plane intersection, 136-137

line segment versus triangle intersection, 138-139

optimizing, 147-148

responses, 146-147

sphere intersection, 134

sphere versus plane intersection, 140

swept sphere intersection, 141-145

collision geometry, 130-134

_Defense, 280

line segments, 129-130

middleware, 153-154

movement, 148-153

planes, 128

rays, 129-130

PhysX, 153

picking, 176-178, 209, 296

ping, 245

pitch systems, 120-123

Pitfall!, 3

pixels, 20-21

planes, 128

arbitrary points, 295

intersection, 136-137, 140

near, 75

planning AI, 198-200

Playstation/Playstation 2 era (1995-2005), 3

points

calculating, 177

light, 81

polling systems, 99, 293

polygons, 66, 291

arbitrary convex, 133

convex, 121, 294

Pong, 192

ports, 248, 300

positioning

cameras, 296

vectors, 42

precedence, operator errors, 226

prediction, clients, 252

Prince of Persia: The Sands of Time, 10

processing

CPUs. See CPUs

inputs, 5

processors, history of, 2

products

cross, 48-53

dot, 48

Grassmann, 90

Programmers at Work, 194

programming

3D graphics

coordinate spaces, 67-73

homogenous coordinates, 68

overview of, 66

polygons, 66

projection spaces, 74-76

transforming 4D vectors by matrices, 69

evolution of, 2-5

game loops, 5

multithreaded, 7-8

objects, 13-15

phases, 5-7

objects, 13

time, 9-12

Projectile class, 265

projections

_Defense, 279

orthographic, 292

perspective, 161-163

projection spaces, 74-76

protocols, 244

HTTP, 257

HTTPS, 257

ICMP, 245-246, 300

IP, 244-245, 300

TCP, 246-249, 300

UDP, 249-250, 300

PS3 era (2005-2013), 4

Python, 225

Q–R

quadtrees, 148

QuakeC, 225

quaternions, 89-90

radar, 212-217

radii squared, 134

RAM (random access memory), 2

rasterization, software, 66

rates, frames, 288

ratios, aspect, 163

rays, 129-130

real time, 10, 288

real-time strategy. See RTS

red, green, and blue. See RGB

reflection

Phong reflection models, 82-83, 292

vectors, 50-51

regions, marking, 121-122

regular expressions, 231, 299

relative coordinates, 218

Release builds, 306

rendering, 288

2D graphics, 20

color buffers, 21-22

CRT monitor basics, 20-21

isometric tile maps, 38-39

maps, 35-36

scrolling, 30-34

sprites, 22-29

tile maps, 36-37

vertical sync, 21-22

graphics, 7

reports, issue tracking, 313

repositories, 309

representations

objects, 91

search spaces, 181-183

Resident Evil, 158

resolution, 20, 218-219

responses, collisions, 146-147

reticules, aiming, 211-212, 298

reverb, 120, 294

RGB (red, green, and blue), 20, 76

right hand rule, 52

Rock Band, 180

rotations

2D characters, 54

Euler, 292

matrices, 70

row-major vectors, 61

RTS (real-time strategy), 198

Rubine algorithm, 106, 293

Rubine, Dean, 106

rules

parallelogram, 44

right hand, 52

Runge-Kutta method, 153

S

sample games

side scrollers, 260-268

tower defense games, 270-285

sample problems

2D characters, 54

vector reflection, 50-51

scalar multiplication

matrices, 58

vectors, 47

Scaleform, 221

scale matrices, 69

scene nodes, 262

screens. See also interfaces

space, 74-76

tearing, 21, 289

scripting languages, 239-241, 299

scrolling

2D graphics, 30

four-way, 34

infinite, 32

parallax, 32-34

single-axis, 30-32

single-direction, 289

ScrollingLayer class, 264

SDKs (software development kits), 3

SDL (Simple DirectMedia Layer), 95

searching greedy best-first algorithms, 185-189

search spaces, representing, 181-183

Secure HTTP. See HTTPS

segments, lines, 129-130, 136-139

semi-implicit Euler integration, 151-152

sending

ICMP, 245-246

IP, 244-245

sequences, 94

numbers, 250

regular expressions, 231

serialization, 236

servers, 300

dedicated, 253

repositories, 309

server/client models, 250-253, 300

sets

closed, 186

open, 186

SetState function, 196

setsStitles, 289

setter functions, 271

settings, _Defense, 273

shaders, 66

shading, 76, 83-85

colors, 76

Gouraud, 292

lighting, 79

Phong reflection models, 82-83

vertex attributes, 77-79

sheets, sprites, 28-29

Ship Attack, 260

cocos2d, 262

code analysis, 262-267

exercises, 267-268

Objective-C language, 261

Ship class, 265

side scrollers, 260

cocos2d, 262

code analysis, 262-267

exercises, 267-268

Objective-C language, 261

signals, DSP, 119-122

Simple DirectMedia Layer. See SDL

Sims, The, 74

single-axis scrolling, 30-32

single-direction scrolling, 289

single models, 66

Singleton class, 274

Skyrim, 159

smartphones, 105

accelerometers/gyroscopes, 106-108

touch screens, 105-106

SNES era (1985-1995), 3

sockets, UDP, 250

software development kits. See SDKs

software rasterization, 66

solutions, algebra, 290-291

Sommefeldt, Rhys, 47

sound

3D, 115

emitters/listeners, 116-118

falloff, 118

surround sound, 118-119

basic, 112

sound cues, 112-115

source data, 112

cues, 294

_Defense, 282

Doppler effects, 122-123

DSP, 119-122

obstruction, 123

occlusion, 123, 294

source control, 309

diff/merging tools, 312

Git, 310-312

SVN, 309

source data

sound, 112, 294

switches between, 114

space

matrices, 58-61

vectors, 42-43

addition, 43-44

coordinate systems, 56-57

cross products, 51-53

dot products, 48

length, 45-46

linear interpolation, 55-56

reflection, 50-51

rotating 2D characters, 54

scalar multiplication, 47

subtraction, 44-45

specular component, 83

speed, updating, 10-12

spheres

bounding, 131

intersection, 134, 140

intersections, 295

swept, 141-145, 295

splines

cameras, 172-175, 296

Catmull-ROM, 296

spotlights, 81

spring follow cameras, 165-168

sprites, 22-23

animating, 25-28

drawing, 23-25

sheets, 28-29, 289

stacks

call stack windows, 307

menus, 204-205, 298

Starcraft II, 256

StarCraft, 198, 200, 254

Star Wars: The Old Republic, 221

state

behaviors, 192-198

design patterns, 196-198

finite state machines, 193-194

implementing state machines, 195-196

design patterns, 297

games

cheats, 256

_Defense, 275

machines

design patterns, 196-198

implementing, 195-196

statements, if, 31

static objects, 13

storing functions, 293

strategies, AI, 198-200, 298

Street Fighter, 8, 95

subtraction

matrices, 58

vectors, 44-45

subversion. See SVN

Super Mario Bros. 2, 34

Super Mario Bros., 13, 150

Super Mario World, 3, 32

support

camera algorithms, 175-178

data format, 235-238

localization, 219-221

multiple resolution, 218-219

scripting languages, 224-234

surfaces, planes, 128

surround sound, 118-119

SVN (subversion), 309

swaps, buffers, 22

swept spheres, 295

switches between source data, 114

symbols, tokenization, 230

sync, vertical, 21-22

syntax

analysis, 232-233

abstract trees, 299

Objective-C, 261

T

tablets, 105

accelerometers/gyroscopes, 106-108

touch screens, 105-106

tags, 310

tails (vectors), 43

TCP (Transmission Control Protocol), 246-249, 300

Team Fortress 2, 255

tearing, screen, 289

text

localization, 219

tokenization, 230

UI, hard-coding, 298

text-based files, 235

TexturePacker, 29, 260-262

textures, 28

coordinates, 77

mapping, 77

third-person games, 117, 294

tile maps, 35-39

time, 9

delta, 288

game time/real time, 10

logic as function of delta, 10-12

real, 288

variable time steps, 150

timeouts, 246

Timer class, 278

titles, sets, 289

tokenization, 230

tokens, 230

Tony Hawk’s Project 8, 205

tools

diff, 312

merging, 312

topologies, 250

peer-to-peer models, 253-254

server/client models, 250-253

touch screens, 105-106

tower defense games, 270

C# language, 270-272

code analysis, 273-284

exercises, 284-285

MonoGame, 273

XNA, 272

tracking issues, 313

tradeoffs

data formats, 235-236

scripting languages, 224-225

transforms

3D vectors by matrices, 60-61

4D vectors by matrices, 69

matrices, 58-61, 69

multiple, 71

worlds, 88-91

translation matrices, 70

Transmission Control Protocol. See TCP

transposes, matrices, 60

trees

abstract syntax, 299

octrees, 148

quadtrees, 148

trends in game programming, 4

triangles, 291

intersection, 138-139

planes, 128

polygons, 66

Tribes, 250

troubleshooting

debuggers, 304

adding breakpoint conditions, 307

breakpoints, 304-305

call stack windows, 307

data breakpoints, 308

watches, 306-307

issue tracking, 313

trunks, 310

types

of AI, 180

of cameras, 158

cutscene, 161

first-person, 159-170

fixed, 158

follow, 160-165

non-player controlled, 158

orbit, 168-170

splines, 172-175

spring follow, 165-168

of game objects, 13

of input devices, 94-99

of lighting, 81, 292

of objects, 289

of scripting languages, 225-226

of shading, 83-85

typing menus, 206-207

U

UDP (User Datagram Protocol), 249-250, 300

UIs (user interfaces)

_Defense, 282-284

HUD elements, 207-217

localization, 219-221

menus, 204-207

middleware, 221

multiple resolution support, 218-219

text, hard-coding, 298

Uncharted, 160

uniform scale, 70

unit quaternions, 90

unit vectors, 46

Unity, 4

unprojection, 296

Unreal, 4

Unreal Engines, 101

UnrealScript, 225-228, 299

UpdateAnim function, 27

Update function, 196

UpdateInput function, 101

updating

servers, 301

speed, 10-12

worlds, 5

User Datagram Protocol. See UDP

user interfaces. See UIs

UV coordinates, 78

UX (user experience), 221, 299

V

variable time steps, 150

VBLANK (vertical blank interval), 20-21, 289

vectors, 42-43

2D characters, rotating, 54

4D, transforming by matrices, 69

addition, 43-44

coordinate systems, 56-57

cross products, 51-53

dot products, 48

length, 45-46

linear interpolation, 55-56

reflection, 50-51

scalar multiplication, 47

subtraction, 44-45

velocity, 252

collision responses, 146

Verlet integration, 152-153, 295

versions, IP, 245

vertical blank interval. See VBLANK

vertical sync, 21-22

vertices, 66

attributes, 77-79

normal, 78

video games, history of programming, 2

Atari era (1977-1985), 2-3

future of, 4-5

NES/SNES era (1985-1995), 3

Playstation/Playstation 2 era (1995-2005), 3

PS3/Wii/Xbox 360 era (2005-2013), 4

viewing call stack windows, 307

viewports, 163

views, 72-73

field of, 295

isometric, 38-39, 290

virtual controllers, 105

virtual reality headsets, 94

visibility, 85

painter’s algorithm, 85-86

world transforms, 91

z-buffering, 86-87

visual scripting systems, 229, 299

Visual Studio

breakpoints

conditions, 307

configuring, 304-305

data, 308

call stack windows, 307

watches, adding, 306-307

W

watches, configuring, 306-307

waypoint arrows, 208-211, 298

w-components, 68

whitepapers, 250

width, aspect ratios, 163

Wii era (2005-2013), 4

WiiMote, 94

winding order, 78

windows, call stack, 307

World of Warcraft, 227

case study, 239-241

TCP, 248

worlds

spaces, 68-72

transforms, 88-91

updating, 5

X–Z

Xbox 360 era (2005-2013), 4

Xcode, 260

XCOM, 181

XML (Extensible Markup Language), 237

XNA game libraries, 272

z-buffering, 86-88, 292

z-fighting, 88

Zinman-Jeanes, Jacob, 260

zones, dead, 97

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset