Today, the source code of many old Infocom Text Adventures (such as Zork) has been uploaded to Github:
Jason has been going through the Infocom archives a few years ago 1 and he mentioned the existence of the “Infocom Drive” with these sources but they never surfaced. It’s great they finally found the light of day.
As Andrew Plotkin points out, it’s not clear how long this will stay up. So if you care about those things, you might want to get them right away.2
Infocom, Text Adventers, ZIL and Z-Machines
Infocom as game studio (they also made a database product) was a pioneer in text adventures. As the name suggests, text adventures are purely text based games where the player direct the action by entering short strings of words to give commands when prompted with the game responding with text describing the action of the players command.
Zork was the first of their games and massive success, with sales increasing for years as the market for personal computers expanded. In 2007, Zork was included in the game canon by the Library of Congress as one of the ten most important video games in history3.
Infocom games were written using a programming language called ZIL (Zork Implementation Language) that compiled into a bytecode able to run on a standardized virtual machine called the Z-machine. This sounds very convoluted for the simplicity of the game until we remember that Infocom was founded in 1979, just two years after the release of the Apple II and two years before the release of the first IBM PC. There were countless different home computer brand with incompatible architectures on the market being sold (Amstrad, Commodore, Atari, Amiga etc.), until the market consolidated in the first half of the 80ies.
As the games were text based and used variants of the same Z-machine interpreter, the interpreter had to be ported to new computer architectures only once per architecture, rather than once per game. With the Z-machine, Infocom was able to release most of their games for most popular home computers simultaneously
This also makes running these games on modern platforms very feasible, as all one has to do is implement a Z-machine. Frotz is the most popular one and it’s still maintained - there’s even an iOS Version!
Infocom Source Code
Jason shared some context on the shared source code in a longer Twitter thread and called out one thing specifically which piqued my interest:
Somehow I found this hard to believe. There’s a programming language used in early video game history for some of the most successful games of their time - and no compiler exists anymore?
And guess what - while the original compiler (called Zilch) is actually lost, somebody already implemented one for modern systems! ZILF is open-source toolchain written by Tara McGrew that includes a ZIL compiler, a Z-machine (ZAP) assembler and ZIL libraries for writing text adventure games. It is written in C#, and runs under Windows, MacOS, or Linux.
Installing ZILF and Frotz
I thought it would be nice to have a toolchain available on homebrew to easily run these games from source. Frotz, the Z-machine is already available on homebrew to play the compiled games, but to compile them, you’d have to download and build ZILF manually.
I opened a PR ( ) for this to get this included in homebrew, but in the meantime you can try it out via my custom tap :
brew tap chkuendig/zilf
brew install frotz zilf
I wasn’t able to get zilf to compile the samples in any other directory than “bin/” (just unzipping it locally and renaming the folder means some includes start to break), but other than that, this passes all audits. Update: This is fixed now
Building Zork
Let’s try to run Zork, as mentioned Infocom first game and probably biggest hit.

Once you have ZILF and Frotz installed, it’s time to build. ZILF takes ZIL source code and compiles it into Z-machine assembly code, which is then passed to ZAPF to make the final Z-code story file.
git clone https://github.com/historicalsource/zork1.git
cd zork1
zilf zork1.zil
zapf zork1.zap
And that’s it, you have built Zork from source! Just run frotz zork1.z3 and the game starts:
ZORK I: The Great Underground Empire
Infocom interactive fiction - a fantasy story
Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986 Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Release 0 / Serial number 190416
West of House
You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here.
>
Have fun!
Postscript:
-
A Cabinet of Infocom Curiousities — November 23, 2015 and The Rest of the Infocom Cabinet — November 25, 2015 ↩︎
-
If you want to do it in one go:
curl "https://api.github.com/users/historicalsource/repos?page=1&per_page=100" | grep git_url | cut -d \" -f 4 | xargs -L1 git clone(credit to JWZ) ↩︎