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: A text editor screenshot showing the arrays of inventory items and rooms on the map, as well as Boolean flags for instantTravel, gameOver etc. A text editor screenshot showing the hint function, which picks one of five hints from random. Hints include 'Don't judge a book by it's cover' and 'have you read the news?' A text editor screenshot showing arrays storing synonms of verbs. For example, 'go' aliases are 'go', 'go to', 'move to', and 'enter' A text editor screenshot showing the item list. Items include 'aspirin', 'notebook', 'skull' and 'cat'. A terminal screenshot showing the room description and exit list for the main room of the theatre in game. The player's command shows them talking to a character named Longsworth. The text reads: 'You ask Longsworth about the victim, but he doesn't say much. You ask him if he has any idea who commited the murder, and he says that the Bishop smokes German cigarettes like the ones found at the scene.' A game screenshot showing the player looking at a skull (the description reads: 'The prop used as Yorick's skull in the play. It occurs to you that it might be a real human skull.'), and talking to the actors backstage. A game screenshot showing the inventory and the player writing in the notebook (which is in the inventory). The player writes 'wait. i can actually write in this?' A game screenshot showing the introduction text, which reads: 'The Duchess of Tallcourt went to the Playhouse theatre to watch a production of Hamlet by the Longsworth Theatre troupe. With her was the strange preacher, who had arrived in town a few weeks ago, carrying his fancy bible under his arm, as always. 

The duchess went to the powder room during the interval. When she came back, the preacher was lying dead on the ground, in a pool of his blood. He had been stabbed.

Your job is to find out who killed him, with what, and why.

Good luck!'. 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).