“Get Ye Flask”
… and it say…
“You can’t get ye flask!”
… and you just have to sit there and imagine why on earth you can’t get ye flask…
– StrongBad, 2004
Spare me your blogging nonsense and just let me download the Z-machine file for ‘In the StackZ – Act I’
Text Adventures! … or Text-Based Adventure Games… or Interactive Fiction… or just IF… whatever you call them, I’ve got a weird history with the genre. For younger gamers, who may not even be aware that these are a thing, they are games where the interface is entirely text based, usually looking a little like some kind of terminal window. The player enters instructions on what they want to do, and the game responds with some kind of descriptive text. For those of us who played these many years ago (or still do) then there’s a particular set of instructions, ‘style’, or conventions to the genre that you learn: For example, you can move between areas using compass directions, use key verbs like look to describe what’s around you, ‘i‘ to show your inventory, examine item to hone in on something specific in the scene…. heck, there’s a whole load of them, but you get the idea…
It’s a genre that sits in that interesting space of “It just made sense at the time” and “in hindsight it was basically a work around for the contemporary technical limitations“, which always makes me wonder what aspects of games that are current will be perceived as a ‘workaround’ in the future? For text-adventures, their backdrop was a home console market that could manage some blocky shapes moving around the screen, or early computing that were mostly text only blasted at the user through a green and black screen. Released in 1977, ‘ZORK’ probably represents one of the best known examples, but it’s not a game that I’ve ever played. Short descriptive paragraphs or scenes, characters, and objects served to power the most powerful graphics engine of all… Human Imagination…
… oh yes, I actually went there…
Cynicism aside, these games fascinate me for the genuine sense of exploration that they can contain, and I’d be lying if I said that I don’t get some pretty vivid metal images of the places and events taking place as I play them. Although I haven’t really played that many of them. Early on I definitely played a nursery rhyme themed text adventure on Atari ST that I haven’t ever managed to track back down (any ST fans out there, do send me a message if you know what I’m remembering). Then there was an educational… maths based?…. effort that my sister copied on floppy disk from school; I think it was supposed to have accompanying worksheets, but again, no idea what it was called. Later on, I downloaded a z-machine interpreter and jumped in to the rich community of games out there, but don’t think I ever completed many of them. I was more interested in just kind of dropping in and looking around.
Anywho, at some point recently, I decided to try and write my own. You know, I’m not even sure where the idea came from, but this isn’t the first time that I’ve had the idea. There exists a few rooms of a Resident Evil themed text-adventure that, as a teen, I attempted to write in QBasic… needless to say whats there isn’t great and mostly consists of a few descriptions of streets… and a bar where you can kill a zombie by throwing a dart at it… I’m creative…
This time however, I decided to do it properly and write a z-machine game. Z-machine is essentially a virtual ‘console’ for playing txt-adventure games and interpreters exist for pretty much every OS around. The great part about this is that you can play the same game on pretty much any platform you want, as long as there is an interpreter for it. The less good part is that a few of the ‘style’ options get handled differently by each interpreter which means some things don’t quite translate. One example of this is the ability to force a monospace font to allow for basic ascii-style art which didn’t happen on an Android interpreter I was testing my game on.
I decided to use a language made for Z-machine development, Inform… or specifically Inform 6 as structure seemed to make the most sense to me when I started to look in to this. This turned out to be kind of a weird learning experience, and pretty unique to the normal coding dabbling that I do. Coding in Inform, I found myself squeezed between two different game elements.
Under me was the game engine which provides the basic structure to how text-adventures work. It let’s the author quickly define rooms, indicating where the exits are and how the connect to other rooms and objects which can be found etc. There’s also a more traditional language element which lets you implement trickier things using custom functions, say for example you have a puzzle that needs a particular interactive element. All this has a kind of internal logic that you need to learn. Take ‘light’ for example; you can simply give a room ‘light’, or if the player is holding something that has ‘light’ then the room they’re standing in will also have ‘light’, but not necessary any containers in the room, unless they’re open or are transparent. Makes sense right? but with so many layers of these types of logic working on top of each other it’s easy to implement something that doesn’t work as you might imagine.
Then on top of this is the parser which takes the user command and tries to interpret it in the context of the current game situation. A simple example might be that if the player types ‘Remove’ then the parser simply interprets that as the standard command ‘take’. Again, this is great in theory as it means the author can concentrate on the game without worrying about the difficulties of interpreting an array of commands. The downside is that it’s pretty awkward to get ‘access’ to what the player has actually entered at the terminal as the parser kind of ‘sits in the way’.
Slowly however, I managed to get used to this strange environment and start to build my game. Some years ago I heard an interview with Douglas Adams, recorded when he was writing the, legendarily hard, Hitchhikers Guide to the Galaxy text-adventure. He was complaining that the process was taking him a long time as if you describe something in the text then the player should be able to investigate it which might lead to the need to describe a whole load more things and so on… I can really imagine the notoriously-deadline-slipping Doug struggling with this. For me, I think I found a happy compromise between something I was satisfied with in terms of detail and making some progress. Even so, finding where to drawn the boundaries of the imaginary world is trickier than I’d originally imagined.
I’ve only just about completed ACT I of my game, ‘In the StackZ’ which is more of a prelude than anything else, and I can’t be sure how much further I will take it. It’s more about me exploring how these games work than an artistic masterpiece… actually, it’s pretty far from masterpiece level…. if you want to play a text-adventure then there are much better ones out there. But If you’re still interested and want to give it a shot then you can:
Download the Z-Machine Game File for ‘In the StackZ’ Here
(Sorry for it being a zip file – that’s all I can get WordPress.com to host)
…you will also need a Z-machine interpreter, of which there is a list here. Frotz is probably the most well known, but there are others, including a handful for mobile devices. I’ve been using an app called ‘Text Fiction’ for Android that seems to be fine (although doesn’t format everything quite right) and has a chat style interface along with quick buttons for common commands that could be more comfortable if you’re not familiar with these games.
Or, there is a web interpreter called parchment which works really well too! You’ll just need to point the gamefile to it.