Chapter 10
Game Design Theory

There is no sure-fire way to predict whether a game will be successful, but there are certain attributes that contribute to success. Certainly a game should have a goalwithout one, what is the point in playing? Rules should be straightforward and logical. The game should also be a challenge; if it requires no skill, you will quickly tire of it. A game should evoke either fantasy or your innate curiosity; if it isn't novel or puzzling, it becomes boring. And lastly, arcade games, that by definition have a lot of action, should be easily controllable.

Game objectives take two different forms. There are games where you gradually approach the goal, like destroying a fleet of invaders in Galaxian, eating all the dots in Pac Man, or rescuing all of the hostages in Choplifter. There are other games where the goal is to avoid catastrophe. Examples of this range from preventing a nuclear power plant meltdown in Scram, to saving your cities during a nuclear missile attack in Missile Command, or preserving all of your fuel canisters in Ripoff. Do not confuse these two kinds of game objectives with the simplistic and mindless act of scoring lots of points by shooting everything that moves.

Goals must suit a player's expectations or fantasies. This is why certain people like certain types of games better than others. The battle lines of good against evil lurk in the background of many space games, wherein evil, menacing invaders are bent on the destruction of Earth. It becomes the player's goal to protect the Earth as long as possible while scoring the most points for killing aliens. Other appealing goals range from accumulating the most treasure while exploring a dangerous cavern, to escaping from a crumbling building before it collapses or your food runs out.

Computer game fantasies derive some of their appeal from the emotional needs they satisfy. Different fantasies appeal to different people. Sometimes the fantasy is simply an adolescent emotional release as in Food Fight, where you battle piethrowing chefs with tables full of messy food. The fantasy of destroying objects during a game appeals to others. It can take the form of popping balloons by bouncing a clown off a teeter-totter, as in Clowns and Balloons, or breaking out bricks in a wall, as in Breakout. In each case, the partially-destroyed wall or rows of balloons presents a visually compelling goal and a graphic scorekeeping device as well.

Goals in most games imply an end point, either when the goal is reached or when you fail, It is often important to make sure the game doesn't just go on and on forever. Limits should be set. Sometimes these take the form of time limits or constantly diminishing amounts of ammunition, balls, or ships. The most widespread limiting factor, at least on home computers, is speeding up the game. it is also the most abused. A game tempo, where it is neither humanly nor mechanically possible to withstand the onslaught of the computer's forces, cheats the player.

For a game to be considered challenging, it should have a goal where the outcome is uncertain. If the player is certain to reach the goal or certain not to reach it, the game is unlikely to present a challenge, and the player will lose interest. It is very easy to introduce randomness into the game either by hiding important information or by introducing random variables that draw the player toward disaster. Be careful not to overdo this, since a totally random game lacks a skill factor. Players quickly discover that they have no control over the outcome.

One of the more important design elements in any game is a logical set of rules. The rules can be extremely simple or utterly complex, but they must make sense. Since the game must follow its theme, any rules or variations should stem directly from that theme. It is pointless to throw in game elements that simply don't belong just because you think that confusing the player would make the game more difficult. For instance, Donkey Kong, one of the best jumping, climbing arcade games, doesn't require the player to shoot everything in sight, just avoid obstacles to reach the goal. Similarly, a tough, shoot-'em-up game like Galaxian keeps its fluid alien attack uncluttered by distracting game elements.

A game like Galaxian is considered asymmetric. It is not a balanced game because both the player and the computer's alien fleet are unbalanced in strength. Yet the differences between the advantages and disadvantages of the two opponents are too similar to build triangular relationships that make an arcade game more interesting.

The triangular relationship is one in which each opponent can defeat one other or be defeated by the third. The relationship is often used in many games to lure the player into a trap by sacrificing a weakly-armed player. Battlezone is a good example. The computer maneuvers the saucer to entice the human into a poor position against the tank. Time Pilot lures you into a poor position more subtly by placing the bonus parachute directly in line with the incoming enemy fighter pack. Other games use the bonus to distract you. Sky Blazer nearly always drops a fuel canister just at the time that your target appears, and bomb targets come up in Xevious just when you are engaged in a heavy fire fight with the alien armada.

A variable difficulty level is often used to alter the game's level of play. These levels, often with ego-satisfying names like Star Commander or Pilot, can be set by the player. Many games are designed to become harder the further you progress. The increasing skill level requirement presents an added challenge, while preventing the player from growing complacent. Often the technique is to speed up the game or place additional enemy craft into battle. The player is required to play faster and better, honing his reflexes during the process. Another variation allows less time to complete your objective as the difficulty increases.

Care must be taken so that the game's level of difficulty progresses evenly from beginner to expert level, Players' scores should reflect a steady improvement in what is known as a positive monotonic curve. A game with a relatively flat curve is hard to learn, while a sharp jump means that there is some trick required to master the level. Games that don't have a positive monotonic curve frustrate players because they fail to provide reasonable opportunities to better one's score.

Any good game should offer a reward for reaching increasingly. difficult levels of play. Often, bonus points, extra balls, ships, or more ammunition are rewarded for exceeding score thresholds. It is important that the rewards for winning outweigh the disappointment of losing. A player's ego is involved. A person wants to beat a challenging game, not be humiliated each time he loses.

The ideal arcade game should foster the illusion of winnability at all levels of play. One important factor is a clean and simple game design. Too much detail or too many rules may intimidate the player. If a player believes that his failure was caused by a flaw in an overly complex game or by the controls, he will consider the game unfair and quit. On the other hand, if a player perceives failure to be attributed to correctable errors on his part, then he believes the game to be winnable and will play repeatedly to master the game. It's as if the player teases himself to play one more time.

Appealing to a player's curiosity effectively keeps a game interesting. While novelty is sometimes a crucial factor in the original purchase, if the game has little depth, it becomes repetitious and boring. One method that appeals to many game designers is to have the game progress to slightly different scenarios. Some games change the opposition, while others vary the scenery; some do both. The player has to excel if he is to satisfy his curiosity. Games like Threshold, which progresses through twenty-four sets of alien spacecraft, or Vanguard, in which both the scenery and alien craft changes, offer strong curiosity incentives.

These spurs to a player's interest in the game are called "Perks." They are most important just when the player thinks he has the game figured out. Perks must be carefully timed so that the player does not give up on the game because not enough happens soon enough or because everything the game has to offer has been seen too soon. The most common perk is an extra life. Consider these coin-op video games: Pac Man, Donkey Kong, Dig Dug, Joust, Marto Bros., and Tempest. These games have multiple screens. The different screens by themselves are a perk, but what these games have in common is the time at which an extra life is rewarded. The extra lives generally come to the average player at some point in his third screen. This is hardly coincidental. The screens are scheduled at a specific rate, somewhat dependent on the player's skill. The extra life on the third screen comes in just before the average player might become exasperated and so not put in another quarter. The novice player is usually out of lives at this point, too.

Some games use cartoon intermissions to perk up the game. The player's interest is renewed with each cartoon. For many players, seeing the next cartoon becomes a personal goal. Placing hidden features not even hinted at in the rules is another clever perk. These embellishments are left for the experienced player to discover. They can even brighten up the earlier levels of a game which has become dull for the expert. For example, in the coin-op version of Star Wars, players hear the voice of Obi-Wan Kenobi admonishing them to use the Force. Nothing in the game instructions tell them what to do. Only by experimentation will a player realize that he must fly through the trench without firing a shot to receive a substantial point bonus upon reaching the exhaust port. The high score feature can also be considered as a "perk." While it doesn't renew interest within the game, it is important because it can renew interest in playing even a mediocre game again. The high score itself presents a personal goal to reach, whether it be to beat your own high score or someone else's.

Sometimes varying the player's emotional response during the game serves as a "perk." Tension can be relieved during a tense shoot-'em-up with occasional comic relief, while cute games sometimes need touching moments. Remember games as entertainment need contrast. In sum, the varieties of perks are endless, but their objective is the same: renew interest in the game before the player becomes tired of it.

A game's controllability is one of the more important considerations in design. It is sometimes referred to as human engineering. Designers usually choose between keyboard and paddle/joystick control. While eye/hand coordination is more effective with paddles or joysticks, programmers attempting to create games with too many control functions will opt for a keyboard control system. At times, they produce a game that requires nine or ten keyboard controls which, unfortunately, only a pianist can operate. Games whose controls require considerable time to master often prove frustrating to play.

The ability to accurately control the action is crucial in the I design. If the screen does not respond immediately to the player's input, the player may end up feeling out of sync and become frustrated with the game. The programmer must insure through careful design that the game responds properly to the player. The player shouldn't believe, for example, that the computer made a wrong turn for him in a maze game.

Apparently, Atari owners like games which pit them against a competitive computer opponent. In several multi-player games, groups of two or more simultaneously compete against each other. Most of these contests are sports or card games involving two to four players. The cooperative game is rarely seen, except in cases where the computer competitor is much too skillful. The arcade game Ripoff involves a computer opponent that is more than a match for two players playing simultaneously. The battle is so fast and fierce that the teammate's ship has to be protected from his partner's bullets. The home computer version of Wizard of Wor offers a choice of competitive or cooperative play. It is a tough game that really needs cooperative play if the more advanced game levels are to be reached, but cooperation in this game is by agreement, not by mutual invulnerablity. Your partner is even worth 1000 points if you mistakenly blunder. It is quite interesting to watch cooperation turn into a fiercely competitive game after one player inadvertently walks into the other player's line of fire.

So far, we have discussed theory and generalizations that should increase a game's playability and appeal to the public. Concrete examples of the more popular games should give you a much more solid foundation for your own designs.

Example Arcade Games

Space Invaders was the first really popular arcade game. The object is to defend your turf against an alien horde of ferocious invaders who attack your castles and gun bases with a barrage of undulating bullets. It is actually a timed game, since you only have a limited period to destroy the entire attacking wave before they descend to the ground in marching formations and overrun your lone gun base.

The elimination of each alien acts as a visual scorekeeping device. You can never win, only survive as long as possible (thus getting the maximum playtime for your quarter). Elimination of each attacking wave, however, is an intermediate goal that staves off your inevitable doom. Each successive level becomes more difficult since the aliens, which begin their attack increasingly closer to Earth each round, limit the amount of time that you have to destroy them. Their constant approach to your mobile gun base decreases the reaction time needed to avoid enemy fire.

Shoot-'em-up games like Sneakers, Galaxian, Threshold, and Galaga are actually spin-offs of the Space Invaders theme. Whether they are set in space or on the ground, each has a variety of targets bent on your destruction. The targets or attackers are no longer static. Either they appear to dodge your fire, or they resort to kamikaze-type attacks.

The strong appeal of these types of games is based on curiosity and game depth. You are inspired to do better with each game just to see what the attackers are going to look like in the next level and what their tactics might be. The design goal is variety, with each successive level slightly harder than the last. Although most offer an unlimited number of bullets, Threshold controls rapid, random, and wasteful firing by overheating your lasers. Thus, your firing must be more accurate and paced during the game.

The popularity of Pac Man can be attributed to the game's design. First, it satisfies the fantasy concept of a person's childhood dreams. As children, we dreamt that we were being chased by evil monsters or ghosts, and we felt powerless to stop them. We

Pac Man screenshot

wished that there were some way to turn the tables, if only for a few moments. Pac Man's four energy dots fulfill that fantasy. The game also offers the visual feedback of the number of remaining dots to be eaten at each level. And since clearing each individual level is an immediate goal, even beginners believe a level can be cleared. Because Pac Man is a game of consumption rather than one of destruction, it appeals to players of both sexes.

The game becomes a learning experience for the more advanced player, since the ghosts follow a discernible, non-random pattern. A player is eventually able to predict their movements and, consequently, to develop a technique to clear all of the dots on a particular level. The long term goal is survival and the highest score. The game is designed so that you gain more pleasure as you get better. Thus, players are willing to devote the time and money to master the game.

Scrolling games, such as Super Cobra, Vanguard, and Tail of Beta Lyrae, wherein your ship travels over a multi-screen world, benefit strongly from player curiosity and visual variety. Vanguard, a shoot-'em-up game in which a variety of enemy vessels and creatures attack your ship, has an extremely long sinuous tunnel with various types of chambers. The game has so many sections, combined with scrolling directions which change from horizontal to diagonal to vertical, that it is like playing many different arcade games at once. The player is given the option several times during the game to enter battle with a time-limited, energized spacecraft equipped for ramming the enemy, or merely four plain, old directional lasers. A map displayed in the lower corner informs the player of his progress. The curiosity factor is so enticing in this game that thirty seconds are provided to lure you into inserting another quarter in order to continue from where you left off.

Vanguard screenshot

Super Cobra is a classic game wherein you fly a helicopter over scrolling alien terrain and through heavily fortified and obstacle-filled narrow tunnels. Initially, you have to survive ground-launched rockets and a few laser bases, but as the game progresses you must also contend with meteors and alien ships. Using either your bombs or lasers to clear the tunnels of protruding ground targets is crucial to your survival. Bombing accuracy is also important. If you don't replenish your fuel supply by hitting enough fuel depot targets, your game will soon be over.

Pole Position, a highly competitive game, appeals to many players because it mixes just the right amount of fantasy with reality. It fulfills the fantasy of being a race car driver without the inherent danger. Crashes are never fatal and do not end the game. The goal of the game is to qualify for and complete the race. In a sense, it is a very realistic simulation requiring shifting gears and precise steering on a scrolling roadway. The player has a three-dimensional view of the course and his car, as if he were following it from fifty feet behind, a sort of out-of-body effect.

Pole Position screenshot

Joust immediately comes to mind when discussing a pure fantasy game that traces its roots to the glamorous days of medieval chivalry. Instead of presenting two knights in shining armor dueling on horseback, Joust allows the player to fly his ostrich-like mount to do battle in midair. The player does not shoot his opponents but defeats them by ramming his mount and lance into theirs, sometimes delicately, sometimes violently. The higher mount always wins. The player gains the excitement of physical contact without a bloody nose.

The game constantly forces the player into action. He must keep hitting the action button to make his mount fly. When the player takes a short rest between screens, his

Joust screenshot

surrogate also rests and does not continue to fly along aimlessly as it might in other games. Two players can play simultaneously but are not forced into partnership. The Lava Troll on the bottom of the screen is an additional menace both to the player and his enemies. It attempts to grab at anything close enough and drag it into the lava. This sometimes works to the player's advantage, since the lava can imprison an enemy and make it easier to destroy. A more formidable enemy, the pterodactyl that appears on higher levels, requires the player to discover a way to defeat it. As an added perk, every fifth screen is a bonus level where the player need not fight anyone but simply pick up the eggs for additional points. Many times this earns the player an extra life or at least a temporary rest from the game's pace. Physical contact, originality, immediate player involvement, and monster interaction are key parts of this game's success.

Some of the most clever games can be classed as novelty games. These are often "cute" games involving human or animal characters with which the player can identify. These novelty games either follow the theme of rescuing someone, or require the player to develop good manual dexterity and precise timing skills in order to avoid catastrophe or the demise of the hero.

The rescue theme appears in games like Donkey Kong, Donkey Kong Junior, Fantasy, and the Adventures of Roby Roto. In many cases an actual rescue doesn't take place, but the theme carries the player from one portion of the game to the next. In both Donkey Kong and Fantasy, the girl is whisked away to the next screen just before the player reaches her. The objective isn't the rescue but to overcome the obstacles barring your way. Learning the patterns and precise timing through repeated play hones the player's skill.

Donkey Kong screenshot

Although playing the hero is rare in these games, two games have followed this theme: The Adventures of Roby Roto in the arcade, and Choplifter on most microcomputers. The latter is probably the purest in theme of the two. The rescue of sixty-four hostages is the one and only goal. Success is measured in the number of hostages rescued. The fact that the player may have destroyed twenty-seven enemy tanks and planes during the mission adds nothing to the score. Thus, while details

Choplifter screenshot

like the hostage's waving builds empathy for the hostages, the appeal is simply the ego-satisfying role of playing the hero.

In the final group of novelty games, the player must avoid the calamity of losing a life. The goals and obstacles in these games differ widely. Crazy Climber requires the player to scale a building while windows close to block the path, and angry tenants, attempting to knock the climber off the building, drop flower pots on his head. Frogger has the player brave traffic in a test of precise timing skills. And playing Tarzan in jungle Hunt requires dexterity and timing skills to swing from vine to vine like a trapeze artist, or risk death in the fall. In each of these games the cuteness is what first attracts the audience, but it is the development of the player's timing skills and game depth that keeps him playing. Again, the concept is variety, along with increasing levels of difficulty.

Arcade games have that indefinable ability to make you feel that your losing is just a fluke, and that if you play just one more time, you'll beat it. If you can design a game that is fun and exciting to play, and has that added quality, then you have designed an addictive game, and wealth beyond your wildest dreams may be yours.

Frogger screenshot

What Can Go Wrong

The best piece of advice that we can give a game programmer is to carefully plan out your game before you begin programming it. First decide what results you want and work backwards to figure out what you have to do to get them. If it doesn't work, change your concept or goal until you get something you are satisfied with. Make sure the game follows real-world physical principle, so that it feels right on a gut level. For example, objects smash or bounce when they fall from any height.

Many novice programmers try to get something up on the screen immediately. Actually, there is nothing wrong with this technique. After all, it does give you some encouragement to continue. However, most develop their games on a piecemeal basis, adding something because it looks good or because they need more action. The result is that they soon run out of players or characters and are forced to do a very painful rewrite.

Everyone prefers to organize his game differently. Some, like me, prefer the tight- structured approach of a flowchart; others, like my partner, just write down a rough outline of the order of events in the game. Whichever approach you prefer, we strongly recommend that you develop many of your frequently used routines as independent subroutines. This approach simplifies the logic of the main code loop.

We carefully planned all of the games in this book before we wrote them. This means that we considered where items like screen memory, player-missile memory, the character set, and the actual game code were placed in memory. We roughly flowcharted the game's main logic loop. We then wrote the code in small chunks, but in such manner that it always ran, or at least was supposed to run.

The first priority was to draw the playfield. This generally means that we had to get the display list right and move the character set data into the correct section of memory. It may sound like a piece of cake, but some terrible things can go wrong. Sometimes the display list is too long because you forgot that the first LMS instruction is one of the mode lines. The screen rolls or goes wacko. Maybe you let the display list inadvertently cross a 1K boundary, or allowed screen memory to cross a 4K boundary in the middle of a mode line. Each of these mistakes can cause the screen to behave erratically. If you do get a stable display, and it isn't the one you specified, perhaps you forgot to tell ANTIC where either your display list or your RAM character set resides. It is possible that you didn't place your character set on a 1K boundary, or on a 1/2K boundary if you are in GR. 1 or GR. 2. The fastest method to troubleshoot the problem in Assembly language is to enter the monitor and look at the intended areas for the display list and character set and to see if they are actually there. It is quite possible your memory move routine is faulty.

The next step is usually to initialize the starting positions of your players. Sometimes they just don't appear, so you immediately check to see if the player shape is actually in the proper 256 bytes of player-missile memory. You should also check that the PMBASE is on a 2K boundary for singleline resolution players (1K boundary for double-line resolution), and that you told ANTIC where that is. If that isn't the fault, some programmers make the mistake of trying to read a player's horizontal position by looking at the ANTIC horizontal position register. You may be able to write a horizontal position to the hardware location, but you read collisions from these same hardware locations. If you are going to increment a player's horizontal position, you will need to update a RAM location before writing the value into the hardware register. If this doesn't appear to be the problem, there are two other possibilities. First, you may have forgotten to turn on player-missile graphics switches. But probably the most frequent mistake is to forget to set the player's shadow color register. If it isn't set, it defaults to the background color, blends in with the background and disappears. Always use the shadow color register to change or set color registers, or the change may only last one television frame because the hardware registers are updated every VBlank. The only exception to this rule is when you use a Display List Interrupt to change colors midscreen.

Display List and Vertical Blank Interrupts can sometimes cause unforeseen problems. Inexperience is usually the culprit. The first thing to remember is that you must have a program to interrupt from. Since it is easy to write a simple game entirely in Deferred Vertical Blank, the main loop can be as short as FOREVER JMP FOREVER. The machine will hang up if you don't have somewhere to jump back to at the end of the VBI. On the other hand, if the code is too long, it will be interrupted by the next VBlank before it finishes. Unexpected results, such as a garbaged screen, may occur. The most common problems with Display List Interrupts occur when you forget to save your registers before entering the routine or forget to restore them before exiting. A mistake here will lock up the machine. The other problem is when the interrupt seems to occur on the wrong mode line. Remember that the interrupt has to be set on the mode line before the interrupt is to occur.

BASIC programmers who use Machine language subroutines sometimes encounter strange problems. If you are going to incorporate a VBlank routine, make sure you clear the decimal mode at the beginning. This is especially important if your program uses decimal arithmetic internally. Another problem occurs when you pull the incorrect number of bytes off the stack. This can lock up the machine on the return if the return address on the stack is incorrect. Unfortunately, these subroutines are very difficult to test in Assembly language without constructing a setup routine to simulate the stack environment.

BASIC is usually very forgiving, so it is unlikely that you will lock up the machine if you aren't using Machine language subroutines. One of the most common display mistakes is forgetting to set a graphics mode after you lower RAMTOP to reserve space for your RAM character set and player-missile graphics. If you forget, you will still have a Graphics 0 display just below the old RAMTOP. The new graphics call will actually place the screen below RAMTOP.

We hope we have suggested adequate solutions for the most common errors that might occur in your games. We have learned many of these by bitter and frustrating experience. We will admit that these weren't the only errors that we encountered when programming the code in this book. However, most of the others were logic problems that one of us alone couldn't trace. For example, when I was programming the maze game, I programmed the manual mode for the joystick-controlled letter first. It worked fine, but became buggy when I added the auto mode. Sometimes the letter would behave properly, yet at other times it would escape the maze walls. I single-stepped the code repeatedly and the legal move flags were always set correctly. Days went by and I couldn't find any cause for the anomaly. My partner discovered that it only happened just after the stick was returned to neutral. While legal moves were reset at the center of each maze block, moving the stick was required to close pathways other than those in the direction of movement or in reverse. Nothing was done in the neutral position because the letter was stopped in the non-auto mode. Since I had neglected to close gates when I was in the neutral position, the joystickcontrolled letter was now traveling in some direction automatically, so it became possible to give it a new direction command while it was between blocks. For example, if it had just passed a block that said it could go right, pushing right from the neutral position would command it to go right even though there was a wall there. In short, I forgot to close gates when I was in the auto mode, because I assumed they were set by one of the four non-neutral positions. This is a fine example of misguided thinking.

In closing, we hope that we have provided you with enough programming techniques and game theory to create your own arcade games. Remember that originality, persistence and attention to detail are the keys to success in this industry. We hope some of our readers will join the ranks of successful Atari game designers. If you take the easy way out and program a quick game, the results will show in mediocrity.

Return to Table of Contents | Previous Chapter | Next Chapter