O'Reilly logo

Gaming Hacks by Simon Carless

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Add Puzzles to Your IF Games

Challenge, guide, and tease—but don’t frustrate—your players.

IF games are often also called adventure games. Ask Infocom aficionados about their favorite moments, and they might mention the diamond puzzle in Zork II or the Babelfish puzzle from The Hitchhiker’s Guide to the Galaxy. Conflict is the heart of drama. Unless you’re creating an experimental new form of interactive fiction, you need to introduce some sort of conflict for the player to experience and overcome.

The canonical way to do that is to add a puzzle.

Designing the Puzzle

Let’s add a puzzle to the Inform adventure created in [Hack #85] and decorated in [Hack #86] .

The meat of the puzzle lies in the Scanner room. Here, the player must adjust both the analysis nets and the eye catalog—the lock and the key—to match each other. The nets then open, releasing an identity token. The player can take the token, hand it to the access controller (back in the Router), and be on his way.

To support these actions, you’ll need an analysis nets object and a way to make it change color (as the catalog does). For variety’s sake, let’s implement this as two game objects: the nets and a separate selector that changes the color setting:

Object nets "analysis nets" Scanner, with name 'array' 'arrays' 'image' 'analysis' 'image-analysis' 'net' 'nets', description [; print "Arrays of image-analysis nets hang around the sensor fountain, ready to accept and identify eyeprint data, should any arrive. A "; selector.colorname( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required