OS X may be the world?s most advanced operating system, but tonight, I took it back into the early 80?s. In the early days of the internet (or Arpanet, back then), a text-based game known as Zork was all the rage. I remember playing it on a TI Silent 700 dumb terminal with thermal paper, connected to the net at a whopping 300 baud.
Zork was the second big computer adventure game (after Adventure, of course), and it featured an amazingly detailed universe, and a slick English-language command parser. Infocom eventually published the Zork games for the PC, but my memories are strictly from the dumb terminal era. The first three Zork games are available freely on the web; more recent versions are still owned and protected by Activision.
Zork was originally coded in MDL (pronounced muddle), but over the years, it was rewritten in C, so I set out on a mission to get it running on OS X. After some searching, and a little bit of editing, I got it to work (as the screenshot shows; click here for a larger version). It turns out the hardest part was finding all the pieces. Read the rest of this article if you?d like to know how it works, and for step-by-step installation instructions.
If you don't want all the details and just want to play, grab the binary download of a UNIX Zork engine (Jzip), the first three Zork game data files, and a Read Me from my "Griffman's OS Collection" page.
And yes, I know about (and own) "The Lost Treasures of Infocom" I & II for the Mac; that's not the point -- I wanted to see if Zork could be run in a terminal window on OS X -- and it can!
Zork runs courtesy of an interpreter which understands Zork data files. Zork?s developers created a standardized system for handling adventure games (this made it quite easy for them to create follow-on games), which future programmers have used to recode the original game engine. So the first thing we need to do is get a Zork game engine. There are a number of them out there, for a number of platforms.
I used one called Jzip, primarily because it was the first one my google.com search came across. Jzip will run all games written by Infocom except for Zork Zero, Journey, Shogun, and Arthur (remember, only the first three Zork games are free; you?ll have to own other versions in order to use them legally). Other engines may work better, but this article deals solely with Jzip. Here?s how to get the engine running.
NOTE: You need to have the Developer Tools installed to compile Zork yourself. If you don't want to install them, download the precompiled binary.
unzip jzip21-10oct2000.zip -d ~/Documents/jzip_work/
cd ~/Documents/jzip_workThis step creates the makefile we?ll use to compile the source. There are three different UNIX .mak files you could use, but this one seemed to be the best option (see the docs on the Jzip home page for more info on the .mak files).
cp unixio.mak makefile
vi makefileFind the line that reads LIBS = -lz -ltermcap and change it to read LIBS = -lz -lcurses. This changes out one of the libraries we compile Jzip with.
Mac OS X Hints