GameDevLessons.com has migrated to HobbyGameDev.com - please update links!




Chris DeLeon's GameDevLessons.com Free Lessons

Vol 8 - November 21, 2009


Hello!


I'm Chris DeLeon (about me), and thank you for joining me for my monthly videogame development Free Lessons, Vol. 8. This series is one of the ways that I aim to help new game developers get started, while helping current game developers take their work in new directions.



I.) Past Editions, Subscribe

II.) Beginner - How Programmers Program

Not From Start to Finish

From the Outside In

Enable Fast Iterations to Test Changes

Errors Are a Sign of Progress, Not Failure

Your Patient Teacher

Matching {Braces} While Typing

Scaffolding: Temporary Work Improving Lasting Work

Debugging

Internal Tools

Start Focused on What's Interesting


III.) Intermediate - Real-Time AI

Smart is Not What People Think

Smart is Unpredictable

Smart has Priorities

Smart Break for Examples

Smart has Personality

Smart Acts Decisively

Smart Groups Have Emergent Teamwork

Smart is Verbose

Smart Builds Upon Smart

Smart Code is Simple

We're Not Trying to Beat Kasparov


IV.) Advanced - Respecting Players

Kids Aren't Small, Tone-Deaf Animals

Correlation Between Caring and Quality

Classics and Content

Adults Aren't Small, Tone-Deaf Animals, Either

Meaningful Violence

Some Videogame Examples

Loss of Gameplay Depth

Not Obvious to Players

Underlying Desires

Treating Adults like Adults


V.) Interview with Silent Hill's CGI Director

What's Japan Doing Differently?

Notes from the Interview


VI.) Donations



I.) Past Editions, Subscribe


To read previous editions, or subscribe: http://gamedevlessons.com/?page=free


If you would like to be notified when the next edition is available, you can join the mailing list. It only takes a minute, I will never send out more than one e-mail each month (only to announce these free lessons), and it's easy to unsubscribe at any time.


Though these lessons are not intended to be cumulative, the various topics in each may prove helpful. If you're new to these lessons, I recommend Newsletter Vol. 1 for its non-technical conceptual introduction to programming, and the links it contains to free resources for image editing, audio work, 3D modeling, and other asset creation.


II.) Beginner - How Programmers Program


Not From Start to Finish


As a beginning programmer, looking at finished example code can seem daunting. How, with any amount of experience, does someone know what key to type next? What is the thought process in someone's head while they're typing out new functions, classes, and algorithms?

Unless a programmer is retyping something that has been committed to memory, the characters aren't typed in their final order. Finished code for anything other than the most trivial of examples typically involves dozens, sometimes hundreds of iterations, each of which amount to drafting, editing, and polishing.

A Steven King novel is an impressive thing to read. A Spielberg film is an impressive thing to watch. Every piece seems well planned, and every scene throws something new our way. The pure density of ideas presented can seem overwhelming to an aspiring creative. But that quality of content doesn't just come together that way the first time, beginning to end. The final product came together only after countless drafts, aggressive editing, and years of attention paid to polishing ever last detail.

Why would computer programming be different?

From the Outside In


The first time that I compile any videogame project, the first version is a black screen. The second version that I compile is a black screen that makes a sound, or displays a rectangle. The third version will perhaps make the sound when spacebar is pressed, or move the rectangle to the last place the mouse clicks. Until those things work right, the videogame project isn't going to work anyway.

But that isn't just how the process starts - that's also how features get implemented. Whether planning went into which features are worth making (a good habit if you have enough experience to estimate how long different features will take, or how valuable they'll be in the big picture), or whether it's just time for hacking features together to explore and entertain creative whims (a good way to learn), the actual process is still incremental. A version is built with an unanimated character drawn on screen, the next version moves that character according to which control keys are pressed, the next version applies gravity to the character, followed by a jump ability, then collision with enemies, followed by hook up to animations, and so on. Between each step, there's compilation and brief playtesting to make certain that the last executed layer does what it's expected to do.

Enable Fast Iterations to Test Changes


Because of the iterative nature of this process, early on in development consideration should go into how to streamline the testing cycles. While the tendency of many beginners is to first make the logos, splash screen, and menus - again demonstrating the erroneous thinking that something ought to be made in the order it will be experienced in - I suggest working in the opposite order. Leave the interfaces and splash screens for last, when they'll slow down testing the least possible cycles, letting the game compile/run directly into play mode as early as possible and keeping it that way for the bulk of the development time.

Errors Are a Sign of Progress, Not Failure


Another part of the process in how programmers program is hitting frequent errors and obstacles. Whether we're setting up the development environment, writing core functionality, or extending existing functionality to tend to details, the process of programming is often a two-way dialogue with the machine.

We spend years in schools learning to associate red marks or answers marked wrong (especially to be redone!) as a sign that we have done something wrong. This thinking has no place in programming, particularly when the notification of what's "wrong" just comes from the machine.

Your Patient Teacher


The compiler can be thought of as a teacher with infinite patience. The compiler is always happy to proof-read code, and after passing that grammar/spelling inspection, it will show exactly what the work so far does.

It's a bad idea to wait until most of an work is done before making sure that it's being done right. If starting in the wrong direction, it'd be wise to find that out asap before the mistake grows throughout the program. When it comes to asking real human beings to look over what we've done - whether we're talking about parents, peers, teachers, or online forums - we have a carefully conditioned feeling that we should pester them only if we have to, because we have to respect their time and not interfere with their obligations.

The compiler doesn't have any plans for later.

Matching {Braces} While Typing


Much of the math that we do "on paper" is a process of jotting as much as we can on the page so we can devote our mental energy to thinking through the steps of (a.) what else to jot on the page (and b.) what are the proper processes to advance what's on the page to the next step. Even when we do mental math, most of us still wiggle our fingers to temporarily hang on to information (like carry digits) while we juggle other figures and steps in our head.

That's how the most expert programmers program. It's called "distributed cognition" by psychologists, so named because it distributes cognitive processes to include mechanisms outside the mind - but remembering the fancy word for it is less important than practicing it.

When typing a loop, function, or conditional (confused? see
Free Lessons Vol. 5), most programmers close braces pairs and quickly handle format indenting before the filling what goes on the inside. In other words, when I'm halfway through typing this:

for(int i=0;i<100;i++) {

printf("The secret password is XYZZY");

}


It doesn't look like this:

for(int i=0;i<100;i++) {

printf("The secre


It looks like this:

for(int i=0;i<100;i++) {


}


The distinction looks subtle, but what about when nestling two loops to perform a computation over all entries in a two dimension array, and checking with a conditional inside them, all within a function? Still, each matching right-brace "}" is typed immediately after the corresponding left-brace "{", so that the code is typed in the following order from 1st to 11th:

int some2DArray[100][100]; // from early in code...


void ValidateTheArray() { // 1st line typed


for(int y=0;y<100;y++) { // 3rd line typed

for(int x=0;x<100;x++) { // 5th line typed


if(some2DArray[y][x] == -1) { // 7th line typed

// TO-DO NEXT: type 10th line(s)

} else { // 8th line typed

// TO-DO LAST:type 11th line(s)

} // 9th line typed


} // 6th line typed. Matches 5th line

} // 4th line typed. Closes braces from 3rd line


} // 2nd line typed, Right half of 1st line typed


Closing out the braces and doing indentions before filling inside them in this case means fewer things to remember while thinking through what needs to be done inside the nestled loops. We thought about that part, put it down in code (like jotting numbers down for long division), enabling us to forget about it while we focus on writing the code at the innermost scope.

This is a particularly powerful habit because a mistake in matching braces can be one of the most difficult for the programmer, or even the compiler, to accurately diagnose. Because a mismatched brace changes what parts of the code relate to one another, the compiler may think that the error is someplace else far away in the code, or even give the unhelpful "expecting right brace at end of program" which means there could be a "}" missing anywhere in the code. Time not spent getting frustrated tracking down these hard-to-fix but easy-to-avoid code errors is time that can instead be spent productively iterating on functionality.

Scaffolding: Temporary Work Improving Lasting Work


The last part we'll cover here on how programmers program is to take advantage of the concept of scaffolding. Scaffolding in everyday use, for anyone less familiar with the term, refers to the temporary layers of ladders and wood-planks stacked in metal frames around the outside of a building while it's under construction, giving workers easy reach to everything. Once the building is completed, the scaffolding is torn down and removed, leaving behind a structure which could not have been built as efficiently or with as much attention to detail had scaffolding not been used.

What I call scaffolding, in the world of programming, is what most developers call "debug output". The idea is to temporarily include extra lines of code to help make visible the otherwise invisible calculations and flow of the program. Print statements (printf in C/C++), trace statements (ActionScript 3), log statements, and the like outputting information to the console like, "starting function GameDraw", "loading background image Swirl03", or "left mouse click detected" are examples of this.

Debugging


A good debugger and debugging environment, when available, provide this same functionality through breakpoints, although depending on the language, environment, and platform, a good debugger may not always be available. Breakpoints pause the program at a given instruction, enabling the program to advance one step at a time, observing numbers and changes in memory. This method, when available, is particularly well-suited to making sense of obscure technical bugs.

Breakpoints, like debug print statements or visualization of internal states, are removed or disabled from the game or source code before shared. Debug elements are not needed by the time a game or source code can be shared, because like the scaffolding around the new building, they have already been put to use in ensuring that the project itself came together.

Visualizing this information in-game can also be helpful sometimes when rooting out questions about real-time functionality that takes place across multiple frames which could be difficult to read from lines of text, such as drawing the player as a different color rectangle based on whether the collision code currently thinks that the player is on the ground.

Internal Tools


The greatest example of the scaffolding concept is the development of software that simplifies the development of software - level design tools, weapon/unit stat editing tools, animation tools - programs that enable design problems to be solved using design tools instead of through programming. Though they're (usually) not shipped with the final game, this additional programming work makes it possible for the game to be finished sooner and better. In smaller games - including most of my old 2D tile-based projects - sometimes the easiest way to build the level editor is to introduce it as a level editing mode in the game itself, hiding that functionality for the final release. That way the same assets (graphics/sounds), rendering code, and level formats are the same for both playing and editing as the code base develops.

When looking at example source, or playing a finished game, rather than thinking about how the entire program could have come together at once (a daunting task no matter how much experience someone has!), be thinking instead about how scaffolding of debug statements could verify aspects of the program while working on it, or about what the first few crude features would be developed and tested after the empty screen compiles. Test, then repeat.

Start Focused on What's Interesting


Think about music composition - the refrain or underlying tune is likely to be worked on before the beginning or end. Or a story might be built around one or more intense climactic scenes, which will need to be packaged between build up and resolution before being ready for others.

When an idea jumps into mind for a videogame, starting to write what the final videogame code might be like from start to finish - complete with rigorous class definitions for everything and all the trappings of a finished game's functionality - just doesn't make sense. Get the bare core working with as little code as possible at first, then layer and iterate.

III.) Intermediate - Real-Time AI


Smart is Not What People Think


"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."

-Edsger Dijkstra

There are a lot of films, novels, and comics about artificial intelligence. These present AI as a problem solving, self-preserving intelligence eager to assert its dominion over people.

There are a lot of non-fiction books, internet references, and university classes on artificial intelligence. These present AI as a pattern-matching, data-mining adaptive algorithm used to process mountains of messy, complex information.

AI in real-time videogames is not about trying to program intelligence. It isn't about making the best decisions, thinking through complex problems, or adaptive learning.

AI in real-time videogames is about creating the impression of intelligence. Generally speaking, the appearance of intelligence is all that we're going for - it's functionally pretty similar in such narrow domains, and infinitely more within reach than creating "real" intelligence.

What are the qualities that we can appeal to, in order to create the impression of intelligence during gameplay?

Smart is Unpredictable


If the "smartest" opening is move A, that move had better not be the opening every time, or the player will just be conditioned to react to that opening move every time. So long as one strategy works repeatedly, what the player is up against doesn't come across as intelligent, just mechanical.

The moment that pattern is broken, or that expectation is violated, the player will project intelligence onto the previously robotic computer entity. "Why did it switch to move B?" The real answer to this question doesn't matter - whether the program looks deeply into the player's eyes and reads his or her mind, or simply has a random 20% chance of doing something random - the important thing is that the player is forced to stay alert instead of always leaning on a memorized strategy. (Guess which of those two strategies is the most cost and time effective solution? Mind reading, or inserting a line that reads if((rand()%10)<2)... )

The 1997 game Trespasser, based in the Jurassic Park universe, attempted to create AI that "thought" based on needs around the ecosystem, but the end result was monsters wiggling around looking confused until they charged sideways at the player. By comparison, listen to a young person or non-technical player spending a few minutes in front of Ms. Pac-Man, and before long they'll blame the mostly random ghosts for all sorts of devious schemes.

Keep it simple. Throwing in a good dose of randomness at a high level for the enemies is often just as effective at creating the illusion of intelligence for the player as a more contrived system of reasoning that would take longer to develop.

Smart has Priorities


Heuristics - "fuzzy logic" is another term for this - is a way to simplify complex decisions involving many considerations into a decision about decisions.

The concept here is a powerful one, but simple once introduced. Instead of building a massive tangle of if-else conditional statements and boolean logic to determine an AI character's next move, the goal is to encapsulate what information derived from those variables means.

It's a form of divide and conquer. To use a business metaphor: how does a top-level executive make informed decisions? By asking each of their advisors and expert employees to offer distilled summaries of the issues they each believe are most important. In the same way, rather than trying to deal with countless variables all in the same part of code, we want to distill groups of variables into meaningful measures that we can base the high level decisions upon.

Smart Break for Examples


In
Burn 2, a real-time PC game involving up to 10 fast-moving AI ships thrusting in a variable gravity environment with procedurally-generated fully destructible terrain (in other words, very little absolute certainty), each AI has a few values that they evaluate independently each frame, and behaviors are determined by which of these values exceeds a priority threshold:

  1. Is the ship above minimum safety altitude to avoid ground collision?

  2. Is the ship below maximum altitude to ensure room for evasive maneuvers?

  3. How imminent is collision with a mountain (laterally) if nothing changes?

  4. Is the nearest enemy in firing range? Am I facing them to immediately begin firing?

  5. How close is enemy fire? Is one facing me which may be firing, and if so, am I facing them (to fire back) or facing away (to thrust away to safety)?

  6. Am I about to collide with an enemy? If so, do I have more health than the enemy? (Collision causes equal amounts of damage to both ships involved)

  7. Is my current target low to the ground, with little distance on each side, implying they are entrenched for cover? If so, switch to bombing patterns...

In Ghosts in the Machine, a real-time PC game involving 3-5 high speed projectiles ricocheting between 4 independent players (3 of which are AI), the AI keeps track of the following information for decision making:

  1. Is a ball heading toward my goal? (forget any other objectives, and protect the goal)

  2. Which players currently have a clear shot at my goal, and a ball to fire? (block that angle)

  3. Which players do I currently have a clear shot on, and if I have a ball to fire, are they blocking the gap?

  4. Is another player currently swamped with lots of incoming projectiles, that would be too overwhelmed to block if I fired now? (fire on them immediately!)

  5. Which player has caused my base the most damage? (aggressively hassle that player, to knock them out)

  6. Which player has won the most rounds? (target them, so that it won't come down to one on one against them later)

Smart has Personality


By changing which of the above is a priority for each AI player, I was able to produce personality differences between each of the AI figures (defensive, aggressive, and retaliatory), and by shifting a value between their impatience (premature firing) vs their sound decision making (higher threshold for likelihood of successful shot before firing), I was able to vary any of the 3 personality types from easy/dumb to hard/intelligent.

(Side note: Burn 2 was based on the classic game Gravitar, and Ghosts in the Machine was based on the classic game Warlords. To learn more about the design of Ghosts in the Machine, check out this
PDF presentation on its design I put together shortly after its completion in 2007.)

Smart Acts Decisively


Moods - or "finite state machines" - can encapsulate a sense of memory, reaction, decisiveness, and thus: intelligence. The way this works is that each character keeps a number tracking its state of mind. Is the enemy wandering, alerted, angry, or retreating? Is the enemy grouping together, spreading out, hunting for a health pack, or battling to the death on a kamikaze charge?

Smart Groups Have Emergent Teamwork


For an interactive demonstration of mixing randomness and determinism in AI that can be played quickly online, check out my experimental project
BeeDifferent. Experiment with the slider below the game to see how enemies which all behave optimally are trivially outsmarted, enemies which all behave randomly are easily outsmarted, but by using an even mix of the two, the effect is the have some spread out as mines while others force the player to run through said mines.


Smart is Verbose


Telegraphing the enemy's current state, and/or the transition into that state change, also goes a long way in creating the illusion of intelligence (though this shouldn't be too repetitive). The enemies turning red with anger in Bubble Bobble declares their current mood clearly, Metal Gear Solid bad guys get exclamation points over their heads, and enemies in No One Lives Forever and Thief (both of which were widely praised in their time for their otherwise normal AI, thanks to this single reason) announced things along the lines of "I can't find her!", "I know you're here!", and asking their comrades things like, "Did you hear something?"


Smart Builds Upon Smart


Big games - whether a First Person Shooter, Third Person Adventure, or Real-Time Strategy - invite some other AI needs like pathfinding. FPS and TPA games often include hand-placed nodes in the world giving AI clues for where doors are, where the center of hallways/rooms are, and where the best cover points are to kneel behind. RTS games can involve a bit of clustering (basics of facial recognition algorithms) to assess areas of defensive weakness. Basic vector geometry and dot products can be used to ascertain line of sight between characters (including trivially checking a character's facing), and trig (especially atan2) are useful in finding angles to shoot in, look at, run toward, or flee from.

Puzzle games are obviously a whole different can of worms, depending entirely upon the game's structure.

All that said, much of the real-time AI in most games still tracks back to (a.) creating the illusion of impatience and intelligence by being unpredictable (b.) reducing groups of variables into easily prioritized decision points (c.) committing decisively to display a range of possible behaviors and (d.) unsubtle announcements of the current behavior or moments of mood switching.

Smart Code is Simple


On the technical side, the AI "mood" (finite state machines) can be tracked simply by keeping two more integers per enemy. The numbers are used by setting one of the integers to an enumerated value corresponding to behavior #1 vs behavior #4 (etc.), and the other tracks how long the current behavior should continue before being reassessed. For example:

enum {

MOOD_WANDER, // same as "#define MOOD_WANDER 0"

MOOD_CHASE, // same as "#define MOOD_CHASE 1"

MOOD_MIMIC,

MOOD_FLEE,

MOOD_NUM // useful for randomizing mood

};


/* the larger the first number (200), the more decisive the enemy seems; the larger the second number (150), the less predictable the enemy seems */

#define NEW_MOOD_TIME (200+(rand()%150))


class Badguy_typ {

// skipping class variables definition here for brevity


int aiMood;

int cyclesTilMoodReconsidered;

Badguy_typ() {

aiMood = MOOD_WANDER; // begin unalerted

cyclesTilMoodReconsidered = NEW_MOOD_TIME;

// other character initialization goes here

}

void Move() {

if(--cyclesTilMoodReconsidered <= 0) {

aiMood = (rand() % MOOD_NUM); // random new mood

cyclesTilMoodReconsidered = NEW_MOOD_TIME;

}


/* cyclesTilMoodReconsidered is only intended as timeout, so that left on their own, unprovoked, enemies will seem unstable, curious, and impatient, like they have minds of their own. */


/* Within the switch statement below, it's fine to switch aiMood and reset cyclesTilMoodReconsidered even if it isn't time for a mood change yet. For example, if the enemy is within a certain range from the player, especially if line of sight is established, switch "aiMood = MOOD_CHASE;" */


switch(aiMood) {

case MOOD_WANDER:

// code for enemy that's wandering aimlessly

break;

case MOOD_CHASE:

// code for enemy aggressively going after the player

break;

case MOOD_MIMIC:

/* code for enemy that's copying the player's movements. This is simple but distracting. It gives a false sense of security suggesting the player is in control, but can turn aggressive unpredictably or upon getting in close. */

break;

case MOOD_FLEE:

// code for enemy getting away from the player

break;

}

}


// skipping other class methods for brevity

}


The above code snippet pretty well describes the AI for most of my first PC games, including
Pac-Deli, and Swarm. It's not going to appear intelligent in a one-on-one fight, but when the player is up against 3-8 enemies operating independently in this fashion, the player begins to interpret the emergent patterns of their mostly random (unpredictable!) behavior as teamwork, plotting, and strategy. In Pac-Deli I gave each ghost color a significant bias toward 1 of the 4 behaviors - half the time using their "personality" and half the time switching to a completely random choice - and this created the impression that one was more confused, one was more aggressive, one was intent on being tricky.

We're Not Trying to Beat Kasparov


Ultimately, it's ok if the AI isn't the smartest thing on earth. If the player outsmarts it, they'll feel like a champ. You don't need to prove to players that a computer can process and respond to information faster than they can.

As Ian Davis, the founder of Mad Doc Games told me, "The goal of videogame AI should be to put up a fair, convincing fight, and eventually lose."

IV.) Advanced - Respecting Players


Kids Aren't Small, Tone-Deaf Animals


From
Responsibility in Mass Communication by William Rivers, Clifford Christians, Wilbur Schramm (1981 revision; first edition published in 1957):

The following is a memorandum from network officials to the production staff responsible for one of the best children's programs which has appeared so far on television-

TO "CAPTAIN KANGAROO" PRODUCTION STAFF

The following are some random thoughts for your general guidance - not necessarily in order of importance.

1. The child viewer of TV can enjoy a clever game or a baby raccoon more than a pie thrown in the face.

2. No child should be called such names as "fatty," "shorty," or "string bean," by his school chums as a result of a character skit or anything appearing on this show.

3. A behavior hint can sound to a child like a common-sense idea or an irritating coy preachment from his prissiest aunt - depending on how it is handled.

4. When choosing the show's music, remember that it's to be played not for a small, tone-deaf animal, but for a young human of potentially great taste.

5. We think that our audience can enthusiastically admire a character without our providing any evidence that he can beat someone up.

6. It's possible for a child's oft-cited "innate aggression" to be worked off without the aid of a villain on our show for him to hate.

7. We have heard no psychological theory stating that a child's attention span is increased by loud noise and chaos.

8. In regard to props - we would rather a child learn from us that he can use his imagination and a kitchen chair to make an airplane than that he see a real super jet on this show.

9. The widespread TV tradition, that if it's tasteful, kids won't like it, is one we reject entirely.

10. In general, the fact that children are imitators outlines our scope and our limitations. If you're writing or planning anything that can create an undesirable model for a child to imitate in action or thought - throw it out, there's a better way to entertain him.

Part of why I left corporate videogame development is that it was made clear to me that modestly advanced vocabulary words would not be allowed in our videogame. I was told that a level with lots of shooting and explosions would be preferred over the sort of puzzles I had been preferring, which were aesthetically balanced and required inspection and occasional experimentation - that the average player would rather see fireworks than think. It seemed at times like few people other than me cared whether every story was another rehash of "mighty knight saves helpless damsel" instead of exploring the variety of other forms that relationships can take.

I did work according to my principles, and left with my integrity. Virtually all of the work that I left behind stayed in the game, and much of it was used in promo videos, demos, ads, and review screenhots. Why was what the corporate sensibilities wanted to restrain also what they wound up showing off?

Correlation Between Caring and Quality


At the end of the day, creative people do considerably better work when they're allowed to care.

If the attitude is that we're out to make dog toys for dogs to chew on - but replace the dog in that case with a human being who is treated as similarly incapable of learning - then the team is on track to be a junk factory.

If the attitude is that the audience is capable of learning and finds thrill by being clever, that the players can be trusted to be patient and persistent when challenged, that here's a once-in-a-lifetime opportunity to spend hours pushing an ever-developing mind's undivided attention to think effectively, the team is on track to treat their work with responsibility and attention.

Classics and Content


This is where Calvin and Hobbes came from, this is where The Neverending Story came from, it's at the root of work by Roald Dahl (Mathilda, Charlie and the Chocolate Factory) and A. A. Milne (Winnie the Pooh) and classic Disney (when they still cared; that is, when Disney's creative geniuses outnumbered their suits and lawyers).

What if you aren't working on a game for children? Most people in the entertainment industry go their entire career without making a product specifically for children, right?

Adults Aren't Small, Tone-Deaf Animals, Either


I'm proposing that it's important that we respect children, and treat them a bit more like adults. As an extension of this, I propose that it's even more important that we respect adults, and treat them a bit more like adults, too.

Express this sentiment to the wrong videogame developer - this idea that there's more to the potential of interactive media than blowing up aliens and armies - and expect to be gawked at
like you're some kind of lunatic.

(Don't get the wrong idea by my linking to that video for lunatic; I love that entire speech, and Chris Crawford is one of my very few heroes - watch 11 minutes in, read this, or check out this more recent interview with the gems "Can you twiddle your fingers fast enough to make something cute happen on the screen? ...So what?" and "[Today's videogame developers have the attitude that] all I want to do is [mess] around with the computer, and make it do cute and clever things. That is not game design!")

Before thinking I'm too wacky, I don't intend to write off the importance of wish fulfillment. Sometimes, with the best of intentions, academics and fellow concerned developers can get so carried away as to forget the major reason most games seem to sell is not for its effect on the player, but because the player sees in the product an opportunity for assisted make believe in gun firing, sports car driving, and plane flying.

But is the shooting, speeding, and flying really what people are there for?

Meaningful Violence


There's something to be said for the powerfully clear symbolism that comes from physically overcoming evil and defending justice by force, whether we're talking about Beowolf, Clint Eastwood westerns, or any religion's choice of metaphors for the ongoing battle between virtue and decay.

The Rocky films are boxing movies, sure, but more significantly, they are powerful symbols about determination, will, and American life in each film sequel's era. The Karate Kid includes karate, yes, but far more importantly, it's about wisdom, discipline, and honor.

That was the 1970's and 1980's. Movies with fighting have become more and more about the fighting, and less and less about the reason why. Modern action films seem less about meaning and more like pornography - turning into, "[Knock knock] Hi, madam. I'm the cable/pizza/plumbing guy. [Kicking and gun fighting begins now!]"

I'm rather outspoken when it comes to
defending action in videogames (in short: I don't think it's any worse than water guns, paint ball, or laser tag, and I experienced more real violence/aggression in sports than I ever did in videogames). But what has happened with action films has also happened to videogames. Each year, we see an avalanche of clones copying the successful videogames from the previous year. Trouble is, those clones consistently make the error of copying the least meaningful, most superficial aspects of those blockbusters.

The intensity and realism of violence is far less important than what meaning it has for the player.

Some Videogame Examples


In The Legend of Zelda (mild cartoon violence), the player saves the world from decay through a long, solo journey of personal development, overcoming challenges, doing favors to help strangers, exploring and experimenting, venturing to every corner of the world, ultimately finding that saving the world is a side effect of righting a single injustice. Different parts of the brain are engaged by puzzles, clues, combat with a variety of opponents and an ever-growing set of tools to employ in world saving. It defined a genre so powerfully that the few things that ever copied it are
blatant knock-offs.

In Kane & Lynch: Dead Men (gritty, realistic violence), there are some violent people coerced into doing violent stuff by other violent people. The characters swear a lot (and not even very creatively), get angry at each other, and a bunch of people that act the same get killed pretty much the same way every time. It plays like yet another third person cover-based shooter. It would not mean anything for another title to copy this game, because there's nothing innovative enough or well enough executed which was not already itself a poor knockoff of something from another game.

In Grand Theft Auto: San Andreas (intense cartoony violence), the player begins by fighting to rid his neighborhood of drugs, because the corrupt police don't perceive what's happening to his poor part of town to be a concern. Through sticking up for himself, helping out strangers, taking care of his image (satirizing American fast food, fashion, and the role of physical fitness in street cred), seeing and doing everything that several cities have to offer, learning new skills, and growing a number of businesses, CJ takes control of his situation and eventually overcomes a government conspiracy of comical proportions. The gameplay itself is more about the joy of driving any car in the city than it is about the occasional gun battles, and despite the ignorant ranting of politicians and parents that never played the game who fear it's all about prostitution and selling drugs, prostitution is acknowledged as a footnote in the game's mechanics and being a vigilante in the war on drugs is just a MacGuffin.

In 50 Cent Bulletproof (intense realistic violence), which was supposedly developed in response to GTA San Andreas (the uncited Wikipedia article suggests it was after 50 Cent turned down an offer to voice the protagonist of GTA San Andreas), the player is also fighting drug lords and uncovering a conspiracy. Except in this case, the game is actually about shooting people, while listening to 50 Cent music. Between shooting people that stand still while being shot, the gameplay consists of fighting the camera in confined spaces and figuring out where the exits are.

Loss of Gameplay Depth


I don't want to make it sound too much like my focus is strictly on story. It isn't - story is just much easier to write about than gameplay.

But there is one massive, landmark, painfully clear-cut case in videogame history of gameplay depth falling apart in a franchise, due to idiotically thinking that violence is what was causing the franchise to succeed. Ask any game reviewer or player who was fooled into getting the third game in this series, and it turns out that shooting zombies and demons with a shotgun, as foolproof as that formula sounds, can be screwed up royally, even by the very same people that made it work in the first place.

In Doom and Doom 2, the story's symbolism is fairly shallow (the player is a space marine stopping an invasion from Hell... with guns), but the gameplay forced adaptive transfer of learning to a degree that puts modern action games to shame. Some enemy types have guns that requires obstructing line of sight in sync with their firing rhythm, some enemy types shoot slow projectiles that do more damage but can be dodged, some enemy types run fast but have no range which forces the player out from cover, some characters fire slow weapons that can cause collateral damage if dodged too close to a wall, some characters have rapid fire to force lateral approaches, and one enemy type can bring dead enemies back to life. Most enemies run toward the player in a zig-zag pattern, making them difficult to shoot until they're also firing. The player is introduced to each of these characters gradually, then these different types get thrown together in various combinations in visually varied settings each having unique cover opportunities, traps, ambush points, forms of exit, lighting conditions that affect strategy, and valuable enough loot to tempt bravery bordering on lunacy. The world plays out a bit like a chessboard involving 30 moves a second without distinct squares, forming poetry with the simple grammar and vocabulary taught to the player in how the various enemies attack.

In Doom 3, the story takes much longer to convey the same shallow symbolism. The player tends to encounter only one enemy type at a time, meaning there's no need to mix strategies on the fly. Virtually every enemy attacks the same way - they all do crazy damage up close, chase straight after the player, and some of them fire shots that are easily dodged. Combat pretty much always consists of running backward while firing. Every environment in the game is either a hallway without much room to move, or a room with so many obstructions that it plays like perpendicular, waist-high, narrow hallways. Lighting is always the same - too dark. Although, to be fair, sometimes the walls look genuinely slimy, and badguys vanish in sparks when they die... (?)

The transition in gameplay maturity from Doom 1 and 2 to Doom 3 is like the difference between Hitchcock/Kubrick/Lovecraft horror vs a teenage slasher film, like the difference in storytelling between
Bram Stoker's Dracula vs Bram Stoker's Dracula; the classics respect that real panic is induced by psychological strain, while the latter assumes that it has to do with the amount of blood, screaming, and offensive imagery.

Not Obvious to Players


Unforunately, people outside of development often don't dig very deeply when asked what is liked about a videogame. This effect is not because the players lack intelligence, it is simply because they are not used to thinking in terms of how or why it might have been done differently; their relationship to videogames doesn't require the same sort of precision or rigor. This is partly because, for better or for worse, they're trusting us to understand the whys and hows.

When asked why I prefer one food over another, my answer can be a lot less exact than what a chef needs to consider; when asked what I prefer about one car over another, my answer can be a lot less exact than what an automotive designer or engineer needs to consider.

Ask someone why they like GTA San Andreas, and many players will say "because I get to commit crimes." I propose that an important part of what they enjoy is the Hollywood vehicle handling, the freedom to drive any car, enjoyment in exploring, and the clever satire. On what grounds can I claim that my answer has any better shot at being right than theirs? Those same players very rarely seem interested in the ton of other crime games on the market which are (a.) focused more on the crime (and b.) lacking the driving, exploring, and satire of San Andreas.

Ask someone what they like about they like about Gears of War, and they're likely to say, "Chainsawing aliens!" Yes, it's memorable, with blood splattering all over the camera. But there are plenty of videogames with chainsaws which failed, and bad videogames that chainsawing aliens couldn't fix. I think that the Halo / Bubble Bobble style co-op and the watching-each-other's backs is more likely what helped this game earn its place in the hearts of so many players.

By digging a bit deeper for what wishes are really being fulfilled, rather beginning at the superficial layer of how it's presented, we can start to see seemingly disparate games in the same category, and understanding innovation seems a little less like a shot in the dark. If what the player finds thrilling about violence in many games is the level of empowerment, influence, and control that it affords - a sense of power - elements of that same empowerment may be found by having mayoral control over a city (SimCity), being able to summon nearly anything one can think of into existence (Scribblenauts), or having control over time (Prince of Persia: Sands of Time or Braid).

Guitar Hero, Ace Attorney, and Trauma Center all appeal to the same deeply rooted, "I want to feel great at something difficult" wish fulfillment which has been around in pro sports videogames from the beginning. NBA Jam, NFL Blitz, Wipeout, and Tony Hawk identified that core desire, and exaggerated the fulfillment to a comically extreme degree.

Underlying Desires


"Everybody wants to be the hero - and most of the time, in everyday life, you don't get to be the hero. Most people either spend their time not doing anything or being the victim."

-Skip Lipman
Darkon

People want to feel accomplished.

People want to feel clever.

People want to feel capable.

People want control and clarity.

Do people want to fire guns? Actually, no. NRA Gun Club is horrible.

Realism-fetish hobbyists aside - simulations are often brutally difficult - most videogame players like the sensation of shooting, driving, and fighting as a means to the end of feeling accomplished, clever, capable, in control, etc.

We want to be heroes. We want to matter. We want to be good at things. We want to believe that good guys can prevail, that cheaters get punished, and that someone cares when we work hard to make a difference.

And we need to make sure that the videogames accomplish that, whatever visceral metaphor we use for delivery of those sensations, rather than repeating the same visceral elements again and again, differentiating semi-randomly just to avoid getting sued, without any consideration to the sensations and meanings conveyed.

Hell, it wouldn't kill our industry to see a few new visceral metaphors invented that convey those key sensations, though I could settle for seeing more games next year cloned deeply instead of superficially.

Treating Adults like Adults


This is about treating adults like adults. It begins with speaking up on the development team when it seems like the design is targeting the lowest common denominator, pretending like people are simply interested in watching easy explosions, vs seeing events they cause as part of a feedback loop that instills a sense of accomplishment for having figured out something new. When it feels like you may be on track to denigrating the human mind by giving the player meaningless chew toys, instead of working hard to produce something fit for consumption by an intelligent, capable human being, "throw it out, there's a better way to entertain him."


V.) Special Section - Interview with Silent Hill's CGI Director


What's Japan Doing Differently?


In 2006, I had the rare opportunity to sit down for lunch with Takayoshi Sato, the CGI Director of Konami's Silent Hill (1 and 2). I approached him with an interest in learning more about how videogame business and design happens in Japan, which has historically produced dramatically different work than we have seen from the American process.

I wish to emphasize: this exchange took place 3 years ago. It may or may not be representative of Takayoshi Sato's current views. Projections and theories presented here may or may not be representative the Japanese videogame market today. As a point of reference: the Wii, PS3, and iPhone had not yet come out, and World of Warcraft was only 2 years old - this industry can change a lot in a few years!

Though I did not record the interview verbatim, I did take detailed notes. Although I considered reformatting the notes into a more conventional interview format, ultimately it would have included the same information, but it could have also invited the risk of quotes appearing "from" Takayoshi Sato in my words. The notes here are my notes, in my wording, from the conversation. Although my goal in this transcription has been to convey this developer's message, my efforts to flesh out my notes into a full sentences has pulled in a few details from what feels like clear memory, and my notes at the time also likely included a measure of interpretation or deduction.

Hopefully this shorter format will also make for a faster, more accessible read than my recent
10 page interview with Atari Adventure creator Warren Robinett...


Notes from the Interview

  • American developers engage in internal sales pitches, flashy demo projects, detailed proofs of concept, early visual renders and such to battle for budget increases. In his experience, this didn't happen in Japan. Teams are assigned realistic and practical budgets for their projects, and then the teams stay within those budgets.

  • The core of project planning begins around, and encircles throughout all development: player control, player movement, and camera behavior. Gameplay mechanics, enemy/level design, artwork, and programming mostly surround and support those systems.

  • Mark Cerny (Marble Madness, Sonic 2, Crash Bandicoot, Jak and Daxter, Spyro the Dragon, Ratchet and Clank) started in the US with Atari, but spent years as a developer in Japan, and so is an example of someone who has experience and knowledge from both sides of the Pacific. His most influential contribution to industry practice was popularizing the "Cerny Method", in which a project doesn't "go wide" into making all characters/levels until one representative level is fully playable, through several design iterations, and decided to warrant investment into full production.

  • A lot of videogame development in Japan currently seems to be shifting to mobile, but there's no telling what the market will look like in the future.

  • Japan tends to hire people right out of college. Although something with a business or software engineering focus may be sought for certain types of positions within the company, there are not yet videogame-specific degrees forming any considerable part of the Japanese videogame industry.

  • Japanese companies tend to keep employees for most of their working life. This is done partly as a means of preserving company secrets, partly as a protection of valuable employee relationships, and partly because the culture regards leaving employees as betrayers.

  • In Japanese companies, there may be many workers at any given time sitting around not contributing on a given project or during a given phase - but it's understood and respected by their peers that those people have given more of themselves in some other projects, and will likely find their way back into future project involvement when the time is right. This is in stark contrast to the frequent turnover in American videogame development companies, where employees often get restless or employers often change direction sharply every couple of years.

  • There are few, if any, significant books or courses on videogame development in Japan yet. They're likely to appear in the not-so-distant future, but due to the secrecy of business in Japanese companies they're unlikely to reflect industry practices.

  • Nintendo is a particularly big question mark to everyone. Virtually no one that works first party there ever leaves. Nintendo is known for paying notably high salaries than many other studios.

  • Japanese videogame studios are often merging, and mostly shrinking.

  • Capcom and several other Japanese studios (possibly including Namco?) closed their American studios. Nintendo is one of the few with a foot still firmly in the US.

  • There are virtually no studios in Japan with positions for "game designers" in a non-technical sense. The director, programmer/designer roles, and artist/designer roles work together to cover the job function sometimes relegated to "game designers" in some US studios.

  • Japanese videogame artists work almost exclusively in the resolution, format, and fidelity required by the game, concerned almost exclusively with how their art looks during play. Concept art, and the sort of high detail imaginative sketching that appears on packaging and manuals, is often produced after the videogame's art needs are filled, while waiting for the game to ship. Rather than being a process step - except in the case of very rough sketches for personal planning - this sort of art gets done late in the process separately, explicitly for use in marketing materials.

  • Creative people in the development process in American studios sometimes become embittered over feeling lack of control in the work they do, losing a sense of ownership. Partly from the culture in Japan being one that emphasizes duty and mutual respect, creative people in Japanese companies seem to be better able to take direction while still feeling an immense amount of ownership in their work.

  • Everyone on a Japanese videogame development team generally understands or sees most of the big picture. There is not an intensely specialized attitude of just being with the company to work on an isolated part, and everyone shares interest in how the work and final product will come together.

  • The culture of duty and mutual respect also results in games which have a much more focused creative vision. Although most people on the team have visibility on and interest in the big picture, they work toward their common goals without the need to force their own ideas into it. This may also be a side effect of the tendency for much lower job turnover - in the US, everyone feels like the features and visible pieces they work on are critical to landing them their next job or role in another company; in Japan, most developers aren't desperately trying to prove their individual ability because they're at home with their employer, and feel the most pride from having been a part of the team that worked together to realize a successful vision.

  • No company, on either side of the ocean, is so big or so powerful that anyone can be certain it'll still be around 5-10 years from now. History is full of surprising upsets that shook up huge companies and industries practically overnight.


VI.) Donations


These Free Lessons are developed to help the community, and I like writing them, although they are very time consuming. If you find these lessons valuable, and can afford to make a small donation to show your support, it would be greatly appreciated. This helps me continue setting aside the time needed to keep quality a priority in the free lessons. PayPal makes the transaction safe and simple - you don't even need to have a PayPal account if you have access to a credit card!

I have received 1 donation*. I write 10-20 pages each month on a variety of topics to help people, have hundreds of subscribers and thousands of readers. These writings generally receive positive responses from people that are dedicated to reading and acting on them. If you'll take a few minutes to share even a few dollars with me to show appreciation, I'll certainly notice.

If you're not able to make a donation, no worries! A simple referral letting your peers know about these resources via forum, blog, or social network can also go a long way in helping me help more people.

[*Update! I have now reached a total of 5 donations!]






Chris DeLeon

chris@gamedevlessons.com


PS I am writing this newsletter series to help people, and I want the contents to reach as many people as possible. Please pass along this link if you know someone that might find this useful: http://gamedevlessons.com/lessons/letter8.html Sending the link works better than copy/paste, since that way they'll see the latest updated version with Q&A or corrections.


PPS If you'd like to be kept up-to-date with these monthly mailings, simply subscribe to the GameDevLesson.com Free Lessons: http://gamedevlessons.com/?page=free