did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780672326592

Beginning Game Programming

by
  • ISBN13:

    9780672326592

  • ISBN10:

    0672326590

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2004-07-19
  • Publisher: Sams Publishing
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99

Summary

A friendly introduction to game programming on the Windows platform for the beginners.

Author Biography

Michael Morrison is a writer, developer, toy inventor and author of a variety of computer technology books and interactive Web-based courses. In addition to his primary profession as a writer and freelance nerd for hire, Michael is the creative lead at Stalefish Labs, an entertainment company he co-founded with his wife, Masheed. The first commercial debut for Stalefish Labs is a traditional social/trivia game called Tall Tales: The Game of Legends and Creative One-Upmanship (http://www.talltalesgame.com). When not glued to his computer, playing hockey, skateboarding or watching movies with his wife, Michael enjoys hanging out by his koi pond. You can visit Michael on the Web at http://www.michaelmorrison.com.

Table of Contents

Introduction 1(8)
How This Book Is Structured
3(1)
What You'll Need
4(5)
Part I: Getting Started
CHAPTER 1: Learning the Basics of Game Creation
9(22)
Getting to Know Video Games
10(5)
Why Video Games?
11(1)
Types of Video Games
12(3)
Learning Game Design Essentials
15(7)
Coming Up with the Basic Idea
15(2)
Putting Together the Story Line
17(1)
Visualizing the Graphics
18(1)
Choosing the Right Sound. for Your Game
19(1)
Dictating Game Play with the Controls
20(1)
Deciding on the Play Modes
20(2)
Object-Oriented Programming and Games
22(4)
Understanding OOP
23(1)
Applying OOP to Games
24(2)
Exploring the Tools of the Trade
26(2)
Compilers and Development Environments
26(1)
Choosing a Graphics Tool
27(1)
Selecting Sound and Music Tools
27(1)
Summary
28(1)
Field Trip
29(2)
CHAPTER 2: Creating an Engine for Games
31(30)
What Is a Game Engine?
32(1)
Pondering the Role of a Game Engine
33(4)
Breaking a Game Down into Events
33(1)
Establishing the Timing for Games
34(3)
Developing a Game Engine
37(16)
The Game Event Functions
38(1)
The GameEngine Class
39(14)
Building the Blizzard Example
53(7)
Writing the Program Code
53(5)
Testing the Finished Product
58(2)
Summary
60(1)
Extreme Game Makeover
60(1)
CHAPTER 3: Learning to Draw Basic Graphics
61(26)
Graphics Essentials
62(4)
Understanding the Graphics Coordinate System
62(1)
Learning the Basics of Color
63(3)
Examining Graphics in Windows
66(4)
Working with Device Contexts
67(1)
Writing with Pens
68(1)
Painting with Brushes
68(1)
Drawing Images with Bitmaps
69(1)
Managing Color with Palettes
69(1)
Painting Windows
70(9)
Painting Text
71(2)
Painting Primitive Graphics
73(4)
Working with Pens and Brushes
77(2)
Building the Crop Circles Example
79(5)
Writing the Program Code
79(4)
Testing the Finished Product
83(1)
Summary
84(1)
Field Trip
85(2)
CHAPTER 4: Drawing Graphical Images
87(22)
The Basics of Bitmap Images
88(1)
Looking Inside a Bitmap
89(2)
Developing a Bitmap Class
91(5)
How the Bitmap Class Will Work
91(1)
Putting the Code Together
92(4)
Building the Slideshow Example
96(8)
Writing the Program Code
97(4)
Assembling the Resources
101(1)
Testing the Finished Product
102(2)
Summary
104(1)
Extreme Game Makeover
104(5)
Part II: Interacting with Game Players
CHAPTER 5: Controlling Games with the Keyboard and Mouse
109(24)
Gaming and User Input
110(1)
Taking a Look at User Input Devices
111(4)
Accepting Keyboard Input
112(1)
Responding to the Mouse
113(1)
Interacting with Joysticks
114(1)
Assessing Keyboard Input for Games
115(1)
Tracking the Mouse
116(2)
Revamping the Game Engine for Input
118(6)
Adding Keyboard Support
118(1)
Adding Mouse Support
119(2)
Sprucing Up the Bitmap Class
121(3)
Building the UFO Example
124(6)
Writing the Program Code
124(5)
Testing the Finished Product
129(1)
Summary
130(1)
Field Trip
131(2)
CHAPTER 6: Example Game: Brainiac
133(16)
How Does the Game Play?
134(1)
Designing the Game
135(1)
Building the Game
136(8)
Writing the Game Code
137(7)
Testing the Game
144(3)
Summary
147(1)
Extreme Game Makeover
148(1)
CHAPTER 7: Improving Input with Joysticks
149(22)
Understanding Joystick Basics
150(1)
Calibrating Joysticks
151(2)
Tracking Joystick Movements
153(3)
Revamping the Game Engine
for Joysticks
156(7)
Accessing Win32 Multimedia Features
157(1)
Developing the Joystick Code
158(5)
Building the UFO 2 Example
163(5)
Writing the Program Code
164(3)
Testing the Finished Product
167(1)
Summary
168(1)
Field Trip
169(2)
CHAPTER 8: Example Game: Light Cycles
171(28)
How Does the Game Play?
172(1)
Designing the Game
173(4)
Building the Game
177(15)
Testing the Game
192(2)
Summary
194(1)
Extreme Game Makeover
195(4)
Part III: Animating Games with Sprites
CHAPTER 9: Making Things Move with Sprite Animation
199(32)
Understanding the Basics of Animation
200(2)
Animation and Frame Rate
200(1)
Making the Move to Computer Animation
201(1)
2D Versus 3D Animation
202(1)
Understanding the Types of 2D Animation
203(7)
Frame-Based Animation
204(1)
Cast-Based Animation
204(6)
Applying Sprite Animation to Games
210(2)
Designing an All-Purpose Sprite
212(2)
Creating the Sprite Class
214(7)
Creating and Destroying the Sprite
216(2)
Updating the Sprite
218(2)
Drawing the Sprite
220(1)
Building the Planets Example Program
221(7)
Writing the Program Code
221(6)
Testing the Finished Product
227(1)
Summary
228(1)
Field Trip
229(2)
CHAPTER 10: Managing a World of Sprites
231(20)
Assessing the Need for Sprite Management
232(1)
Designing a Sprite Manager
233(1)
Adding the Sprite Manager to the Game Engine
234(7)
Improving the Sprite Class
235(2)
Enhancing the Game Engine
237(4)
Eliminating Flicker with Double-Buffering
241(3)
Building the Planets 2 Example
244(5)
Writing the Program Code
244(5)
Testing the Finished Product
249(1)
Summary
249(1)
Extreme Game Makeover
250(1)
CHAPTER 11: Example Game: Henway
251(22)
How Does the Game Play?
252(2)
Designing the Game
254(2)
Building the Game
256(10)
Writing the Game Code
256(10)
Testing the Game
266(3)
Summary.
269(1)
Extreme Game Makeover
269(4)
Part IV: Making Noise with Sound and Music
CHAPTER 12: Playing Digital Sound Effects
273(20)
Understanding Digital Sound
274(2)
Getting to Know Windows Waves
276(2)
Exploring Sound Tools
278(1)
Sony Sound Forge
278(1)
Adobe Audition
279(1)
Economical Sound Editors
279(1)
Creating and Editing Sounds
279(1)
Finding Sounds and Music
280(1)
Accessing Wave Sounds
281(1)
Playing Wave Sounds
281(5)
Playing a Wave from a File
283(1)
Playing a Wave as a Resource
284(1)
Looping a Wave Sound
284(1)
Stopping a Wave Sound
285(1)
Building the Brainiac 2 Example Program
286(5)
Writing the Program Code
287(1)
Assembling the Resources
288(2)
Testing the Finished Product
290(1)
Summary
291(1)
Field Trip
292(1)
CHAPTER 13: Playing MIDI Music
293(18)
Feeling the Music with MIDI
294(2)
Understanding the Windows Media Control Interface
296(1)
Using the MCI to Play MIDI Music
297(4)
Opening the MIDI Device
297(2)
Playing a MIDI Song
299(1)
Pausing a MIDI Song
300(1)
Closing the MIDI Device
300(1)
Adding MIDI Music Support to the Game Engine
301(2)
Building the Henway 2 Example Program
303(7)
Writing the Program Code
303(6)
Testing the Finished Product
309(1)
Summary
310(1)
Field Trip
310(1)
CHAPTER 14: Example Game: Battle Office
311(24)
How Does the Game Play?
312(1)
Designing the Game
313(4)
Building the Game
317(11)
Writing the Program Code
317(11)
Testing the Game
328(2)
Summary
330(1)
Field Trip
330(5)
Part V: Taking Animation to the Next Level
CHAPTER 15: Animating the Appearance of Sprites
335(16)
Frame Animation Revisited
336(2)
Designing an Animated Sprite
338(2)
Adding Animated Sprite Support to the Game Engine
340(5)
Drawing Only Part of a Bitmap
340(2)
Animating the Sprite Class
342(3)
Building the Battle Office 2 Example Program
345(4)
Writing the Program Code
345(3)
Testing the Finished Product
348(1)
Summary
349(1)
Extreme Game Makeover
349(2)
CHAPTER 16: Creating Backgrounds for Your Sprites
351(20)
Assessing the Significance of Game Backgrounds
352(1)
Understanding the Types of Game Backgrounds
353(3)
Solid Backgrounds
353(1)
Image Backgrounds
354(1)
Animated Backgrounds
354(1)
Scrolling Backgrounds
355(1)
Adding Background Support to the Game Engine
356(7)
Creating a Basic Background Class
357(2)
Creating an Animated Background Class
359(4)
Building the Roids Example
363(5)
Writing the Program Code
363(4)
Testing the Finished Product
367(1)
Summary.
368(1)
Field Trip
369(2)
CHAPTER 17: Example Game: Meteor Defense
371(28)
How Does the Game Play?
372(1)
Designing the Game
373(5)
Enhancing Sprites in the Game Engine
378(3)
Building the Game
381(11)
Writing the Game Code
381(11)
Testing the Game
392(2)
Summary
394(1)
Extreme Game Makeover
395(4)
Part VI: Adding Brains to Your Games
CHAPTER 18: Teaching Games to Think
399(18)
Understanding Artificial Intelligence
400(2)
Exploring Types of Game AI
402(7)
Roaming AI
403(3)
Behavioral AI
406(1)
Strategic AI
407(2)
Developing an AI Strategy
409(1)
Building the Roids 2 Example Program
410(6)
Writing the Program Code
410(5)
Testing the Finished Product
415(1)
Summary
416(1)
Field Trip
416(1)
CHAPTER 19: Example Game: Space Out
417(28)
How Does the Game Play?
418(1)
Designing the Game
419(4)
Adding Yet Another Sprite Feature to the Game Engine
423(2)
Building the Game
425(14)
Writing the Game Code
425(14)
Testing the Game
439(2)
Summary
441(4)
Part VII: Spicing Up Your Games
CHAPTER 20: Adding Pizzazz to Your Game with a Splash Screen
445(12)
The Importance of a Splash Screen
446(1)
Looking Behind a Splash Screen
447(1)
Building the Space Out 2 Game
448(6)
Writing the Game Code
449(4)
Testing the Finished Product
453(1)
Summary
454(1)
Field Trip
455(2)
CHAPTER 21: Showing Off Your Game with Demo Mode
457(14)
What Is Demo Mode?
458(1)
The Nuts and Bolts of Demo Mode
458(2)
Building the Space Out 3 Game
460(9)
Writing the Game Code
460(7)
Testing the Finished Product
467(2)
Summary
469(1)
Extreme Game Makeover
469(2)
CHAPTER 22: Keeping Track of High Scores
471(18)
The Significance of Keeping Score
472(1)
Modeling High Score Data
473(1)
Storing and Retrieving High Score Data
474(3)
Building the Space Out 4 Game
477(9)
Writing the Game Code
477(7)
Testing the Finished Product
484(2)
Summary
486(1)
Field Trip
486(3)
Part VIII: One for the Road
CHAPTER 23: Changing Perspective with Scrolling Backgrounds
489(30)
What Is a Scrolling Background?
490(2)
Side-Scrolling Backgrounds
490(1)
Vertical-Scrolling Backgrounds
491(1)
Parallax-Scrolling Backgrounds
492(1)
Understanding How Scrolling Backgrounds Work
492(2)
Adding Scrolling Background Support to the Game Engine
494(10)
Creating a Background Layer Class
495(7)
Creating a Scrolling Background Class
502(2)
Building the Wanderer Example
504(13)
Writing the Program Code
505(11)
Testing the Finished Product
516(1)
Summary
517(1)
Extreme Game Makeover
517(2)
CHAPTER 24: Example Game: Stunt Jumper
519
How Does the Game Play?
520(1)
Designing the Game
521(6)
Building the Game
527(16)
Writing the Game Code
527(16)
Testing the Game
543(2)
Summary
545(1)
Extreme Game Makeover
546(1)
Field Trip
547(3290127)
Part IX: Appendixes on CD-ROM
APPENDIX A: Selecting a Game Development Tool
CD:551
Microsoft Visual C++
CD:553
Borland C++Builder
CD:553
Bloodshed Dev-C++
CD:554
DJGPP
CD:554
APPENDIX B: A C++ Programming Primer
CD:555
C++ Language Basics
CD:555
The C++ Development Cycle
CD:556
Creating a Simple C++ Program
CD:557
Documenting Code with Comments
CD:559
Providing Code Separation
with Whitespace
CD:560
Organizing Code into Functions
CD:560
Manipulating Data with Expressions
CD:560
Enhancing the Program Example
CD:562
Variables and Constants
CD:563
Types of Variables
CD:565
Case Sensitivity
CD:566
Keywords
CD:566
Strings and Arrays
CD:566
The if Statement
CD:567
Relational Operators
CD:568
Functions
CD:570
Global Variables
CD:572
Modules
CD:572
Doing Things More Than Once
CD:573
Doing Things at Least Once
CD:574
Doing Things Zero or More Times
CD:574
The for Loop
CD:575
switch Statements
CD:576
Incrementing and Decrementing
CD:577
Learning the Bare Essentials of Classes
CD:578
Classes Versus Instances
CD:578
Declaring a Class
CD:578
Understanding Methods
CD:579
Initializing and Cleaning Up Objects
CD:579
Destructors
CD:580
Where to Go Now
CD:581
APPENDIX C: A Windows Game Programming Primer CD:583
Windows Programming Essentials CD:583
Event-Driven Programming
CD:584
Communicating with Messages
CD:585
Understanding Device Independence
CD:585
Storing Program Information as Resources
CD:586
Dealing with Strange Data Types
CD:586
Unconventional Coding Conventions
CD:587
Peeking Inside a Windows Program
CD:588
Where It All Begins
CD:588
The Window Class
CD:589
Creating a Window
CD:590
Handling Messages
CD:591
The Window Procedure
CD:592
Working with Resources
CD:594
Building the Skeleton Example CD:595
Writing the Program Code
CD:596
Assembling the Resources
CD:599
Testing the Finished Product
CD:601
APPENDIX D: Creating Graphics for Games
CD:603
Assessing Game Graphics
CD:603
Determining the Game Screen Size
CD:603
Reaching the Target Audience
CD:604
Establishing a Game Setting and Mood
CD:605
Adhering to a Graphics Style
CD:606
Exploring Graphics Tools
CD:606
Image Alchemy
CD:607
Paint Shop Pro CD:607
Graphic Workshop
CD:607
Creating and Editing Graphics
CD:608
Line-Art Graphics
CD:608
3D Rendered Graphics
CD:608
Scanned Photography and Video-Captured Graphics
CD:609
Background Graphics and Textures
CD:610
Animated Graphics
CD:610
Finding Graphics
CD:611
Index 551

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program