Long Lost ‘Zork’ Source Code Uploaded to GitHub, But Few People Understand It
With access to the source code, a group of dedicated fans is now tinkering with the Zork Implementation Language (ZIL).
In 1977, four members of MIT's Laboratory for Computer Science Dynamic Modeling System started writing a seminal work of interactive fiction. Published later in three parts by Infocom, Zork (along with Zork II and Zork III) is one of the earliest text adventure games, and the start of Infocom’s legacy in interactive fiction. The games told stories using a choose-your-own-adventure style. You reach the end of a hallway. Which way do you choose? The player types their answer to continue the story. But beyond simple commands, Infocom’s games were able to understand more complex sentences, which gave it a depth other games of the era didn’t have.
Infocom was eventually bought out by Activision in 1986, but was quickly shut down a few years later. There are more modern collections of Infocom games available, keeping the spirit of Zork alive, but the source code, which could teach us how Infocom managed to create such a sophisticated game at the time, had been deemed lost. That is, until this week, when internet archivist Jason Scott uploaded a collection of all Infocom text adventures and interactive fiction games’ source codes to GitHub, including the Zork games and Infocom’s video game adaptation of The Hitchhiker's Guide to the Galaxy.
“They are the source coded and formulas to make some of the best-selling computer games of the 1980s,” Scott told Motherboard. “Infocom games were always in the top 10 for years, and well-regarded at the time.”
But while source code is historically significant, few people will understand how it actually works.
All of Infocom’s games were created using the Zork Implementation Language (ZIL), which is based on another old programming language called MIT Design Language (MDL), which itself was based on a the programming language Lisp.
“[ZIL] is written to create adventure games in an environment people haven’t used commercially in over 25 years,” Scott said. “And even then, it was about 15 people.”
Most people will probably parse through the code at a surface level, with “a passing interest in seeing how the adventure games they played as kids were defined by this code,” Scott added. But for a niche group of programmers, it’s a collection of information that’ll propel their research forward. The “ZIL - Zork Implementation Language” Facebook group, created two years ago by ZIL enthusiasts Jesse McGrew and Adam Sommerfield, has been teaching and supporting the language, but has struggled to find original ZIL source code to use as a reference. Sommerfield told Motherboard that for the ZIL and text adventure communities, the source code files are a huge discovery for enthusiasts.
“Aside from the historical value in being finally able to look at the code, understand the thought process, [and] maybe even get a glimpse into the minds of the Imps—Infocom Implementers—you have the fact that resources and reference material for learning ZIL has received a massive shot in the arm,” Sommerfield said.
Infocom developer and one of the MIT students who created Zork Dave Lebling is part of the Facebook group, too, Sommerfield said, and sometimes “provides guidance” to users. Steven Meretzky, another Infocom developer, has also reached out in support, thanking the group for “keeping the [ZIL] torch lit.”
Using a compiler created by McGrew, the ZIL Facebook group is now testing the code—and it’s working. One user has got all three Zork games to compile. This leaves things open for ZIL enthusiasts to tinker with the code and test it in-real time, packing on additions and modding existing games. But the licenses here are tricky; Scott noted that these were given to him anonymously and “not considered to be under an open license,” he wrote in the repository notes. That’s because Activision owns the IP.
Scott had previously uploaded “a collection of digitized scans from a large cache of documents” in 2015 related to Infocom, “The Infocom Cabinet.” It’s got notes, journal entries, and forms collected by Meretzky. In 2017, Scott published Infocom: The Documentary on YouTube. But the preservation of the source code is key in documenting the historical importance of these games. “Ten years ago I was handed the image of a development hard drive for Infocom,” Scott said. “It was thought this was all lost, but obviously, it wasn’t.”
Scott wrote in the GitHub documents that the files “represent a snapshot of the Infocom development system at time of shutdown,” but that there’s no way to compare the files available to the official games, which means the source code files are “canonical, but not necessarily the exact source code arrangement for production.”
“This collection is meant for education, discussion, and historical work, allowing researchers and students to study how code was made for these interactive fiction games and how the system dealt with input and processing,” Scott wrote.
But for those only interested in browsing the source files, there’s stuff in there for you, too. Scott told Motherboard that Infocom enthusiasts will enjoy peeking at the in-jokes typed into the code—”Game over is listed as JIGS-UP,” Scott mentioned—and to relive each game’s puzzles and variables, parsing the built-in secrets of their designs.