A warm glowing sphere in darkness, beside the word GRUE

You are standing at the end of a road before a small brick building. Around you is a forest.

Those two sentences opened the first adventure game, nearly fifty years ago, on a terminal screen. In Grue you hear them spoken. You don’t type. You say what you want to do, “enter” or “take lamp”, and the game answers out loud.

Grue is Colossal Cave Adventure played entirely by ear. There’s nothing to read and nothing to look at, just the cave, and a voice.

Why make a video game without video?

The game is dedicated to two people. My mother, Dorothy Sohl, loved radio theater. My grandmother, Marion Jansen, was blind, and when I was a child we listened to books on records together.

They both knew a voice in the dark is enough to build a world. A text adventure is already most of the way there. It’s a story told in second person, one room at a time, waiting for you to answer. Taking the text off the screen doesn’t lose anything. It gives the cave back the darkness it was written for.

It also makes the game playable by people a screen leaves out, and by anyone whose eyes are busy or closed. I’ve wanted to try this for many years, and finally open source tools are up to the job.

The whole original game, word for word

Will Crowther wrote Colossal Cave Adventure in the mid-1970s, and Don Woods expanded it into the game most people remember. Eric Raymond keeps it alive today as Open Adventure, and Grue is built on his version: all 185 locations, the treasures, the dwarves and the pirate, the troll bridge, the maze of twisty little passages, and the full 430-point endgame.

I wanted Grue to be that game, not a retelling. Open Adventure ships about a hundred recorded test games, each with the exact text it should produce. Grue replays them all and compares its output word for word, dice rolls included. 87 match exactly. The rest differ only where Grue means to:

  • Unlimited lives. After a death it asks if you’d like to be put back just before it happened. Walking back by ear takes minutes, not seconds.
  • A magic word you can say. The original’s reservoir word is a random jumble of letters. Grue picks a real word instead, so you can pronounce it.
  • A hint for the forest. It’s 22 identical rooms, and that’s brutal without a map. Grue tells you that heading east usually gets you out.
  • No save and restore. Grue saves your game every turn on its own so that you can continue if interrupted by a phone call.

How it plays

The game talks and you listen. When it’s done, a rising chime tells you the microphone is open. Commands are the original’s one or two words: “north”, “take lamp”, “open grate”, “back”. Say help to hear how to play. Say details for the original game’s own long advice. Repeat replays the last thing said, and restart starts over.

The screen stays dark except for a single lamp. It glows warm while the game speaks and brightens while it listens. If you get stuck, What can I say? lists the commands that make sense right now. It only shows words you’ve already heard, so it never gives a puzzle away.

It’s possible to play the whole game with the phone in a pocket. Pocket mode keeps the screen awake and ignores stray touches, and you drive it from a Bluetooth headset:

  • One press skips ahead while the game talks, repeats the last turn while it listens, or wakes the microphone.
  • Two presses skip, and three repeat.
  • “Sleep” closes the microphone, so a rustling pocket doesn’t turn into commands.

There’s one limit a web page can’t get around: the phone has to stay unlocked.

How it’s built

Under the voice, Grue is a small interactive fiction engine in C. It handles everything generic: parsing two-word commands, moving through the map, picking things up, describing rooms, saving, and rolling dice. The dice use the original’s own random number generator in the original’s order, which is what lets those test games replay exactly.

The engine knows nothing about Colossal Cave. The game is all data and script:

  • The world is a data file of rooms, objects, travel rules and messages, generated from Open Adventure’s own description.
  • The logic is Lua, ported from Open Adventure’s C: every verb, the lamp’s batteries, the cave closing, the dwarves, the pirate, scoring and hints.

Both are compiled into one self-contained program. Another game could be written for the same engine without touching it, something we added for fun.

The speech runs entirely on your device, with no cloud and no account. The narrator is Kokoro, a small open text-to-speech model, using its English voice “George.” Most lines are recorded ahead of time, so they play instantly, and anything else is spoken live in the browser. Listening uses Vosk, an offline speech recognizer, limited to the game’s own vocabulary. That restriction is what makes one-word commands work: open dictation hears “enter” as “m too.” The engine itself is compiled to WebAssembly, so the whole thing is a web page.

Making your own game

The engine running Grue is designed to be general purpose: it isn’t tied to Colossal Cave, so you can write a game of your own for it. A game is two kinds of Lua: a world file that describes the place, and a script that says what happens in it.

Here is an entire, very small game. The world comes first, then a few lines of script:

Verb { "VERB_NORTH", words = { "north" }, motion = true }
Verb { "VERB_SOUTH", words = { "south" }, motion = true }
Verb { "VERB_RING", words = { "ring" }, reply = "Ring what?" }

Room { "LOC_HALL", long = [[You are in a long hall. There is a door to the north.]],
       short = [[You're in the hall.]] }
Room { "LOC_GARDEN", long = [[You are in a quiet garden, behind the house.]] }

Object { "OBJ_BELL", words = { "bell" }, at = LOC_HALL, immovable = true,
         desc = [[A brass bell hangs by the door.]] }

Travel { LOC_HALL, { VERB_NORTH, go = LOC_GARDEN } }
Travel { LOC_GARDEN, { VERB_SOUTH, go = LOC_HALL } }
Start(LOC_HALL)

on(VERB_RING, OBJ_BELL, function()
  say("The bell rings out, and somewhere in the garden a bird answers.")
end)

function intro()
  say("Welcome to a very small game.")
end

The engine does the generic work for you: it parses commands, moves you along the travel rules, describes rooms and the things in them, rolls dice, and saves your game every turn. The script handles everything particular to your game, through a small API:

  • on(verb, object, fn) for an action.
  • ask() for a question that waits for the player’s answer.
  • each_turn and after_move for things that act on their own, like a lamp running down or a dwarf on the prowl.
  • special for travel too odd to write as a rule.

All of Colossal Cave, the dwarves and the pirate included, is written in just this way.

Speech comes along for free. Every line your game can say is spoken in the same voice: live, or instantly once it has been recorded ahead of time. The recognizer is limited to the words your game declares. So a new game is speakable and listenable without any extra work.

It’s early days still. The code is open source and available on GitHub. There’s no game picker yet: you build your own by pointing the Makefile at your Lua files instead of Adventure’s. The README and the comments in the code are the manual for now.

Try it

Open grue.sohl.com, press Begin, and allow the microphone. It was made for an iPad but works in any recent browser. Find a darkened, quiet room and a reasonable supply of tea, or your beverage of choice. A paper and pencil for map making might help.

Grue is free and open source under the same BSD license as Open Adventure, and the code is on GitHub. No ads, no accounts, and nothing leaves your device.

Later, maybe, comes a native app that can keep listening with the phone locked in your pocket. If you play it, I’d love to hear how far you get.

Good luck. And mind the dwarves.