Friday, July 10, 2009

Designing Puzzles

I haven’t been working much on my 3D models these past several days, having been instructed by Dirtywick to design a puzzle for our module, Shattered Dreams. While trying to come up with a good one, I pondered quite a bit on the difference between good and bad puzzles as well as what principles go into designing different types of puzzles. I’m writing my thoughts here, partly as an aid for other game designers and modders who want to make their own puzzles, but mostly so I can refer to my own notes when the need arises. None of these ideas are written in stone, of course, and I may change or refine my opinions at any time in the future.

Please note that the puzzles I’m referring to here are the ones that may be used in adventure or role-playing games.

Puzzles to Avoid

There are various kinds of puzzles, some of which are so bad that they deserve special mention. The following are the ones that I feel deserve to be in the Puzzles’ Hall of Shame.

  • Mazes. Seriously, mazes are not fun at all. They are especially bad in games where the point of view is first-person, although they can also be tiresome in 2D graphical adventures. If an area you’re designing branches out like a maze, consider redesigning it.

  • Mathematical Word Puzzles. “Sally is two years older than Tim. Ten years ago, Sally was twice as old as Tim. How old is Sally now?” When was the last time you had to open a locked container by solving a mathematical word puzzle in real life? You never had to? Well, that just goes to show how contrived these kinds of puzzles are when they appear in adventure or role-playing games. Mathematical word puzzles can be amusing for some and vexing for others, but unless you’re a scientist, engineer, or programmer, you’ll probably never encounter them outside of textbooks and silly computer games.

  • Riddles. As a means of gaining entry to an otherwise inaccessible place, riddles are almost as bad as mathematical word puzzles. What makes riddles halfway acceptable in adventure games is that Oedipus and the Sphinx had set a precedent for them thousands of years ago. Nevertheless, if some NPCs really wanted to secure a place, they could have done better than to leave a clue to entry out in the open. Unless you don’t mind some silliness in your game, you might want to avoid using riddles. There are some good exceptions to this guideline, however. Nowadays, it’s not uncommon for people who have a tendency to forget their email password to allow a means to retrieve it by having the computer ask a question that only they and perhaps few other people know the answer to. Use your judgment when determining whether a riddle is appropriate to use in a game situation. Chances are it’s not.

  • Pixel Hunting. In some games, particularly 2D graphical adventures, one of the challenges facing a player is determining which visual elements can be interacted with. Some of these visual elements are so small that they can be easily overlooked. In such cases, the player winds up wrestling with the interface. Hunting for pixels is mostly an irritating experience. Fortunately, in NWN2, a player can highlight all useable objects in visual range by pressing the [Alt] key. Many other adventure games do not have a similar feature. If you ever create an adventure game from scratch, you would do well to provide some means of making all useable objects readily apparent.

Some Principles of Puzzle Design

There are things that I call “principles” (for lack of a better word) that go into the making of a puzzle. Some of these principles may be combined to create more complex puzzles. Not all these principles will be found in each puzzle, but every puzzle has one or more of these principles behind their design. I can’t claim to have an exhaustive list of these principles, but the ones I came up with may help generate some ideas for puzzles.

  • Toggling. This is probably the simplest puzzle design. A player may activate or deactivate an object by toggling some sort of switch. For example, a certain switch may open or close an electronic door. The puzzle can be made more complicated by requiring the player to flick a set of switches in the proper combination, not unlike entering a binary string code. Sometimes, the only way to figure out what each switch does is through experimentation.

  • Matching Type. In certain puzzles, players are required to match certain objects or bits of information with other objects or snippets of info. For example, in Baldur’s Gate 2: Shadows of Amn (2000), there is a puzzle in which players have to match a set of objects with the famous personage who uses each object. Players who are familiar with the Forgotten Realms will find this puzzle easy, but those who aren’t steeped in the lore of the realms may still benefit from the textual clues provided.

  • Timed Movement. Sometimes, passage through a dangerous area may be safely negotiated by timing one’s movement precisely. For example, if a deadly blade on a pendulum swings by every few seconds, players have to time their characters’ movement so that they move past the pendulum on its upswing. If many similar traps are stringed along the passageway, it becomes a challenge for players to observe the traps’ patterns of motion.

  • Positioning. Some puzzles are solved by positioning certain objects in accordance with a set of rules. The oft-used Towers of Hanoi puzzle is an example of this. Sometimes, these objects have certain “powers” that are brought into fore or even activated from their new positions. This is particularly true of puzzle-like games such as chess and Othello.

  • Code Breaking. Simple codes can be deciphered by observing the patterns when the codes appear. The game of Mastermind is a well-known example of this type of puzzle, variations of which can also be found in role-playing games like Neverwinter Nights 2: Mask of the Betrayer (2007) and Fallout 3 (2008). A more subtle example of this type of puzzle is when the player has to decipher an alien language by observing the situations when certain patterns of symbols appear.

  • Combination. Some objects can be combined with each other to produce a new object or to change the state of one of these objects. For example, by combining a key with a locked chest, the player character transforms the locked chest into an open chest. The principle of combination is a staple of many text and graphical adventure games and is used to solve the puzzles therein.

  • Substitution. When an object is required to solve a problem, but the player character does not have it, sometimes, a suitable substitute may be used instead. For example, if the player character does not have the key needed to open a locked chest but has a wire coat hanger and a pair of pliers, the character can use these objects to produce a makeshift lockpick. The principle of substitution is a good way to add some lateral thinking to your puzzles. Nevertheless, it can be abused badly. In Monkey Island 2: LeChuck’s Revenge (1991), for instance, when the player character needs to shut off a water pump that is lacking a handle, he can pull out a monkey from his inventory and use it as a monkey wrench. Duh.

  • Misdirection. Every magician and mystery writer knows that one can hide important information with misdirection. The trick is to bring some unimportant thing into focus while keeping the salient clue in the background. In a mystery adventure, for instance, suppose that forensic examiners have determined that a certain victim’s murderer is left-handed. Later, the player character might come across an old photo of a group of people standing near a building with an impressive-looking edifice. Players who examine the photo closely might notice that one of the people in the photograph is holding a cigar in his left hand. That person just so happens to be a suspect in the case as well. Bingo. Clues can also be hidden in text by focusing on an unrelated topic while mentioning the seemingly unimportant clue in passing somewhere in the middle of the text.

  • Physics. In some puzzles, objects interact with each other in accordance with certain rules, what I call the “physics” of the game world. For example, a ball can be made to roll down a sloping surface or bounce off a spring. These objects can be positioned in certain ways so that their interaction will solve a particular puzzle. The in-game physics may or may not be related to real-world physics. For example, there is a kind of “physics” involved in the way counters interact with each other in the game of Othello, but this has nothing to do with the physics of the real world. On the other hand, there is a bit more real-world physics going on in The Incredible Machine (1992), a game where players can create Rube Goldberg machines that achieve some stated objective. The beauty of this type of puzzle design is that more than one solution can be implemented to solve the same puzzle.

Conclusion

This concludes my post on designing puzzles. There are other types of puzzles that I did not expound on because of their limited use in adventure and role-playing games. (Word puzzles such as crosswords come to mind.) Nevertheless, I may have missed a few puzzle types or design principles that can be useful in these types of games. Readers who would like to offer their own insights into the puzzle design process are invited to leave their comments here.

10 comments:

Jclef said...

Awesome post, Frank - it's much like the "Quest Types" writeup you created awhile back. Very helpful and well-presented information here. Thanks! :)

Frank Perez said...

Glad you like it, Jclef. It's fun to write about game design, but it's even more fun to get into it. ;)

Josh said...

Math puzzles... ugh... I cringe at the thought. I do have enough math in my life without adding math puzzles to the fray.

Timed Movement is fun, but its very clunky in NWN2. You wouldn't be able to pull it off very well I don't think.

Nice post though, Elysius :)

Nacaal said...

You know I would have gladly paid for these notes?

I need to design several (sigh!) puzzles for a location of my mod, the Citadel of the Mists in the High Forest, and I didn't have a clue of where to start from!

So, thank you for the ideas on puzzles' mechanics, they will help me greatly in devising the tricks&traps of the Mistmaster's haven.

Unfortunately, though, lore demands that there be mazes...

I know they are terrible, for instance the Skein in MotB got me really frustrated and I made it through only because the loot kept me going...

nicethugbert said...

s = t + 2
t = s - 2
s - 10 = 2(t - 10)
s - 10 = 2s - 4 - 20
s = 14

Bring it on!

A reflex save to timed movement would be interesting I think. Would be good for rogue play.

Hmm, an int roll vs. math would be interesting too.

You can give the player the opportunity to have a party member solve the puzzle. This way you have fewer restrictions on what puzzles you can include and it brings the game rules into play in true D&D style.

Frank Perez said...

@Josh,

I think we can pull off some timed movement puzzles in Shattered Dreams quite well. I can't discuss the details here, but I have an idea that will fit perfectly with our setting.


@Nacaal,

I'm glad you found my writeup useful. Here's to more and better modules from the NWN2 community. :)


@nicethugbert,

You get an A for your answer plus bonus points for thinking like a true D&D player. :P

Lance Botelle (Bard of Althéa) said...

Interesting post! :)

I like puzzles and believe that a good RPG should have them included in many ways. From the simple key/chest to more demanding codes. (Yes, I have even had sphinxes give riddles to gain entrance to somewhere.)

I think one of the hardest things to do, however, is offer ways to bypass puzzles for players who do not like them at all. Sometimes I will work this in for players, but sometimes I don't. ;)

Thanks for the post to help focus the mind on this topic.

Lance.

Shaughn said...

Nice write up, though I would of included the Tower of Hanoi in the puzzles to avoid as an over done option.

I am a fan of mazes if they are done well and I have included two in my game. One is optional and a bit more difficult and the second is a plot point in the game. The maze takes advantage of the companions and uses their skills as well as the players to help navigate.

Dilip said...

Another type of puzzle that can be used well are the multi-state maze puzzles - which can be designed without mazes too, if one can incorporate the logic in the surroundings in some way.
A couple of examples are in this link - http://www.maa.org/editorial/mathgames/mathgames_11_24_03.html
The second one (and variations derived from it) can easily be incorporated into NWN2 and more importantly, can be designed into a single room with the prize in the center (I think I just got an idea for a puzzle in my module - thanks for the thought-provoking post)

Frank Perez said...

Thanks for the heads up, Dilip. I ought to look up more of these math games for other puzzle ideas. Anyone else who wants more math games to look into can follow this link.

Another type of puzzle that I remembered just now is the detective mystery. I recall that NWN2 and Star Wars: Knights of the Old Republic had them. The idea in this kind of puzzle is for the player to be presented with evidence that can be gathered by looking for clues or interviewing witnesses. The player must piece together what really happened and announce who the real culprit was.