- Page 4: This page intentionally left blank
- Page 8: © 2004 by Thomson Course Technolog
- Page 12: AcknowledgmentsAbook of this size i
- Page 16: Contents at a GlanceIntroduction .
- Page 20: ContentsIntroduction . . . . . . .
- Page 24: xiiContentsChapter 4 Writing Your F
- Page 28: xivContentsStory . . . . . . . . .
- Page 32: xviContentsChapter 10 Programming T
- Page 36: xviiiContentsSummary . . . . . . .
- Page 40: xxContentsChapter 18 Introduction t
- Page 44: xxiiContentsChapter 5 . . . . . . .
- Page 48: This page intentionally left blank
- Page 52:
xxviIntroductionCross-Platform Game
- Page 56:
xxviiiIntroductionsource code. When
- Page 60:
xxxIntroduction■■■Part II: 2D
- Page 64:
Welcome to Part I of Game Programmi
- Page 68:
4Chapter 1 ■Demystifying Game Dev
- Page 72:
6Chapter 1 ■Demystifying Game Dev
- Page 76:
8Chapter 1 ■Demystifying Game Dev
- Page 80:
10Chapter 1 ■Demystifying Game De
- Page 84:
12Chapter 1 ■Demystifying Game De
- Page 88:
14Chapter 1 ■Demystifying Game De
- Page 92:
16Chapter 1 ■Demystifying Game De
- Page 96:
18Chapter 1 ■Demystifying Game De
- Page 100:
20Chapter 1 ■Demystifying Game De
- Page 104:
22Chapter 1 ■Demystifying Game De
- Page 108:
24Chapter 1 ■Demystifying Game De
- Page 112:
26Chapter 1 ■Demystifying Game De
- Page 116:
28Chapter 1 ■Demystifying Game De
- Page 120:
30Chapter 1 ■Demystifying Game De
- Page 124:
32Chapter 1 ■Demystifying Game De
- Page 128:
34Chapter 2 ■Getting Started with
- Page 132:
36Chapter 2 ■Getting Started with
- Page 136:
38Chapter 2 ■Getting Started with
- Page 140:
40Chapter 2 ■Getting Started with
- Page 144:
42Chapter 2 ■Getting Started with
- Page 148:
44Chapter 2 ■Getting Started with
- Page 152:
46Chapter 2 ■Getting Started with
- Page 156:
48Chapter 2 ■Getting Started with
- Page 160:
50Chapter 2 ■Getting Started with
- Page 164:
52Chapter 2 ■Getting Started with
- Page 168:
54Chapter 2 ■Getting Started with
- Page 172:
56Chapter 2 ■Getting Started with
- Page 176:
58Chapter 2 ■Getting Started with
- Page 180:
60Chapter 2 ■Getting Started with
- Page 184:
62Chapter 2 ■Getting Started with
- Page 188:
64Chapter 2 ■Getting Started with
- Page 192:
66Chapter 2 ■Getting Started with
- Page 196:
68Chapter 2 ■Getting Started with
- Page 200:
This page intentionally left blank
- Page 204:
72Chapter 3 ■Basic 2D Graphics Pr
- Page 208:
74Chapter 3 ■Basic 2D Graphics Pr
- Page 212:
76Chapter 3 ■Basic 2D Graphics Pr
- Page 216:
78Chapter 3 ■Basic 2D Graphics Pr
- Page 220:
80Chapter 3 ■Basic 2D Graphics Pr
- Page 224:
82Chapter 3 ■Basic 2D Graphics Pr
- Page 228:
84Chapter 3 ■Basic 2D Graphics Pr
- Page 232:
86Chapter 3 ■Basic 2D Graphics Pr
- Page 236:
88Chapter 3 ■Basic 2D Graphics Pr
- Page 240:
90Chapter 3 ■Basic 2D Graphics Pr
- Page 244:
92Chapter 3 ■Basic 2D Graphics Pr
- Page 248:
94Chapter 3 ■Basic 2D Graphics Pr
- Page 252:
96Chapter 3 ■Basic 2D Graphics Pr
- Page 256:
98Chapter 3 ■Basic 2D Graphics Pr
- Page 260:
100Chapter 3 ■Basic 2D Graphics P
- Page 264:
102Chapter 3 ■Basic 2D Graphics P
- Page 268:
104Chapter 3 ■Basic 2D Graphics P
- Page 272:
106Chapter 3 ■Basic 2D Graphics P
- Page 276:
108Chapter 3 ■Basic 2D Graphics P
- Page 280:
110Chapter 3 ■Basic 2D Graphics P
- Page 284:
112Chapter 3 ■Basic 2D Graphics P
- Page 288:
114Chapter 3 ■Basic 2D Graphics P
- Page 292:
116Chapter 3 ■Basic 2D Graphics P
- Page 296:
This page intentionally left blank
- Page 300:
120Chapter 4 ■Writing Your First
- Page 304:
122Chapter 4 ■Writing Your First
- Page 308:
124Chapter 4 ■Writing Your First
- Page 312:
126Chapter 4 ■Writing Your First
- Page 316:
128Chapter 4 ■Writing Your First
- Page 320:
130Chapter 4 ■Writing Your First
- Page 324:
132Chapter 4 ■Writing Your First
- Page 328:
134Chapter 4 ■Writing Your First
- Page 332:
136Chapter 4 ■Writing Your First
- Page 336:
138Chapter 4 ■Writing Your First
- Page 340:
140Chapter 4 ■Writing Your First
- Page 344:
142Chapter 4 ■Writing Your First
- Page 348:
This page intentionally left blank
- Page 352:
146Chapter 5 ■Programming the Key
- Page 356:
148Chapter 5 ■Programming the Key
- Page 360:
150Chapter 5 ■Programming the Key
- Page 364:
152Chapter 5 ■Programming the Key
- Page 368:
154Chapter 5 ■Programming the Key
- Page 372:
156Chapter 5 ■Programming the Key
- Page 376:
158Chapter 5 ■Programming the Key
- Page 380:
160Chapter 5 ■Programming the Key
- Page 384:
162Chapter 5 ■Programming the Key
- Page 388:
164Chapter 5 ■Programming the Key
- Page 392:
166Chapter 5 ■Programming the Key
- Page 396:
168Chapter 5 ■Programming the Key
- Page 400:
170Chapter 5 ■Programming the Key
- Page 404:
172Chapter 5 ■Programming the Key
- Page 408:
174Chapter 5 ■Programming the Key
- Page 412:
176Chapter 5 ■Programming the Key
- Page 416:
178Chapter 5 ■Programming the Key
- Page 420:
180Chapter 5 ■Programming the Key
- Page 424:
182Chapter 5 ■Programming the Key
- Page 428:
184Chapter 5 ■Programming the Key
- Page 432:
Welcome to Part II of Game Programm
- Page 436:
188Chapter 6 ■Introduction to Gam
- Page 440:
190Chapter 6 ■Introduction to Gam
- Page 444:
192Chapter 6 ■Introduction to Gam
- Page 448:
194Chapter 6 ■Introduction to Gam
- Page 452:
196Chapter 6 ■Introduction to Gam
- Page 456:
198Chapter 6 ■Introduction to Gam
- Page 460:
200Chapter 6 ■Introduction to Gam
- Page 464:
202Chapter 6 ■Introduction to Gam
- Page 468:
204Chapter 6 ■Introduction to Gam
- Page 472:
206Chapter 6 ■Introduction to Gam
- Page 476:
208Chapter 6 ■Introduction to Gam
- Page 480:
210Chapter 6 ■Introduction to Gam
- Page 484:
212Chapter 6 ■Introduction to Gam
- Page 488:
214Chapter 6 ■Introduction to Gam
- Page 492:
216Chapter 7 ■Basic Bitmap Handli
- Page 496:
218Chapter 7 ■Basic Bitmap Handli
- Page 500:
220Chapter 7 ■Basic Bitmap Handli
- Page 504:
222Chapter 7 ■Basic Bitmap Handli
- Page 508:
224Chapter 7 ■Basic Bitmap Handli
- Page 512:
226Chapter 7 ■Basic Bitmap Handli
- Page 516:
228Chapter 7 ■Basic Bitmap Handli
- Page 520:
230Chapter 7 ■Basic Bitmap Handli
- Page 524:
232Chapter 7 ■Basic Bitmap Handli
- Page 528:
234Chapter 7 ■Basic Bitmap Handli
- Page 532:
236Chapter 7 ■Basic Bitmap Handli
- Page 536:
238Chapter 8 ■Basic Sprite Progra
- Page 540:
240Chapter 8 ■Basic Sprite Progra
- Page 544:
242Chapter 8 ■Basic Sprite Progra
- Page 548:
244Chapter 8 ■Basic Sprite Progra
- Page 552:
246Chapter 8 ■Basic Sprite Progra
- Page 556:
248Chapter 8 ■Basic Sprite Progra
- Page 560:
250Chapter 8 ■Basic Sprite Progra
- Page 564:
252Chapter 8 ■Basic Sprite Progra
- Page 568:
254Chapter 8 ■Basic Sprite Progra
- Page 572:
256Chapter 8 ■Basic Sprite Progra
- Page 576:
258Chapter 8 ■Basic Sprite Progra
- Page 580:
260Chapter 8 ■Basic Sprite Progra
- Page 584:
262Chapter 8 ■Basic Sprite Progra
- Page 588:
264Chapter 8 ■Basic Sprite Progra
- Page 592:
266Chapter 8 ■Basic Sprite Progra
- Page 596:
268Chapter 8 ■Basic Sprite Progra
- Page 600:
270Chapter 8 ■Basic Sprite Progra
- Page 604:
272Chapter 8 ■Basic Sprite Progra
- Page 608:
274Chapter 8 ■Basic Sprite Progra
- Page 612:
276Chapter 8 ■Basic Sprite Progra
- Page 616:
This page intentionally left blank
- Page 620:
280Chapter 9 ■Advanced Sprite Pro
- Page 624:
282Chapter 9 ■Advanced Sprite Pro
- Page 628:
284Chapter 9 ■Advanced Sprite Pro
- Page 632:
286Chapter 9 ■Advanced Sprite Pro
- Page 636:
288Chapter 9 ■Advanced Sprite Pro
- Page 640:
290Chapter 9 ■Advanced Sprite Pro
- Page 644:
292Chapter 9 ■Advanced Sprite Pro
- Page 648:
294Chapter 9 ■Advanced Sprite Pro
- Page 652:
296Chapter 9 ■Advanced Sprite Pro
- Page 656:
298Chapter 9 ■Advanced Sprite Pro
- Page 660:
300Chapter 9 ■Advanced Sprite Pro
- Page 664:
302Chapter 9 ■Advanced Sprite Pro
- Page 668:
304Chapter 9 ■Advanced Sprite Pro
- Page 672:
306Chapter 9 ■Advanced Sprite Pro
- Page 676:
308Chapter 9 ■Advanced Sprite Pro
- Page 680:
310Chapter 9 ■Advanced Sprite Pro
- Page 684:
312Chapter 9 ■Advanced Sprite Pro
- Page 688:
314Chapter 9 ■Advanced Sprite Pro
- Page 692:
316Chapter 9 ■Advanced Sprite Pro
- Page 696:
318Chapter 9 ■Advanced Sprite Pro
- Page 700:
320Chapter 9 ■Advanced Sprite Pro
- Page 704:
322Chapter 9 ■Advanced Sprite Pro
- Page 708:
324Chapter 9 ■Advanced Sprite Pro
- Page 712:
326Chapter 9 ■Advanced Sprite Pro
- Page 716:
328Chapter 9 ■Advanced Sprite Pro
- Page 720:
330Chapter 9 ■Advanced Sprite Pro
- Page 724:
332Chapter 9 ■Advanced Sprite Pro
- Page 728:
334Chapter 9 ■Advanced Sprite Pro
- Page 732:
336Chapter 9 ■Advanced Sprite Pro
- Page 736:
338Chapter 9 ■Advanced Sprite Pro
- Page 740:
340Chapter 10 ■Programming Tile-B
- Page 744:
342Chapter 10 ■Programming Tile-B
- Page 748:
344Chapter 10 ■Programming Tile-B
- Page 752:
346Chapter 10 ■Programming Tile-B
- Page 756:
348Chapter 10 ■Programming Tile-B
- Page 760:
350Chapter 10 ■Programming Tile-B
- Page 764:
352Chapter 10 ■Programming Tile-B
- Page 768:
354Chapter 10 ■Programming Tile-B
- Page 772:
356Chapter 10 ■Programming Tile-B
- Page 776:
358Chapter 10 ■Programming Tile-B
- Page 780:
360Chapter 10 ■Programming Tile-B
- Page 784:
362Chapter 10 ■Programming Tile-B
- Page 788:
364Chapter 10 ■Programming Tile-B
- Page 792:
366Chapter 10 ■Programming Tile-B
- Page 796:
368Chapter 10 ■Programming Tile-B
- Page 800:
370Chapter 10 ■Programming Tile-B
- Page 804:
372Chapter 10 ■Programming Tile-B
- Page 808:
374Chapter 10 ■Programming Tile-B
- Page 812:
376Chapter 10 ■Programming Tile-B
- Page 816:
378Chapter 10 ■Programming Tile-B
- Page 820:
380Chapter 10 ■Programming Tile-B
- Page 824:
382Chapter 11 ■Timers, Interrupt
- Page 828:
384Chapter 11 ■Timers, Interrupt
- Page 832:
386Chapter 11 ■Timers, Interrupt
- Page 836:
388Chapter 11 ■Timers, Interrupt
- Page 840:
390Chapter 11 ■Timers, Interrupt
- Page 844:
392Chapter 11 ■Timers, Interrupt
- Page 848:
394Chapter 11 ■Timers, Interrupt
- Page 852:
396Chapter 11 ■Timers, Interrupt
- Page 856:
398Chapter 11 ■Timers, Interrupt
- Page 860:
400Chapter 11 ■Timers, Interrupt
- Page 864:
402Chapter 11 ■Timers, Interrupt
- Page 868:
404Chapter 11 ■Timers, Interrupt
- Page 872:
406Chapter 11 ■Timers, Interrupt
- Page 876:
408Chapter 11 ■Timers, Interrupt
- Page 880:
410Chapter 11 ■Timers, Interrupt
- Page 884:
412Chapter 11 ■Timers, Interrupt
- Page 888:
414Chapter 11 ■Timers, Interrupt
- Page 892:
416Chapter 11 ■Timers, Interrupt
- Page 896:
418Chapter 11 ■Timers, Interrupt
- Page 900:
420Chapter 11 ■Timers, Interrupt
- Page 904:
422Chapter 11 ■Timers, Interrupt
- Page 908:
424Chapter 11 ■Timers, Interrupt
- Page 912:
426Chapter 11 ■Timers, Interrupt
- Page 916:
428Chapter 11 ■Timers, Interrupt
- Page 920:
430Chapter 12 ■Creating a Game Wo
- Page 924:
432Chapter 12 ■Creating a Game Wo
- Page 928:
434Chapter 12 ■Creating a Game Wo
- Page 932:
436Chapter 12 ■Creating a Game Wo
- Page 936:
438Chapter 12 ■Creating a Game Wo
- Page 940:
440Chapter 12 ■Creating a Game Wo
- Page 944:
442Chapter 12 ■Creating a Game Wo
- Page 948:
444Chapter 12 ■Creating a Game Wo
- Page 952:
446Chapter 12 ■Creating a Game Wo
- Page 956:
448Chapter 12 ■Creating a Game Wo
- Page 960:
450Chapter 12 ■Creating a Game Wo
- Page 964:
452Chapter 12 ■Creating a Game Wo
- Page 968:
454Chapter 12 ■Creating a Game Wo
- Page 972:
456Chapter 13 ■Vertical Scrolling
- Page 976:
458Chapter 13 ■Vertical Scrolling
- Page 980:
460Chapter 13 ■Vertical Scrolling
- Page 984:
462Chapter 13 ■Vertical Scrolling
- Page 988:
464Chapter 13 ■Vertical Scrolling
- Page 992:
466Chapter 13 ■Vertical Scrolling
- Page 996:
468Chapter 13 ■Vertical Scrolling
- Page 1000:
470Chapter 13 ■Vertical Scrolling
- Page 1004:
472Chapter 13 ■Vertical Scrolling
- Page 1008:
474Chapter 13 ■Vertical Scrolling
- Page 1012:
476Chapter 13 ■Vertical Scrolling
- Page 1016:
478Chapter 13 ■Vertical Scrolling
- Page 1020:
480Chapter 13 ■Vertical Scrolling
- Page 1024:
482Chapter 13 ■Vertical Scrolling
- Page 1028:
484Chapter 13 ■Vertical Scrolling
- Page 1032:
486Chapter 13 ■Vertical Scrolling
- Page 1036:
488Chapter 13 ■Vertical Scrolling
- Page 1040:
490Chapter 14 ■Horizontal Scrolli
- Page 1044:
492Chapter 14 ■Horizontal Scrolli
- Page 1048:
494Chapter 14 ■Horizontal Scrolli
- Page 1052:
496Chapter 14 ■Horizontal Scrolli
- Page 1056:
498Chapter 14 ■Horizontal Scrolli
- Page 1060:
500Chapter 14 ■Horizontal Scrolli
- Page 1064:
502Chapter 14 ■Horizontal Scrolli
- Page 1068:
504Chapter 14 ■Horizontal Scrolli
- Page 1072:
506Chapter 14 ■Horizontal Scrolli
- Page 1076:
508Chapter 14 ■Horizontal Scrolli
- Page 1080:
Welcome to Part III of Game Program
- Page 1084:
512Chapter 15 ■Mastering the Audi
- Page 1088:
514Chapter 15 ■Mastering the Audi
- Page 1092:
516Chapter 15 ■Mastering the Audi
- Page 1096:
518Chapter 15 ■Mastering the Audi
- Page 1100:
520Chapter 15 ■Mastering the Audi
- Page 1104:
522Chapter 15 ■Mastering the Audi
- Page 1108:
524Chapter 15 ■Mastering the Audi
- Page 1112:
526Chapter 15 ■Mastering the Audi
- Page 1116:
528Chapter 15 ■Mastering the Audi
- Page 1120:
530Chapter 15 ■Mastering the Audi
- Page 1124:
532Chapter 15 ■Mastering the Audi
- Page 1128:
534Chapter 15 ■Mastering the Audi
- Page 1132:
536Chapter 15 ■Mastering the Audi
- Page 1136:
538Chapter 15 ■Mastering the Audi
- Page 1140:
540Chapter 16 ■Using Datafiles to
- Page 1144:
542Chapter 16 ■Using Datafiles to
- Page 1148:
544Chapter 16 ■Using Datafiles to
- Page 1152:
546Chapter 16 ■Using Datafiles to
- Page 1156:
548Chapter 16 ■Using Datafiles to
- Page 1160:
This page intentionally left blank
- Page 1164:
552Chapter 17 ■Playing FLIC Movie
- Page 1168:
554Chapter 17 ■Playing FLIC Movie
- Page 1172:
556Chapter 17 ■Playing FLIC Movie
- Page 1176:
558Chapter 17 ■Playing FLIC Movie
- Page 1180:
560Chapter 17 ■Playing FLIC Movie
- Page 1184:
562Chapter 17 ■Playing FLIC Movie
- Page 1188:
564Chapter 18 ■Introduction to Ar
- Page 1192:
566Chapter 18 ■Introduction to Ar
- Page 1196:
568Chapter 18 ■Introduction to Ar
- Page 1200:
570Chapter 18 ■Introduction to Ar
- Page 1204:
572Chapter 18 ■Introduction to Ar
- Page 1208:
574Chapter 18 ■Introduction to Ar
- Page 1212:
576Chapter 18 ■Introduction to Ar
- Page 1216:
578Chapter 18 ■Introduction to Ar
- Page 1220:
580Chapter 18 ■Introduction to Ar
- Page 1224:
582Chapter 18 ■Introduction to Ar
- Page 1228:
This page intentionally left blank
- Page 1232:
586Chapter 19 ■The Mathematical S
- Page 1236:
588Chapter 19 ■The Mathematical S
- Page 1240:
590Chapter 19 ■The Mathematical S
- Page 1244:
592Chapter 19 ■The Mathematical S
- Page 1248:
594Chapter 19 ■The Mathematical S
- Page 1252:
596Chapter 19 ■The Mathematical S
- Page 1256:
598Chapter 19 ■The Mathematical S
- Page 1260:
600Chapter 19 ■The Mathematical S
- Page 1264:
602Chapter 19 ■The Mathematical S
- Page 1268:
604Chapter 19 ■The Mathematical S
- Page 1272:
606Chapter 19 ■The Mathematical S
- Page 1276:
608Chapter 19 ■The Mathematical S
- Page 1280:
This page intentionally left blank
- Page 1284:
612Chapter 20 ■Publishing Your Ga
- Page 1288:
614Chapter 20 ■Publishing Your Ga
- Page 1292:
616Chapter 20 ■Publishing Your Ga
- Page 1296:
618Chapter 20 ■Publishing Your Ga
- Page 1300:
620Chapter 20 ■Publishing Your Ga
- Page 1304:
622Chapter 20 ■Publishing Your Ga
- Page 1308:
624Chapter 20 ■Publishing Your Ga
- Page 1312:
626Chapter 20 ■Publishing Your Ga
- Page 1316:
628Chapter 20 ■Publishing Your Ga
- Page 1320:
This page intentionally left blank
- Page 1324:
Welcome to Part IV of Game Programm
- Page 1328:
634Appendix A ■Chapter Quiz Answe
- Page 1332:
636Appendix A ■Chapter Quiz Answe
- Page 1336:
638Appendix A ■Chapter Quiz Answe
- Page 1340:
640Appendix A ■Chapter Quiz Answe
- Page 1344:
642Appendix A ■Chapter Quiz Answe
- Page 1348:
644Appendix A ■Chapter Quiz Answe
- Page 1352:
646Appendix A ■Chapter Quiz Answe
- Page 1356:
648Appendix A ■Chapter Quiz Answe
- Page 1360:
This page intentionally left blank
- Page 1364:
652Appendix B ■Useful TablesDeriv
- Page 1368:
654Appendix B ■Useful TablesChar
- Page 1372:
This page intentionally left blank
- Page 1376:
658Appendix C ■Numbering Systems:
- Page 1380:
660Appendix C ■Numbering Systems:
- Page 1384:
This page intentionally left blank
- Page 1388:
664Appendix D ■Recommended Books
- Page 1392:
666Appendix D ■Recommended Books
- Page 1396:
668Appendix D ■Recommended Books
- Page 1400:
This page intentionally left blank
- Page 1404:
672Appendix E ■Configuring Allegr
- Page 1408:
674Appendix E ■Configuring Allegr
- Page 1412:
676Appendix E ■Configuring Allegr
- Page 1416:
678Appendix E ■Configuring Allegr
- Page 1420:
680Appendix E ■Configuring Allegr
- Page 1424:
682Appendix E ■Configuring Allegr
- Page 1428:
684Appendix E ■Configuring Allegr
- Page 1432:
686Appendix F ■Compiling the Alle
- Page 1436:
688Appendix F ■Compiling the Alle
- Page 1440:
690Appendix F ■Compiling the Alle
- Page 1444:
692Appendix G ■Using the CD-ROMyo
- Page 1448:
694Indexallegro_message function, 7
- Page 1452:
696Indexcompilers (continued)Dev-C+
- Page 1456:
698Indexfinite state machines (AI),
- Page 1460:
700Indexgames (continued)programmin
- Page 1464:
702Indexindustry (continued)release
- Page 1468:
704Indexmaps (continued)tile-based
- Page 1472:
706Indexprograms (continued)Collisi
- Page 1476:
708Indexscrolling (continued)creati
- Page 1480:
710Indexsprites (continued)pivoted,
- Page 1484:
712Indextroubleshootinganimated spr
- Page 1488:
TERMS AND CONDITIONS FOR COPYING, D
- Page 1492:
4. You may not copy, modify, sublic
- Page 1496:
How to Apply These Terms to Your Ne