Tricks of the Windows Game Programming Gurus:Journey into the Abbys

All ITKnowledge Source Code Search Tips Advanced Search |

| Tricks of the Windows Game Programming Gurus by Andre LaMothe Sams, Macmillan Computer Publishing ISBN: 0672313618 Pub Date: 09/27/99

Search this book:

Previous | Table of Contents | Next

### Brainstorming

Once you have decided what kind of game you want to make—which is usually easy since we all know what we like—it’s time to think up the game. This is where you’re totally on your own. There’s no way to come up with good game ideas consistently. Basically, you have to think of a game that you would like to make and develop it into something that sounds cool, is doable, and that other people will like as well.

Of course, you can get help by using other games as models or starting points. Don’t copy another product exactly, but loosely following successful products is fine. Also, read a lot of science fiction books and game magazines, see what is selling, and watch a lot of movies for cool story ideas, games ideas, or just visual motivation.

What I usually do is sit with a friend (or by myself) and just throw out ideas until something sounds cool. Then I develop the idea until it sounds plausible or it falls apart. This can be very frustrating. You may overthink all your ideas and throw your hands up after two or three hours. Don’t despair—this is a good thing. If a game idea survives the night and into the next day and you still like it, chances are that you might have something.

> Warning: I want to say something that’s very important, so listen carefully—don’t bite off more than you can chew! I’ve received thousands of emails from newbie game programmers who want to create something at the level of DOOM or Quake for their first game. It’s simply not going to happen. You’ll be lucky if you can finish an Asteroids clone in 3–6 months, so don’t get crazy. Set a reasonable goal. Try to think up something you can do by yourself, because in the end you’ll be working by yourself—people flake out. Again, try to keep your first game ideas simple.

Now let’s move on to some details.

### The Design Document and Storyboards

Once you have a game idea, you need to get it on paper. Now, when I do a big game product, I require myself to make a real design document, but for little games, a few pages of details will do. Basically, a design document is a roadmap or outline of a game. It should have as many details about the game, the levels, and the gameplay as you can think of. This way you know what you’re making and can follow some kind of plan. Otherwise, you will keep changing things and your game will end up being incoherent.

Usually, I like to write down a simple story to begin with, maybe a page or two that describes what the game is about. Who is the main character? What is the idea of the game? And lastly, how do you win the game? Then I decide on the hardcore details of the game—the levels and the gameplay—and outline them as much as possible. When I’m done, I can always add or delete things, but at least I have a working plan. If I think of 100 cool new ideas, I can always add them and not forget them.

Obviously, the amount of detail is up to you, but write something down. At least some sketches! For example, maybe you don’t even want a full design document and are more comfortable with some crude sketches of the levels and gameplay. Figure 1.3 is an example storyboard that you might make for a game. Nothing complicated, just something to look at and work from.

Figure 1.3 A basic storyboard.

### Making the Game Fun

The last part of designing a game is the reality check. Do you really think that the game will be fun and people will like it? Or are you lying to yourself? This is a serious question. There are about 10,000 games on the shelves and about 9,900 companies going out of business, so think about this. If you’re totally excited about the game and can imagine wanting to play it more than anything, you’re in the ballpark. But if you, as the designer, just get lukewarm about the idea, imagine how other people are going to feel about it!

The key here is to do a lot of thinking and beta testing of the game and add all kinds of cool features, because in the end it’s the details that make a game fun. It’s like fine workmanship on a piece of handcrafted oak furniture (I personally hate wood, but work with me). People appreciate the details.

### The Components of a Game

Now it’s time to look at what makes a video game program different from any other kind of program. Video games are extremely complex pieces of software. In fact, they are without a doubt the hardest programs to write. Sure, writing MS Word is harder than writing Asteroids, but writing Unreal is harder than writing any other program I can think of!

This means that you have to learn a new way of programming that’s more conducive to real-time applications and simulation, rather than the single-line, event-driven, or sequential logic programs that you may be used to. A video game is basically a continuous loop that performs logic and draws an image on the screen, usually at a rate of 30 frames per second (fps) or more. This is similar to how a movie is displayed, except that you are creating the movie as you go.

Therefore, let’s begin by taking a look at a simplified game loop, as shown in Figure 1.4. The following list describes each section.

Figure 1.4 General game loop architecture.

#### Section 1: Initialization

In this section, you perform the standard operations you would for any program, such as memory allocation, resource acquisition, loading data from disk, and so forth.

#### Section 2: Enter Game Loop

In this section, the code execution enters into the main game loop. This is where the action begins and continues until the user exits out of the main loop.

Previous | Table of Contents | Next

Copyright © Macmillan Computer Publishing, Inc.

Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.