Adventure Game Design Patterns
What we call chaos is just patterns we haven't recognized. What we call random is just patterns we can't decipher.
- C.Palahniuk
How about an abstract approach to adventure game design? Or at least to the puzzles in the adventure game - that could be useful!
The General Pattern that Adventure Games take
An
objective or
task is given or hinted at.
become a ninja, save the world, rescue a girl, save a kingdom, get that guys hat ...The objective or task is (usually) not immediately obtainable.
Attempting to achieve the task or objective will explain why it's currently not obtainable.
the ninja master lives in Japan and you live in Australia, you don't know who bought the nuclear weapons, there's a big forest infront of the tower where the girls imprisoned, the guy with the hat has a big dog ... The task or objective may then be split into subtasks or objectives, and at the finest granularity are the puzzles. I'm interest in puzzles because they seem to have a much broader application to gaming as a whole.
Puzzles
Simply put puzzles look like this:
PROBLEM -> SOLUTION.
Most of my examples will be culled from Monkey Island One. If you've not played it, then beware of spoilers.
Problem: You can't get into the kitchen because the cook always stops you.
Solution: Wait until the cook is serving the pirates food, then go to the kitchen.
We only want a rough mechanically idea of what's going on so we might formalize this as
Problem: Guardian
Solution: Temporal
You might be able to think of several puzzles that could fit into the above slots, and that's why I think looking at these puzzles is a good idea. We might expand the above formalization to dictate what's being guarded:
Problem: Guardian(location)
Solution: Temporal
The solution
temporal means you must do some action at a given time - maybe at night, or on tuesday or when someone is distracted. Next up we'll look at the types of problem I've identifed, then some soultions I've identified and finally a big example list.
Problems
Problems can be a little fuzzy in their boundaries.
GuardianThere is a
FOO stopping you from doing something, it may block a location, it may be guarding an item, or an NPC.
Prototypical Example: The bridge troll guarding a bridge.
Unprotoypical Expample: Bad breath guarding an NPC - you won't talk to him with bad breathe.
Want FOO Your character wants or needs something but cannot directly get it. This maybe knowledge, money, training, ...
Prototypical Example: The sword costs 300 gold.
Key Request To proceed the character must have a certain item. The character might need a password, to be part of certain group, to have certain clothes, ...
Prototypical Example: A locked door that requires a key.
Temporal Item An item that you need to use keeps dissapearing before you can use it. Maybe you need a gold key to open a door in the thieves market - but it's always stolen when you get to the door, or you need to transport acid but it dissolves the container.
Prototypical Example: ?
Hidden FOO This is a problem the player might be unaware off and it's potentially a very hard problem. There's an item, destination or NPC that the player needs but it's somehow hidden. A file in a cake, tree house city up a tree trunk, secret passage, long lost master trainer... you might need a microscope, telescope or something that allows you to see the hidden thing, or you might need to pick up or move a concealing object.
Prototypical Example: File in a cake.
FOO out of reachYou can see, smell, hear, see evidence or have been told of FOO but you can't physically get it. This is closely related to
want FOO. Maybe it's too high up, or maybe you can't catch it. Think a mouse, or a parachute in a tree, or a treasure chest deep under water, a monkey with a gold ring, a lost city, an island, the moon.
Prototypical Example: A box on a top shelf that you can't reach. The fabled city of gold.
TrappedYou character is in someway trapped and needs to escape, perhaps locked in a room, a cement block on their feet and sinking underwater, tied up and all the variations on the theme.
Prototypical Example: Thrown into prison.
Approaching DangerIf you stay where you are and do nothing you will die (or similar). Think of an oncoming flood, your underwater and going to drown, there's a biker gang approaching, the police are coming for you, there's an evil alien after you, the ground is crumbling, the bombs going to go off, angry bears, BEES! (Can sometimes be similar to trapped.)
Solutions
A problem may have more that one solution or a combination of solution pieces.
New Item Perception An item must be seen in a new light, that pot could be helmet, the bat could be boomerang, this is something the user has to understand in their head, or it be required that the character formally understands this knowledge. For instance you may need to look at the bat, then the character might say "Hey looks a bit like a boomerang" then the game will promptly rename it baaterang and you will now be able to use it as different item.
Prototypical Example: Water as a mirror, Paper clip as lock pick.
Combine Items You need to combine, two, usually inventory, items to produce a more useful item. Poison and meat creates drugged meat, cat hair and glue creates fake side burns, gold foil and a toy badge creates a police badge ...
Prototypical Example: Poison and meat to create drugged meat.
Trial and Error Generally something to be avoided but can be an amusing distraction. What's the correct offering to hillside tribe, how should a certain machine be adjusted or put together, what order should three levers be pressed in, how should a conversation tree be navigated.
Prototypical Example: Pull three levers in the correct order to open the door.
Obvious Item Use Using an item straight forwardly on something other object, or performing a straight forward action to an object. A key on a door, the fish with the troll that wants fish, the money with the shopkeeper.
Prototypical Example: Give money to the shopkeeper.
Change Item State Very closely related to obvious item use but specifically items that will change the current item - eating a cake, smashing a glass, burning wood to get charcoal, cooking raw meat, opening the box...
Prototypical Example: Eating a cake to get a file. Opening a container
TemporalWarning this can be a very difficult solution, you must do a certain action at a certain time - enter the kitchen when the chef isn't looking, scarifice the virgin when there's full moon, spit when the winds blowing with you, throw the bomb when the gas fire goes out ... at all other times the action will fail.
Prototypical Example: Enter a room when the room owners isn't there or is distracted.
Monkey See Monkey Do This is quite a general meaning - you might see a NPC give a password, well then you follow his lead and say the same word, or you might see him do a combination, or you might physically follow him down the streets to see where he goes.
Prototypical Example: Follow the NPC to his secret place / treasure.
Repitition Do the same action more than once, it won't succeed on the first action but will succeed on a subsequent repition. For example a wooden door kicking it once may do nothing, the second time you kick it it might break, you might have to ask an NPC about something twice to show that you're really interested. These solutions can also be quite difficult.
Prototypical Example: Breaking something, smashing a bar window with a hammer for instance, chopping down a tree with a saw.
Spatial Can be even more difficult than temporal. An action will only succeed if the character is in a certain place, avoid the patrol by standing in the shadows, shoot the apple by standing on the hillock, be behind the man when you hit him with the bat ...
Prototypical Example: Hiding in the shadows so you can't be seen.
Bait Item UseDifferent than obvious item use. With obvious item use we give the fish-wanting-troll the fish. With bait item use we throw the fish in the river and the troll jumps in after it. We "bait" the river. Bait Item Use, indirectly solves the problem - something nearby is interacted with in the hopes it will distract or remove the problem. Throwing a rabid chipmunk into a chefs kitchen so you can steal his wash cloth, putting cheese in a mouse trap, putting an attractive women across the road to make a bouncer move away from a door.
Prototypical Example: Cheese in a mouse trap to catch a mouse you cannot directly catch.
Real World Knowledge The puzzle requires some aspect of real world knowledge. This includes nearly every puzzle but this pattern highlights a puzzle where it's especially true. Formulating a chemical compound, using magnets to move metal objects, knowing the to syphon petrol you usually start by sucking the pipe with your mouth, that a strong magnet will wipe a video cassette, that salt wards off evil ...
If the knowledge required is too obscure it may make the game very hard.
Prototypical Example: Balloons are often filled with helium, helium is lighter than air, helium can change your voice.
Sabotage (high level)
Stop something working, prevent something from happening, if you want to get a better job in a company you might sabotage the competition using laxatives in there drink, talking to them, distracting them with a light, you could remove a cars spark plugs, put a penny on train tracks ...
Prototypical Example: A spanner between two cogs.
Common Puzzles
The Trade
Trade is a resticted version of:
Want Foo -> Simple Item Use
It's only where to get something you must give something first, so it's more commonly.
Want Foo -> Simple Item Use (give)
You want the magic axe but the warrior wants a replacement weapon before he'll hand it over. This is the nornal trade puzzle. It's not really a trade puzzle if you can hit him on the head with a spade and then take the axe which is what the unrestricted Want Foo -> Simple Item Use would allow. Unless you say you were trading a blow on the head with a shovel for an axe ... but I think the warrior may want to dispute that.
Need To TravelA special case of FOO out of reach, where FOO is a location. Think Monkey Island in the secret of Monkey Island. Or the secret herb patch in a forest.
FOO out of reach(location)
The solution maybe be a long series of puzzles.
Some notes about the above catergories
All catergories are human invention and exist only in our heads. Few catergory systems are perfect. Some puzzles are better and more satisfying than others. The main problem with this is that it does not differenciate between good puzzles and lack luster ones. So with that said there are a few I'd like to focus on here:
I think in Monkey Island 2 you had to close an open door to find something on the back of it. At the time an extremely tricky puzzle because it's an easily overlooked thing.
The same kind of thing with picking up an item that you would imagine to be unpickupable such as a poster on a board of other posters. The poster might be useful in itself or reveal a hole or a different poster.
It's worth noting this list doesn't say much about fashioning a good game either. For instance in monkey island one there's some great foreshadowing where you get money from the circus for being fired out of a canon with a pot on your head, then later you fire yourself out of a canon with a pot on your head to get to Monkey Island.
Big Example List
These examples are culled from Monkey Island 1, if you haven't played the game yet I advise you miss this section out.
Release the prisoner - Monkey Island 1The prisoner is stuck in his cell. Grog will dissolve the bars lock, unfortunately it also dissolves the cup. To solve this problem you must keep transfering the grog from cup to cup.
Problem: Temporal Object
Solution: Repetition, Combine Items
You must repeatedly transfer the grog from cup to cup.
Canon Job - Monkey Island 1You wish to get fired from a canon for money but your potential employers are unwilling to fire you without a helmet. You give them them a cooking pot and they agree to fire you.
Problem: Key Request
Solution: New Item Perception, Obvious Item Use
Guardian Dogs - Monkey Island 1There are dangerous dogs blocking your path.
You must realize a petal causes sleep, then you must combine the petal with meat then you must give the drugged meat to the dogs.
Problem: Guardian
Solution: New Item Perception, Combine Items, Obvious Item Use
Getting a birds fish - Monkey Island 1A bird is eating a fish on the dock. You want the fish but everytime you approach it flies away with the fish. If you stand in a certain place, a board rises and hits the bird knocking it away - leaving the fish for you.
Problem: Guardian
Solution: Spatial Location
Swordsman Training - Monkey Island 1You want the swordsman to train you but he won't do it unless you have a sword and give him money. Once you have the sword you must show him and once you have the gold you must give it him.
Problem: Want FOO
Solution: Obvious Item Use (gold), Obvious Item Use (sword)
Trapped - Full ThrottleAt the start of the game you're trapped in a dumpster.
Problem: Trapped
If you punch the hatch it will open, freeing you.
Solution: Obvious Interaction.
Want To Enter A Trailer - Full ThrottleYou want to enter a trailer, there's a door and a man stopping you, he won't let you in.
Problem: Guardian
If you kick the door when he's talking you'll kick the door down and flatten the guy in the trailer.
Solution: Temporal + Obvious Item Interaction
Dog Guarding the Junk Yard - Full ThrottleEverytime you go to pick up something the dog stops you.
Problem: Guardian
To get rid of the dog you have to remove by throwing meat in a car, the lifting the car with a magnetic crane.
Solution: Bait Item Use, Real World Knowledge(magnetic cranes are for moving cars) + Obivious Item Use(crane)
You can't get into a Locked Room - Full ThrottleYou cannot seem to get into a locked room. You may not know, though you may guess, that this is because an item is hidden from you.
Problem: Hidden FOO
The solution is to move a pillow and find a crowbar, for now I'm putting this as obvious item use though I might change it.
Solution: Real World Knowledge(people put things under their pillows), Obvious Item Use(move, pillow)
Final Thoughts
Spatial, Temporal and World Knowledge are best used as modifiers on the other solutions.
I think the list is quite interesting and if you think you've can regcognize anything similar I'd be interested to here. I intend to go through a few adventure games and see what I can find.
*I changed simple item interaction to obvious item interaction to reduce the scope. Some of the examples now read a bit weird.
Notable abscences are timed problems also I found it hard to categorize the sword fighting and insult collecting with pirates and then later using those collected insults in a new situation with the swordmaster.
PuzzleFamiliar
Here's a program that will create puzzles patterns for you to fill out. All the patterns are documented there too.
PuzzleFamiliar.zipYou'll need the
.net runtime. Though it's quite likely you already have it.
I found myself longing for my own crime-sniffing cat.
One day, in the event, of finally recieving a first adsense payment - I intend to buy some hosting. I don't really want to pay for it myself. I've already got the domain name, and already I wish I'd chosen something else ... still :D.
...anyway back to the point, on this fateful day I'll probably go with
Wordpress. And I'll be able to make pages that list only my articles and from that day forth my pointless blog posts, like the one you're reading, and my posts of substance, shall be forever split and happiness will be had by all. The currently cool and groovy thing about wordpress is the
Widget. It's like a drag and drop webpage editor. Webpages and their associated technology have run away from me. I could handle simple html pages and I dabbled with perl, php, sql but now it's all AJAX web 2.0, css and all that stuff - luckily all I've ever aspired to - is exactly what wordpress offers and it's free to boot. I've currently got a test page on my local webserver where I tweak my layout until I'm ready to unleash its wonderousness upon the world.
Lately I've been on a bit of Scheme with Emacs kick. Emacs actually seems quite nice, it highlights and formats my scheme code. I can write my own macros. I would like refactoring code and autocompletion. I'm pretty sure I can get autocomplete - but I haven't looked into yet. Refactoring for me includes being able to rename functions - and the function is renamed everywhere, selecting code and then extracting it as a method or function. Also I'd like to get to know ruby better but I don't really want to start without indentation! I'm still
suffering from electric-ruby trouble and my newbie-ness at emacs leaves me at a loss as to how to correct my problem.
There's a wonderfully odd ruby tutorial from Why called
Why’s (Poignant) Guide to Ruby and it seems I may well be the last person on the internet to discover it as
del.icio.us shows 3798 other people linking to it. I do seem to remember, a long time ago, a short article about ruby with cartoon foxes - maybe that's where this books grown from. Anyway it's very entertaining - I suggest you check it out even if this is your first time on the internet and you find computers quite scary in general.
Today
A day off,
a day for more university applications and a little bit of game programming.
My tearing problem remains in windowed mode - I think the code needs profiling.
Today I'm working more on the game side of the code base - at least I'm getting there anyway.
As I work on this project there's a certain structure that keeps coming up - I'm going to call a
knowledge chain. So far I've ignored it or implemented half assed versions.
First let me give an example of it's use:
Let's say we have world, and in this world there are two cultures: forest dwellers and city people. Okay got it? Now on screen is an NPC, your run of the mill, scenery NPC, the kind we all hate in real computer games. We want to know his name.
So we ask "What's your name?"
Now because he's a boring scenery NPC he doesn't have any name data, in fact his knowledge base is empty. So he asks his "brain", "Brain, what is my name?" and his brain looks at the local database and see's no entry for name. So the brain asks the culture - "Culture, what's a a good value for name?" and culture will look up name and it has some default value there like "a peasant". So then our scenery NPC might say "I'm a peasant".
In other cases the NPCs local knowledge would override the global knowledge.
That's not the only example but hopefully it gets across the kind of problem I'm looking to resolve. Local knowledge being able to override less local knowledge in a big knowledge chain.
In the above example we might have had.
Culture
|
The Dark Brotherhood
|
NPC
Then maybe The Dark Brotherhood would have a default value for name, like "I'm a member of the dark brotherhood". Quite nifty right? I haven't actually programmed any of this but it does seem like a jolly good idea.
The problem that this currently seems to fit is to do with textures. I want a city of culture B to use B's textures to create the city. But I don't want all the cities to be the same, so I might specialize some of the cities textures as local knowledge - red doors are suddenly quite popular or something - a little thing that makes the city more unique.
When we're dealing with knowledge that NPCs might have, then it seems things might be trickier and access to knowledge would probably benefit from being restricted.
Hero>"Hello peasant where's the Hidden Diamond of ultimate power?"
Peasent> Brain?
Brain doesn't know - asks culture
Culture ah-ha I have an entry here - it's in the majors bedroom.
Brain, cool!
"It's in the majors bedroom."
Hero> Thanks.
We could resolve this with a "knowledge level" (0,1,2...) or knowledge class (lower class, middle class, upper class). Peasants may not know the following ..., Nobles can't the know the following...
... Actually may be careful constructed knowledge chains would get rid of this problem?
Culture Culture
| |
Peasant Group Noble Group
| |
NPC NPC
Let's say on the Noble group has an entry for the location of the ultimate gem of power. Now it's nicely restricted to a certain subset of NPCs.
If you did this though it means - the very top knowledge base wouldn't know everything. So you have to deal with DONTKNOW returns which could make programming a little more tricky.
Still town generation.
Actually for the moment I'm pretty much satisfied with the town generation and am stalled at making some basic art. Today I've been repeatedly frustrated by emacs and getting ruby to work nicely within it on my windows portable. I like programs to be somewhat discoverable - no one likes to read the manual, that's not the fun way to learn. Emacs is not a "discoverable" program.
Here's my current todo list, marked up in whatever GTDWiki uses for it's markup - some html shorthand.
!Doing
*Link city placement code, with city generation code.
**Start by browsing world smith and see when the calls need to be hooked up.
* Create an IVoice interface
** Possibly a set colour and say function
** Exist in NPCs and have a say wrapper
** Use from console for player.
!Done
*Done by splitting locktypes: allowing structure soil to be killed off by already placed Locks.
** To do this the Lock permission needs breaking in two. We'd have a L and a B for built. Soil from structures would be allowed to place over built but would not actually be placed. This should help to prevent the slight city stifling we have now.
**Logic for the above is implemented. But there's needs to be a decision about when to turn a tile to built? Right away?
(Right away atm)
*It seems the placers failing sometimes when there seem to be spots for buildings available. -> Turns out hamlets are often quite small.
*Isolate and extract those classes and add them to the EINFALL main build.
*Add the other classes as a resource / dll.
* Find source of and remove [[building wobblyness]] in placement.
** I believe this is solved but I'm not sure. I added the rule so that unless that map connector is overriden then the structure cannot be placed. This is so that more appropiate rotations would have a chance to be placed.
*Add structure rotation matching.
*Have connectors chosen at random.
*Have structure to load chosen at random. (already done).
*Make a list of classes that will need access to the tile map / shell map.
*[[Make More Irregular Buildings]]
*Make a more detailed town.
**What's the execution path where the second building is failed
to be added? It should suceed because there are two sides to everyroad.
**Fix it.
*Make warlords house smaller.
*Print out a character map, representing a created town.
*Got expanding rectangle working.
Here's the console mode output for a generated city called Kehenda ... actually it's a hamlet.
Generating a culture without a World Culture to modify
The culture of horiyubu is born!
Now introducing horiyubus captial city
Adding a layout to the city: True
Supplied Building Permission
Creating 4 buildings.
Supplied Building Permission
Supplied Building Permission
Supplied Building Permission
[The City of kehenda]
:Permission data:
[Current constructiong Nothing
Planner details:Layout city planner works using a permission grid
BBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
LLLLLLLLLLLLLLL
cLLLLLLLLLLLLLLLc
LLLLLLLLLLLLLLL
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBB
]
:City Data:
[
#########
############ #
# ## #
# ## #
# ## #
# ## #
####################
################################
# ## #
# ## #
# ## #
# ## #
# ## #
# ## #
# ##########
# #
# #
# #
#######################
]