The Clock Tower, a text and sound adventure game

This is a small (10 rooms) text adventure game created for the Autumn Lisp Game Jam 2025. It’s a traditional text adventure with the added twist of dynamic audio that changes according to the game state.

The game is written in Fennel, a Lisp language that compiles to Lua, and uses the LÖVE game engine.

At the itch page there is an online version you can play in a browser. Alternatively you can download the clocktower.love game file and run it locally in a terminal using the LÖVE engine.

The game’s source code can be downloaded from the itch page or from the above Fossil repository. The Fossil repository additionally has the change history, wiki, and tickets. The dev log has comments on the process of developing the game over the 10 days of the jam.

Besides the integrated audio, a point of interest is the game’s parser, which uses a parsing expression grammar (PEG). It lets you express commands in different ways, for example RADIO OFF or TURN THE PORTABLE RADIO OFF; ENTER 12345 or UNLOCK THE BOX WITH THE CODE 12345. Dev log day 4 talks about the parser.

8 Likes

The game implies a funny sort of world. The audio is well programmed. The parser message for not understanding stuff, only referring to the first letter of what was typed, is fast irritating, but, I mean, you wrote a parser and a parser game in a few days. EDIT - Ok not a few days but under two weeks!

I had to look at the source to solve one puzzle, but I thought afterwards that was slack of me. I would’ve got it if I’d been slightly more vigilant.

-Wade

Thanks for playing! The message that’s displayed when a command cannot be parsed does not always include just the first letter of the command. If the command can be parsed but only up to a point, the message will show the command up to the first letter of the unparseable portion:

>take the mysterious mushroom
Taken!

>take the mysterious surfboard
Huh? I made it as far as "take the mysterious s" before the command stopped making sense.

If parsing gets all the way to the end of the command without producing something intelligible, it looks like this instead:

>pick up the
Huh? That command seems incomplete.

The idea was to give the player some information about what’s going wrong with parsing, for example if they’re using a verb that’s understood by the game with a noun that isn’t. But yes, it’s a common case that the player uses a verb the game doesn’t understand, and because the verb comes at the beginning of the command, that means the error response only includes one letter. Probably we should trim the final letter from the quoted command prefix, stopping just before the first error character, not including it.

This mechanism uses the MaxOffset capture technique from the “Mastering LPeg” documentation.

2 Likes