Sams Teach Yourself Game Programming in 24 Hours

Sams Teach Yourself Game Programming in 24 Hours

by Michael Morrison
     
 

Sams Teach Yourself Game Programming in 24 Hours demystifies game programming by providing clear, practical lessons using C/C++, the industry standard in game programming. The book focuses on the Windows API to construct games for the Windows platform and discusses game theory, including double-buffered graphics, sprite animation, and digitized sound

…  See more details below

Overview

Sams Teach Yourself Game Programming in 24 Hours demystifies game programming by providing clear, practical lessons using C/C++, the industry standard in game programming. The book focuses on the Windows API to construct games for the Windows platform and discusses game theory, including double-buffered graphics, sprite animation, and digitized sound effects and music. A fully functional game engine provides readers with the ability to create their own future games.

Editorial Reviews

The Barnes & Noble Review
Thousands of programmers share the same guilty fantasy: They'd rather be programming games. Hey, the U.S. video game hardware and software sales will be worth $10-$12 billion in 2003. There ought to be a place for you in an industry this big.

Of course, game programming is its own world: Writing game engines is a far cry from writing Windows-based B2B applications. One great way to get started is to read Sams Teach Yourself Game Programming in 24 Hours. Expert Windows programmer and author Michael Morrison presents a complete first course in Windows-based game programming, organized in 24 hands-on lessons.

You'll start with a high-level overview of the basics of game design, from concept and storyline to visualizing graphics, controlling game play, and exploring the tools of the trade. Even if someone else winds up making these decisions, Morrison's introductions clarify exactly how you'll fit into the process.

In "Hour 2," Morrison introduces Windows-specific aspects of game development, from basic event-driven programming to handling strange data types and unconventional coding conventions.

Next, he explains how game engines streamline the tasks that recur in most games (for example, initialization and cleanup). You'll walk through creating a simple game engine, learning how to separate game code from standard Windows code -- so you can hide the muss and fuss associated with Windows programs, and focus more energy on building great games.

Morrison next moves on to simple game graphics programming, introducing basic Windows graphics techniques and taking you "under the hood" with bitmap images and classes. In "Hours" 6 and 7, you take an in-depth look at input devices, learning how to control games with the keyboard and mouse, how to revamp your game engine to incorporate input from joysticks.

Along the way, you've been writing plenty of C/C++ sample code; now, Morrison shows how to integrate what you've learned into a complete -- albeit simple -- game. Then, it's on to animation.

In a "Crash Course in Game Animation," Morrison explains key concepts such as frame rate, compares 2D and 3D animation, and shows how animation can be applied in games. You'll learn how to use "sprites" in games, design an all-purpose sprite, integrate "sprite management" into your game engine, and then enhance the appearance of your sprite-based animation; for example, by eliminating flicker with double buffering.

At this point, you'll pause to write another complete game, drawing on the animation techniques you've just learned. Inspired by Frogger, Morrison's "Henway" requires chickens to cross the road without getting squashed. To build this game, you'll need to create and manage Start and Finish Areas, a Highway, as well as sprites for both chickens and cars. When your players' three chickens have all been run over, the game is finished (so you'll also need to help players keep track of how many chickens they've got left).

Next, you'll learn how to add audio tracks to your games -- and build "Battle Office," a game that chronicles an interoffice war between co-workers (neat idea, huh?) Then, it's on to animating your sprites and giving them backgrounds; building simple artificial intelligence into your games; adding splash screens and demo modes; even keeping track of high scores.

Look, we're not talking about graduate school–level algorithms, Lightwave 3D character animation, or DirectShow video rendering here. But if you want a solid basic foundation in Windows game development, you've come to the right place. Bill Camarda

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.

Read More

Product Details

ISBN-13:
9780672324611
Publisher:
Sams
Publication date:
12/24/2002
Series:
Sams Teach Yourself Series
Pages:
488
Sales rank:
1,147,132
Product dimensions:
7.40(w) x 9.00(h) x 1.20(d)

Related Subjects

Meet the Author

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 Myths, 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/.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >