Not exactly Zork 1. Zork was originally written on MIT mainframes, but when they decided to start Infocom and release the game for profit they couldn't get it all to fit on the personal computers of the time, and so they split it into 3 parts. Zork 2 had the coal mine and the Bank of Zork, I think, and Zork 3 had the endgame. They then added some extra stuff to Zork 2 and 3 that wasn't in the original mainframe version.<p>The history of the source code is interesting. It was called Zork and written in MDL. At some point they renamed it to Dungeon, but then a little while later named it back to Zork. During the time it was called Dungeon, a DEC engineer logged into their system (open to the world on purpose so people could play the game) but instead of playing the game copied the source code off. Then they translated the game into Fortran so they could run it on PDP-11s. This source code is the descendant of that translation.
reading old C like this, I always wonder how could people code like this back then but apparently it was transpiled from fortran. So I'd assume the original code looked better. I dug around and found it, for comparison here is the original rooms.f vs. rooms.c:<p><a href="https://paste.ubuntu.com/25458063/" rel="nofollow">https://paste.ubuntu.com/25458063/</a><p><a href="https://github.com/mgius/zork/blob/master/rooms.c" rel="nofollow">https://github.com/mgius/zork/blob/master/rooms.c</a><p>Here is the full fortran code: <a href="http://gunkies.org/wiki/Zork#Source_code" rel="nofollow">http://gunkies.org/wiki/Zork#Source_code</a>
In <a href="http://blog.zarfhome.com/2017/08/your-load-is-too-heavy-zork-deep-reading.html" rel="nofollow">http://blog.zarfhome.com/2017/08/your-load-is-too-heavy-zork...</a> , Andrew Plotkin was pointing to an Inform 6 version of Zork by Allen Garvin ,
<a href="http://plover.net/~agarvin/zork1.txt" rel="nofollow">http://plover.net/~agarvin/zork1.txt</a> derived from the original decompiled Z-machine code.
See also Open Adventure:<p><a href="https://gitlab.com/esr/open-adventure" rel="nofollow">https://gitlab.com/esr/open-adventure</a><p>“<i>This code is a forward-port of the Crowther/Woods Adventure 2.5 from
1995, last version in the main line of Colossal Cave Adventure
development written by the original authors. The authors have given
permission and encouragement for this release, it obsolesces all
the 350-point versions and previous 2.x (430-point) ports.</i>”
This was also discussed a couple of days ago:<p><a href="https://news.ycombinator.com/item?id=15138114" rel="nofollow">https://news.ycombinator.com/item?id=15138114</a>
That Makefile made my day...<p><pre><code> # On SCO Unix Development System 3.2.2a, the const type qualifier does
# not work correctly when using cc. The following line will cause it
# to not be used and should be uncommented.
</code></pre>
Write once, run anywhere provided all the tweaking is done properly. Those were the days.<p>EDIT: formatting.
Neat. compiled right up on my SunOS 4.1.4 machine with only a slight modification (dsub.c had some C++ style comments that the old BSD cc didn't like).<p><pre><code> phoenix$ zork
Welcome to Dungeon. This version created 11-MAR-91.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.
></code></pre>
It would be interesting to refactor zork into HTML+CSS and set it up like cssZenGarden.com so folks could add their own designs.<p>Although a much smaller text adventure game would me more achievable.