writing a text adventure
date created: 2025.06.30
last modified: 2025.06.30
----
I decided I should do some kind of programming project to get some practise while I'm not at college for the summer, and I landed on building a text adventure from scratch (which I wrote in python). It went... alright.
I wrote the parser first, which took the longest amount of time. It seemed like everytime I fixed something, there was another error or I realised something was missing. I got there eventually though.
After that, everything was easy. I didn't have a story in mind when I started, but I had an idea. I ended up adapting one of the cases from the 221B Baker Street board game. It was perfect. The game presents you with a scenario, and you need to go around the board collecting clues to solve the murder. It didn't need much restructuring to become a text adventure.
The most fun part was being able to add Easter eggs, and funny stuff in the descriptions. I love finding this kind of stuff in the games I play, and it turns out being on the other end is just as enjoyable.
Here are some screenshots:

I'm not sharing the game itself right now, but I still wanted to talk about it (because I did put a lot of work into it).
----
Here's some explanations in case you have no idea what I'm talking about:
A text adventure is an interactive fiction game played through text input and output. This type of game started popping up in the 60s. I have another post recommending some games if it's something you'd like to try.
A parser is the part of the code that takes the typed input from the user and interprets it into something the game can understand. You usually have to break down instructions into actions and nouns, and deal with articles, adjectives etc. The one I built is kind of simple, but they can get really complex (like the one in the Hitchhiker's Guide game).