Skip to Content
Gaming Hacks
book

Gaming Hacks

by Simon Carless
October 2004
Beginner
464 pages
13h 42m
English
O'Reilly Media, Inc.
Content preview from Gaming Hacks

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( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Retro Gaming Hacks

Retro Gaming Hacks

Chris Kohler
Developing Games in Java™

Developing Games in Java™

David Brackeen, Bret Barker, Laurence Vanhelsuwé
The Kollected Kode Vicious

The Kollected Kode Vicious

George V. Neville-Neil

Publisher Resources

ISBN: 0596007140Catalog PageErrata