A grid of some of Infocom's covers: Zork 2 and 3, Beyond Zork, Zork Zero, Moonmist, A Mind Forever Voyaging, Starcross, Suspended, Plundered Hearts, Ballyhoo, Hollywood Visionary, and Trinity

Studies of ZIL, Part 1

History of Infocom and the Z-Machine

10 mins read

Infocom is well-known in the interactive fiction community for classics such as Zork, Deadline, and The Hitchhiker’s Guide to the Galaxy, as well as more experimental pieces such as Trinity, Plundered Hearts, and A Mind Forever Voyaging. In the 1980s, Infocom became a fundamental part of the history of IF and shaped the IF world as we know it today.

The first way they did this was probably the most obvious. The games that Infocom made pushed boundaries in every direction – from classic puzzle games like Zork, to puzzleless atmospheric types like A Mind Forever Voyaging, all the way through to Choose Your Own Adventure (CYOA) games like Journey (which, while unpopular both at the time and now, was an example of early point-and-click CYOA). The games they released did wonders in introducing over a hundred thousand people to the entire broad and diverse world of interactive fiction, and inspiring people to make their own text games.

The second way is more obscure, but just as important. It’s the Z-machine.

One issue of the time (late 70s to early 80s) was that many of the computer companies used their own platforms, all of which were incompatible with one another. This meant that designing a game for all the platforms was more than just a hassle – it was fairly unsustainable. Which is where the Z-machine comes in. The Z-machine is a virtual machine used by Infocom that was designed to be run on multiple computer platforms, as long as an interpreter1 was used. Its files were compiled to bytecode, which the interpreter could read and execute on the specific computer. This meant that the same file could be run on different computers provided the interpreter matched the computer model – but once the interpreter was made for one computer model, it could run any number of Z-machine games. At the time, this was a big innovation, as it meant one language could be used and compiled to function across many different computers.

The main language that would be compiled into the Z-machine was ZIL (Zork Implementation Language), a derivative of MDL (Model Development Language), itself based on LISP. MDL and ZIL were both used in the later Infocom games: MDL for the parser (which breaks down the player’s input and converts it into understandable steps (such as the verb and objects) for the computer), and ZIL for the main game. Over this series of articles, I’ll be studying how ZIL influenced the IF world, including games such as my recently-published debut, Milliways: the Restaurant at the End of the Universe.2 In this article, I’ll be studying the history of ZIL and its time in the hands of Infocom.

First, I just want to clarify: the Z-machine and the parser are different things. The Z-machine is the “machine” that runs the files – this could be seen as an emulator. It reads the file and translates the functions (such as outputting text) into something the user’s personal computer/device understands. The machine also has limitations – low storage space, limited use of the status line, and no images or sound, among many more. The parser is like the brain of the game: it reads the player’s input and translates it into something the computer can understand, in simple terms. The parser is part of the game; the Z-machine runs the game.

A larger grid showing covers for most of Infocom's games.
A list of Infocom’s main games

In 1979, Marc Blank and Dave Lebling released their first commercial game, Zork I. It was a huge success, and was released in z33 format – in other words, version 3 of the Z-machine: it defines what the limits are and what can be done in the game (as in, what you can code into the game). The different Z-machine versions I will look at are versions 3-6. (7 & 8 were created after Infocom stopped producing games: they were designed by Graham Nelson in the ‘90s.)

Version 3 spanned most of the Infocom games, and even once more complex versions had been made, they continued to use z3 for quite some time. This is mainly due to the lack of support for later versions on many computers, and they wanted to cater to all audiences. Version 3 had limited status line support – all the status line creation was built in (the left-hand side would display the player’s location, the score, and the moves). Suspended found its way around this by taking advantage of how it found the location variable to instead print the name of the current robot, as this was more important than the current location. Many computers did not have very flexible support for multiple windows, and so z3 could only handle some use of the upper window.4 Despite these drawbacks, z3 was used to create games for Infocom for many years after it became technically obsolete, as its smaller size and greater compatibility meant a wider audience could play the games.

The first game to use Z-machine version 4 was A Mind Forever Voyaging by Steve Meretzky, released 14 August 1985 – a whole 6 years after the initial release of Z-machine version 3. It doubled storage size (which is better for larger games such as AMFV), and extended the number of objects available to make a very large game (from only being able to have 255 objects in the code to having practically unlimited objects5. As well as this, version 4 enabled control over the status line, which AMFV took advantage of, constantly editing and changing it throughout gameplay. For example, it introduced a status line that spanned multiple rows, and for some turns added in the words “Recording” and so on, which marked the rise in experimentation with alternate UIs (User Interfaces) in Infocom’s games. Among the smaller things AMFV introduced: single-letter keystroke inputs, and enlarged dictionary size (the amount of letters the parser will read per word went from 6 to 9). One thing they did not use yet: timed inputs – which wouldn’t be used until Border Zone, in version 5.

AMFV was seen as a “flop” for Infocom. There were very few puzzles, instead aiming for atmosphere and mood. Infocom’s main audience back when this was released did not approve of this style, and sales were affected by this. Soon after, Trinity was released, and its sales were also not as high as expected – this time possibly due its controversial focus on nuclear warfare. The new and more exciting z4 format seemed to be making Infocom lose money, which seems to have ultimately been one of the reasons for the end of Infocom. Other issues also came into play, such as Infocom’s lateness in entering the graphical videogames scene, preventing them from reaching a wider audience, but new innovations to the current games seemed to be unpopular with their existing audiences. On 13 June, 1986, with business struggling, Infocom was bought by Activision, despite having turned down more profitable deals from other companies in the past.

Bureaucracy by Douglas Adams (and many of the other Implementors of Infocom, who would be brought on for months at a time to figure out how to code or design certain parts) also used version 4, but took it to another level altogether. Using full-screen moving6 inputs in the upper window to simulate bank withdrawal slips and similar, it created a whole new experience which was humorous but highly experimental – and also not very popular at the time. You would later see this style reflected in Beyond Zork.

The Lurking Horror (1987) was not a particularly influential game, but more simply the first time sound effects were used in an Infocom game. Sounds (such as drums and screaming sound effects) were used to enhance the atmosphere and make a more immersive game. It was also a z3 game, because much of their intended audience did not have computers that supported more complex formats such as z4 yet. It seemed that, despite having used a more powerful and versatile format (z4) for some of their games, version 3 still remained the most popular format.

Beyond Zork (1987) introduced version 5. The game included some of the most complex ZIL code to do with user interface since Bureaucracy. The version 5 was a highly important turning point for the beginning of modern parser games, with the introduction of 12 colours which could be used for the text and background, UNDO support as memory size increased, robust bit graphics, and mouse clicks. Marc Blank implemented timed input into the game Border Zone, where real time passing causes turns to pass in-game, requiring players to type fairly quickly in order to solve fast-paced puzzles. (This concept did not go down well with audiences, making it one of the most unpopular Infocom games.) As a whole, version 5 was the beginning of more visually appealing and “modern” games: another step towards graphical games. From this point onwards, everything would change for Infocom and the Z-machine.

A full-spread magazine ad for Infocom, showing a glowing brain with the headline "We Stick our Graphics Where the Sun Don't Shine"
Another Infocom ad, this one with the headline "Infocom's New Graphics Will Blow You Out of the Water"
Notice the irony?

Zork Zero marked another important point in Infocom and Z-machine history. It was released 19 October 1988, and at this point in the timeline, tensions began to rise between Activision and Infocom Imps (Implementors). Employees were being treated worse, packaging costs were increasing, packaging & feelie errors being made more often, and Imps were being pressured to churn out games as fast as possible. With other companies offering text adventures7 with richer graphics, Activision pushed Infocom to do the same, even after the trial with Beyond Zork, which wasn’t the absolute greatest success. To do so, however, they required a more complex Z-machine model – something that could support graphics – proper graphics – as well as full mouse support (across all windows, not just the upper window as in version 5), multiple windows that can be dynamically moved and created and removed to help with the graphics,8 and a whole lot more memory and storage space to fit all this in.

Version 6 addressed all of these problems, allowing Zork Zero to have images, clickable compasses and maps, banners, and visual minigames (such as Towers of Hanoi). And along with the extra space and complexity came a new parser. In previous ZIL games, when you wanted to ask a character about an object in a completely other place in the game, or FIND that object, or any verb that should allow distant referring, then a really annoying and unpredictable function called MOBY-FIND? was used. To anyone who has read some of the source code for the Hitchhiker’s Guide to the Galaxy, lots of the lines when teleporting from place to place (or simply moving rooms), a lot of it is moving objects so that MOBY-FIND? will work. It was terrible. The new parser took care of that by needing none of this “moving objects around” every time you wanted to refer to them from a distance – the parser would search the whole game object tree to find something, meaning it was always reliable. As well as that, even though the old parser was perfectly functional as it was, it didn’t have the same complexities as the one they were about to make. The “new parser” allows you to define your own style of inputs – if you want three nouns (PUT X IN Y WITH Z, for example) you can get it… Although that took way more fiddling around than you could imagine. In the future, I’ll study the new parser in even more detail, as I modified it myself so it could work in my own game, Milliways. In the project I am currently writing, the parser has been modified so drastically it’s hard to see the resemblance to the original.

From then on, Infocom went into decline. It next released Shōgun by Dave Lebling, which is nowadays regarded as one of the worst Infocom games, and its low sales back then prove it was viewed similarly at the time. Next was Journey by Marc Blank, which is also not highly regarded, also being Infocom’s only choice-based game. This got low sales as well. The last game Infocom released was Arthur: the Quest for Excalibur by Bob Bates, which was received better than the previous two. Despite the moderate success of Arthur, many Imps left Infocom, and it was soon shut down.

The Z-machine was left almost fully untouched – until Graham Nelson appeared with Inform and its first game, Curses, in 1993. He then went on to add versions 7 and 8, which were essentially version 5 with expanded storage size, before Inform eventually transitioned to the new Glulx virtual machine. It’s worth noting that version 6, although more complex than 5, was unused. In the end, it seems that despite their inability to reach a wider crowd because of lack of graphics, graphical games were not Infocom’s strongest point, and ultimately caused their downfall.

The history of the Z-machine is still progressing9 with Inform 10 and Glulx/Gblorb. ZIL, however? Well … I guess I am part of that future. I’ll see you next time as we learn a little bit of ZIL.

Footnotes

1 What “interpreter” means in this case (because back then they didn’t have Frotz, you know) is a small program which, according to my knowledge, was integrated into the disks you got (which also contained the game). An interpreter would read the file and translate that code for the computer it was running on. This made the idea so innovative because one file could be used across many completely different computers.

2 Milliways: the Restaurant at the End of the Universe was released less than a year ago in the 2023 IFComp.

3 Versions 1 and 2 were never actually used for released games by Infocom: early versions of Zork I and II used both types, but they were very limited and were used in early demo versions because they took up much less space.

4 In fact, the only z3 game to use the upper window for a more elaborate status line was Seastalker.

5 The actual limit (65535) would take up more storage space to reach than is available in any Z-machine format.

6 By “moving”, I mean that the input was not constrained to the bottom window. It went into the top window (where the status line is usually kept, it was just brought down), and could change position on the page (instead of being just at the bottom of the page where the cursor usually is).

7 Here, I’m not sure whether to call it “IF”, “Interactive Fiction”, or “text adventures”. There is certainly a difference – “IF” is regarded as the general modern interactive fiction genre, including pretty much anything narrative and text based. But the line is miles wide and blurry and not exactly certain. But “interactive fiction” Vs “text adventures”? Especially for back then… and especially what I’m about to talk about (not just text, also pictures)? It’s a confusing topic and worth a whole other article which I, for one, would read. But I’ll say text adventures because that’s probably what they would use. I suppose it doesn’t really matter.

8 “Windows” is, again, a bad term. If you can think of the status line and quote boxes up at the top as the “upper window”, and the main text as the “lower window”, then you can understand the rest better.

9 In 2013, Zzo38 created versions 9 and 10, which include support such as XOR, but only Zzo38’s own Aimfiz and Fweep interpreters support these versions, and the Z-machine Standards Document does not support these versions either.

Max Fog

Max Fog is a young author who works in the old Infocom coding language, ZIL (Zork Implementation Language). His work so far includes the parser game Milliways: the Restaurant at the End of the Universe; as well as the minimal choice games Thread Unlocked. and Method in my Madness.