Wednesday, February 13, 2008

GDC: Social lessons of years past

I'll be off at GDC in San Francisco all next week. It is always fun to meet up with folks that stop by the blog, so if you want to chat I'll be at the blogger meet up on Wednesday near the IDGA booth. If that doesn't work,send me a note at danc [at] lostgarden [dot] com and we'll figure something out. It should be a great week.

It is easy to forget, in the rush of learning the newest lessons about games, that a lot of wonderful thought has already passed through the hallowed halls of GDC. As an ode to what we've learned so far, I wanted to share with you an excerpt from a talk that Dani Bunten Berry gave over a decade ago. She was one of the early champions of multiplayer digital game design. Her list is still pure gold.

Good Multi-player Design Elements
by Dani Bunten Berry, Copyright 1997

"Here comes my annual punch list of things to consider when designing multi-player games updated and expanded from last year based on what we've learned:

  • Build in the "Norm Effect" if at all possible. This is named for the character from "Cheers" who when he enters the bar is greeted by everyone calling his name in unison. Pitiful old IRC chat-rooms can provide some of this effect so surely we can find some way to welcome people into our game environments.
  • "Zero sum" is bad. Games where I win and you lose are bad. Worse still is "I win and all the rest of you lose". Notwithstanding the current cultural obsession with endzone strutting by winners, losers do not enjoy themselves and if you can help take the sting out of it, you should. Alliances, cooperative play, ranked "winners" rather than "A winner" with a bunch of losers are all options.
  • Pacing needs variety. Slow periods should follow intense ones and forced "time-outs" can offer opportunities to socialize, catch your breath and anticipate things to come. Remember, the players no longer have a "pause key" as they did in a solo-game.
  • Strategies need "wiggle room". People have different personal styles and when playing against each other it's great to let them "do it their own way" rather than a single approach that all must follow. If possible you should balance the game such that a strategic planner for instance might not always beat the joystick jockey or the detailed tactical type. A game that allows for diverse people to play diverse ways is always best.
  • Legends must grow. Provide ways for players to carry their experiences with them. "Game films" are an excellent (and reasonably cost-effective option) in games where what's sent between the player's computers is a stream of "deltas". Saving that stream and running it back through the game engine provides an opportunity to review what happened during the game. This turns an ephemeral, fast paced experience into a story that can be used to "save face" if the player lost, to learn how to win or just to chronicle their accomplishments. At the very least, try to include ongoing statistics or character attributes outside the environment of a single game execution.
  • Court your newbies. Nothing will destroy a player's interest in your game quicker than being humiliated a few times when they are just trying to figure out what to do. If possible build in inducements for advanced players to help newbies in order to get something to advance further in the game environment -- like taking an "apprentice" might be the only path to "master rank". At the very least try to make starting as safe on player's egos as you can.
  • Allow personalization. Let players define their own icons that the others see or somehow personalize their own game space. A big part of the enjoyment of being with others is expressing yourself. A bunch of player avatars all dressed from the same menu gives me the creeps. Encourage graffiti.
  • Keep the features down. When humans play each other there's this "he thinks that I think that he thinks …" kind of mental gymnastics taking place. This is far more interesting than another unit type or another option to evaluate to almost everyone.
  • Include audio/visual subtleties. People are remarkably good at recognizing patterns almost subconsciously and they also find it rewarding. A couple of pixels blinking in the corner of the screen and a small sound effect that allude to a possibility allows a player to feel very astute when they can put it together with an outcome. This can also facilitate the personal playing style mentioned above since some folks are better at it than others.
  • Avoid numbers. Almost no one enjoys calculations. (At least no one "normal"). Humans prefer heuristic (rules of thumb) relationships or continuous equations far more. The heuristics feel good when you figure them out and the continuous equations can only be predicted which also seems to scratch an itch in our brains.
  • Include spectators. Leave room for "lurkers" to watch games being played and even to effect them in minor ways if possible. A design that includes taking turns, which makes the other players spectators for part of the time, can be interesting if what the player is doing has an effect on them, is interesting to watch and they can tease, taunt and kibitz while watching.
  • Facilitate relationships. Allow players to form clubs, clans, groups and facilitate scheduled as well impromptu meetings online. Help strangers mix and friends find each other.
  • Use time limits. Whenever possible design your game so it can be played within a fixed time limit. This will allow people to schedule their involvement. A game you can play a couple of times in an evening would be a good design goal. If you can't end the game at specific times try to at least facilitate a graceful exit opportunity such that a player quits while they are having fun and not after they're so exhausted they'll never come back again.
  • Include chance. Although most players hate the idea of random events that will destroy their nice safe predictable strategies, nothing keeps a game alive like a wrench in the works. Do not allow players to decide this issue. They don't know it but we're offering them an excuse for when they lose ("It was that damn random event that did me in!") and an opportunity to "beat the odds" when they win.
  • Keep the balance. Try to keep the distance between the losers and the winners small enough that the outcome is in doubt as long as possible. You can adjust random events, attrition factors or whatever. They'll thank you for keeping the games interesting even though you should probably not tell them what you're doing.
  • Include cooperation. Even in basically competitive games you can allow for alliances, collusion or at least less cutthroat behavior. In M.U.L.E. I used an interesting trick that would not allow a "Winner" unless a certain threshold of colony success was reached. In order to win players had to sometimes help each other out so the whole colony would thrive thus making the balance closer and play more interesting.
  • Make 'em stay. Figure out incentives to keep players to stay till the end of a game. It ruins everyone's fun when players bail out prematurely. At the very least you can publish the percent of the time they bailed.
  • Allow handicapping. Let players handicap themselves if they want. Some players are willing to play with one hand behind their back so let them. (The most common use of this will be parents and kids playing together).
  • Facilitate special events. "Magical appearances" (scheduled and otherwise) in FRPs are cool. Strategy game tournaments (sanctioned and not) are too.
  • Leave room for ads. Banners will be around for a while. You might even want to let Nike outfit your monsters with shoes - for a price. Be creative."
The full talk:
Some more about Dani Bunten Berry:
See you at GDC!

Tuesday, February 5, 2008

Play With Your Peas: A game prototyping challenge

Oh la la! It is time for another game prototyping challenge. As has become the tradition around here, you provide the brilliant code and I provide you with a complete set of free graphics that help make you look spiffy.

This game design stems from a peculiar fetish of mine. I don't normally talk about this in public, to say this. I have a thing for casual building games filled with adorable little creatures. Late at night, when the rest of the world is busy sleeping, you'll find me fantasizing about the lurid offspring of Lemmings and SimGolf. For a moment, close your eyes and savor the sweet thought of DMA's DNA all mixed up with Will and Sid's unappreciated love child. Oh yes.

The game idea inspired by these questionable thoughts is called Play With Your Peas. Here are the basics:
  • Peas: You have a bunch of fun loving sentient peas that like to climb tall objects and jump off of them. They think they are ninjas. You know they are suicidal.
  • Happy points: If the peas land safely, they generate happy points. The more things that they bounce off of on the way down, the more points you get. Think of a successful pea landing like scoring a combo in Tony Hawk.
  • What you do: Here's the trick. You can't manipulate the peas. You can only add blocks to the landscape. Add a soft landing spot and your falling peas won't splat. Add a spring in the right spot and they'll fly up into the air. Can you build a brilliant playground that delights your peas?
  • Score: Your score is the time it takes you to reach 20 million points. If you want to simply play with your peas, go for it. If you want to beat the high scores, you must be Elite and build your landscape with great efficiency so that you maximize your pea combos.
Many thanks to Axcho for dredging up this ancient design from the dusty storage shed of my past.

Game Tokens
There are only a few types of elements on the screen
  • Peas: Little AI characters that run around the environment. You can't interact with them directly.
  • Plate: All action takes place in a box that bounds the sides and bottoms of the screen. No objects can exist outside of the screen.
  • Blocks: The user can place blocks on the screen. There are multiple types of blocks such as platforms, springs, jello and more.
  • Flags: These mark the spots where peas have lept from in the past.
  • Tools: A sidebar of tools that lets you choose the type of block to place.
  • Happy Score: A counter that tells you how many happy points you've collected so far.
  • Time: A counter that tells you how much time has elapsed since the beginning of the level.
Basic Pea AI
Peas have three main modes:
  • Navigating the environment: In its primary mode, the pea navigates the environment in an attempt to reach a jumping spot.
  • Falling: When a pea is falling, it is treated like a simple bouncy ball interacting with the world.
  • Being scored: Once a falling pea comes to a rest, it is scored.
Navigating the environment
The peas traverse the environment in search of ledges to jump off. This is the hard part of building this particular game design. I'll describe the high level behavior, but I leave the implementation as an exercise for the mad programmers of the world.
  • Look for a ledge: After a pea is scored, it immediately looks for a nearby ledge to jump from.
  • Wander: If there is no ledge nearby, the peas wanders in a particular direction, slowly climbing over obstacles and working its way up as high as possible.
  • Calculate path to ledge: When it finds the ledge, it calculates a rapid path to the ledge.
Moving smoothly across a complex environment can be broken down into a series of movement segments.

  • Walk on a flat surface:
  • Climb a block wall: Some blocks can be climbed, others cannot.
  • Climb up a ramp: Some ramps can be climbed.
  • Jump a gap: If there is a 1 square gap, a pea can jump over it. Remember they think they are ninjas.
  • Wall jump: Peas can also jump onto a wall that is 1 square above their head to the left or the right. Think of this like moving how a knight in chess moves.
Jumping spots.
A block surrounded by space has two default jumping spots, one on the left side and one on the right side. Once a pea reaches a jumping spot, he will jump. A couple things happen at this point.
  • A flag is automatically planted at the jumping spot.
  • The pea jumps and his AI switches from navigating the landscape to being a simple bouncing ball.
The flag tracks several things
  • How many peas have jumped from the jumping spot. As the number gets closer to 100%, the flag slowly rises to the top of the pole.
  • If a peas spots multiple jumping spots, they will always head towards the jumping spot that has the highest completion percentage. This ensures that the user is focusing on one or two jumping spots, not a half dozen.
  • When the flag reaches 100%, the jumping spot becomes inactive and no other peas can jump from this location. The user gets a large bonus for having a completed jumping point.
  • Peas remember which jumping spots they've jumped from and will not jump from that point again.
The flag also serves an important balancing role. Once a flag is planted, several building limitations come into play.
  • The user cannot place another block on the square occupied by the flag.
  • The user cannot remove the block under the flag.
These rules prevent the user from recycling jumping locations and they also slowly eat up the space on the board so that the user needs to work around the detritus of their previous efforts.

When your pea falls, it bounces off of blocks that get in its way. Some blocks, such as gelatin, slow you down. Others, like springs, give you an additional boost. However, your pea is not indestructible.
  • If you land on a standard block after falling a distance more than two blocks, you pea will die. A dead pea means less opportunity to score.
The skill of the game is building environments that yield the maximum number of bounces while still managing to land your peas safely in the end.

It is possible for the player to create cul-de-sacs where the pea will bounce indefinitely. One potential balancing feature is to add in a counter that keeps track of how many times specific blocks have been hit. If the hit count on single block gets too high, the pea yells out 'It's a trap!' Even if a trapped pea is released, you get no points.

When a peas finally comes to a stop and it survives it's journey, it gets a happy score.
  • Happy score = Total bounces * (Spring Bounces * Spring Value + Normal Bounces * Normal value + Gel bounces * Gel Value + Successful Landing)
The pea's happy score is added to the player's total score. This is a moment of grand celebration. If you have a particle system, this is a great time to use it. I've provided graphics so that a happy pea can yell out "Ninja!", his career aspirations finally complete. Once the peas is scored, he moves on and starts looking for a new jumping spot to leap from.

Building blocks
Okay! Now we have some cute little characters that jump about the screen in some logical manner. Finally, it is time to talk about building your world.

Along the left side of the screen is a toolbox that contains the blocks you can use in the level. To select a block, click on it and it will highlight.

To place the block, click on an empty square. The blocks aren't added immediately since they have a build sequence they must follow.
  • Initial delay: We want to prevent users from micromanaging the flow of their peas by quickly placing blocks. In order to do this, blocks stay ghosted for a short period of time before they fade into solidity.
  • Check for peas in the square: While the block is ghosted, any peas that are in the space can move out of the square without colliding with the new block. This helps us avoid accidentally squishing peas.
  • Block peas moving into the square: New peas that try to move into the square are collided with using the collision rules associated with that block type.
  • You can place other blocks while a block is in the process of being built.
Deleting blocks
You can remove blocks as well.
  • First click on the delete tool.
  • Your cursor will turn into the red delete cursor. Feel the power!
  • Click on the block you wish to delete. As you mouse over the block
  • The block will become ghosted. There is a short delay before the block is removed.
  • After the delay is over, the block finally fades away. During the exit animation, peas will pass through the block as if it isn't there.
  • You can delete other blocks while a block is in the process of being deleted.
Remember, you can't delete a block that has a flag attached.

Standard Blocks
  • Climbing: Peas can climb the sides of the block.
  • Walking: Peas move across the surface of the block at full speed.
  • Collision with top: Falling peas stop when they land on the top of the block. If the fall is greater than 2 blocks in height, the pea dies.
  • Collision with side: Falling peas bounce off the side
Spring Blocks
  • Climbing: Peas can't climb the sides of the block.
  • Walking: Peas move across the surface of the block at full speed.
  • Collision with top: Falling peas are launched upward with greater velocity if they fall on the top of the block. Angle of incidence equals angle of reflection.
  • Collision with side: Falling peas bounce off the side
Gelatin Blocks
  • Climbing: Peas can't climb the sides of the block.
  • Walking: Peas move across the surface of gelatin at 1/2 speed.
  • Collision with top: Falling peas stop when they land on the top of the block. Gelatin provides a safe landing spot for high jumpers.
  • Collision with side: Falling peas bounce off the side
Ramp Blocks
  • Climbing: Peas can climb the backside of the ramp.
  • Walking: Peas climb up or down the ramp at full speed.
  • Collision with top: Falling peas bounce off the sides of the ramp at an angle and lose a little velocity. If they hit the ramp from a height larger than 3 blocks, they die.
  • Collision with side: Falling peas bounce off the side
In order to win a Play With Your Peas session, you need to complete certain goals on a level, much like Tony Hawk. The simplest is "Reach X number of points". Your final score is the time that it takes you to reach the goal. A new player might take 10 minutes to reach 10,000,000 points. An expert player, skilled in crazy combos, might take 2 minutes.

My hope is that casual players will have fun figuring out the system, setting up interesting combos. They'll generally ignore the clock. Eventually, they'll reach the goal and feel good about 'beating the game'. Their score is then compared against a number of other times in a high score list.

More driven players will feel a natural urge to compete by replaying the level for a better time. To facilitate this, we should have "Try Again" button on the high score screen.

Areas to prototype
Even though this design has a relatively small number of moving parts, the emergent behavior should be complex. There are three distinct areas that well are worth prototyping. I've listed them in order of priority.
  1. Pea falling physics: In order to do the pea falling correctly, you need a simple physics engine that deals with balls and planes.
  2. Block and scoring balancing: Balancing the size, properties and scoring of each block is a classic balancing problem. This is an area that will likely take hours to get right.
  3. Pea navigation: If you can get peas traversing a series of blocks in a smooth and believable fashion, you are halfway through the design. This involves some tricky path finding. If you want to stub this behavior out, spawn peas at a jumping flag and remove them once they are scored.
Some design notes
One problem that is common to AI-driven systems is that most of the behaviors go on underneath the cover, away from the player's eyes. It is very easy to fall into the trap of creating an intricate AI that 'plays itself' but is completely incomprehensible to the player.

Instead of asking how you might make the most realistic AI system, I prefer to steal a page from Nintendo's playbook. Instead ask "What is the simplest system that drives forward the player experience?"

Peas climb. Peas fall. Peas get scored. All of these activities are very apparent to the user. Instead of complex internal logic, the design focuses on explicit external behaviors. Any internal logic such as the path finding system exists only to the minimum degree necessary to support the external behavior. We won't build SkyNet using these sort of AI techniques, but we can make more enjoyable games.

If you create something inspired by this prototyping challenge, send it this way! I'll post it on the website for everyone to check out and comment on. Take shortcuts, mangle the design, find the fun.


I've provide the graphics for PlayWithYourPeas in two versions. First, all the graphics have been saved out as PNGs. I also included the Expression Design source file so you can make modifications to the original vectors.
Updated 2-11-2008: I added in the Block-Place-Normal.png to the zip that was previously missing. I also fixed some of the file names.

Updated 2-14-2008: I renamed the Ramp tools so that they follow the same naming convention as the blocks. The pea shadow is now seperated out. The single pixel alignment errors on the tools and the normal block are now fixed.