Developer Diary: Writing a Text Adventure for The Gullrock Light
A lighthouse in 1897, a two-word parser, twelve pictures and a clock ticking towards midnight. How we wrote a classic text adventure for the Spectrum.
The Gullrock Light is our illustrated text adventure for the Spectrum 48K and 128K. It's autumn 1897, you're the relief keeper rowed out to a lighthouse island at six in the evening, and the light is dark. The keeper, Ezra Tull, is missing, and the steamer Marigold will pass the Gull Reef at midnight. This diary is about how we built a game of words in 2026: the story, the parser, the pictures and the score out of 100.
Why 1897 and a lighthouse
A text adventure needs a place you can hold in your head and a reason to hurry. A lighthouse island gives both. It's small enough to map, with a shore, a keeper's compound, the tower itself, a moor with a ruined chapel, a set of sea caves and the wreck of an old ship called the Petrel. That comes to 40 locations, which felt like the right size for a game you can learn over several evenings.
The clock supplies the hurry. The game starts at 6:00 pm and every move takes time, so midnight is a real deadline rather than a threat in the introduction. Setting it in 1897 keeps the tools simple and physical: oil, mantles, a lens to clean and clockwork to wind. Nothing on the island needs explaining beyond what a Victorian keeper would know.
A story written as a script
We didn't write the adventure in assembly. The whole story lives in one script: every room, object, message and rule. A compiler turns that script into compact bytecode that the game runs, in the style of the condition-and-action systems that 1980s tools such as The Quill used. Each rule says, in effect, "if the player typed this, and these things are true, do these actions."
There are two tables. One answers what you type. The other runs every turn whatever you type, and that's where the clock, the tide and the lantern's oil are handled. The bytecode has IF, ELSE and end-of-block steps, which made the trickier puzzles much easier to write than a flat list of rules would have been.
Text is the biggest thing in an adventure, so it's compressed. The 127 most common pieces of text become single bytes, which took the game's words from 20.4 KB down to 12.6 KB. Code and data together come to 34.9 KB, and the tape is 42 KB.
The parser: two words and six letters
A parser is the part of an adventure that reads what you type and works out what you mean. Ours follows the classic two-word pattern, verb then noun, as in GET LANTERN or EXAMINE TABLE. Only the first six letters of each word count, so EXAMIN works as well as EXAMINE.
Two words is a limit, but a fair one if the game meets you halfway. So the parser knows synonyms, skips noise words like THE, and understands a few common phrases such as PUT OUT, PICK UP and GO NORTH. The single letters N, S, E, W, U and D move you about, and I lists what you're carrying. You can hold seven things.
The game doesn't rely on the Spectrum's ROM; only tape SAVE and LOAD use it, when it's there. It has its own six-pixel-wide font, so more words fit on a line, and its own keyboard routine that spots each new key press. That means quick typing with keys rolled together isn't lost, which matters in a game you play entirely at the keyboard.
Twelve pictures in eight rows
The screen is split in three. The top eight character rows hold a picture, 256 by 64 pixels. Row nine is a status bar with your location and the time. The other fifteen rows are text, which wraps neatly at word boundaries and scrolls, with a "more" prompt when there's too much to show at once.
There are twelve scenes, shared out across the 40 rooms. Each was drawn to fit the Spectrum's colour cells, where every 8 by 8 block can only have two colours (our article on attribute clash explains why). The pictures are packed with simple run-length compression, which stores a run of identical bytes as a count and a value, and take about 9.9 KB in all.
Classic-tough on purpose
We wanted the game to feel like the adventures of the 1980s, where the world doesn't forgive carelessness. Some rooms are pitch dark, and moving anywhere in them except back the way you came is fatal. The storm lantern burns for 150 minutes of game time on each fill. Carry a naked flame into the oil store and it explodes. Jumping from heights or climbing down the well ends the same way.
The tide makes the wreck a timed puzzle. You can only reach it between 7:00 and 8:30 pm and again between 10:00 and 11:30 pm, and the game warns you just five minutes before the water comes back. To keep this fair, RAMSAVE stores your position in memory, and after a death you can press R to go straight back to it. Once you've found Ezra, TALK EZRA gives you the next hint you need.
Scoring out of 100
The score is a map of the story. Points come for small steps, like getting a light going and recovering a key, and for the big ones: freeing Ezra is worth 15, and dealing with a false light that someone has lit on the headland is worth 10. Preparing the lamp is worth 35 on its own: filling it, fitting a mantle, cleaning the lens, lighting it and winding the clockwork all score. Winning adds the last 5.
To win you must do all of that and knock down the false light before midnight. A perfect run takes about 95 moves and ends at around 7:37 pm, so there's plenty of time if you know what you're doing. You won't, the first time. That's the point.
Music, testing and playing
On a 128K, the AY chip plays "The Keeper's Lament", a slow sea shanty in D minor, while the introduction is on screen. It stops the moment you press a key, because a text adventure needs quiet. The score jingle, death and win then play as AY tunes. On a 48K the game uses the beeper instead, for key clicks, the fog bell and the rest. Our piece on the Spectrum 128 and the AY chip has more on the difference.
We tested the game by loading it through the real 48K start-up and the 128K Tape Loader. A full walkthrough scores 100 out of 100 on both machines, and in Specz's quick start, the mode that runs without the ROM. Every kind of death was tested too, along with RAMSAVE and R, and saving to tape on a real ROM.
You can play The Gullrock Light in your browser now. Keep a pencil handy for a map, and RAMSAVE often. If you'd rather blast than type, read the Mothfall developer diary and then pick something from the arcade.