Port of MIT's version of Zork from the original MDL source.
You might be wondering, "why do this?" And you may well ask, "Why climb the highest mountain? Why,
35 88 years ago, fly the Atlan—" Okay, the real reason is because Zork holds a special place in my heart and I wanted to see if it'd be possible to replicate it in its original form—feature for feature, bug for bug—in modern languages.
The original incarnation of Zork was written in the late '70s in a language that has long been obsolete. In order to create a faithful adaptation, the original algorithms, procedures, and program design have been ported without consideration of modern programming principles. Concepts and structures that did not exist in MDL—for example, objects—are not used. This repository should not be considered a paragon of current development practices, but an exploration of a historical moment in game development.
With that in mind, I have made a few conceits:
- Concepts and data structures that existed in MDL but do not exist in certain, more modern languages (e.g. enumerable types in PHP) are replicated as best as possible while still maintaining the spirit of the original code.
- Namespacing of functions (and classes when they are necessary) is used.
You can follow along with development on my blog in a series of posts I'm calling "Porting Zork". This project will follow the Semantic Versioning standard: the first numbered unstable version, 0.1.0, will contain a running executable (though not a complete game). The 1.0.0 release will be a complete port.
composer create-project itafroma/zork:dev-master
At this stage of development, there is no working binary, but you can run tests using PHPUnit:
cd zork ./vendor/bin/phpunit --configuration phpunit.xml.dist
The original Zork was designed and implemented between 1977 and 1979 by Tim Anderson, Marc Blank, Bruce Daniels, and Dave Lebling working out of the MIT Laboratory for Computer Science Dynamic Modeling System (MIT-DMS).
I am using the reference manual The MDL Programming Language by S. W. Galley and Greg Pfister to facilitate the porting process.
The original Zork source code is copyright © 1978 Massachusetts Institute of Technology. All rights reserved.
Where applicable, the ported source code is copyright © 2015 Mark Trapp. All rights reserved. The ported code is made available under the MIT license. A copy of the license can be found in the
This a personal project in its early stages of development and planning. It is not ready for collaboration or a guarantee of fitness. It's being made available for transparency (and so I have something to point to when I want to talk about it), but be warned that:
- Support requests via GitHub issues or email will go unanswered and ignored
- Pull requests will be summarily rejected
- Public progress may be minimal to non-existent for long stretches at a time
You're welcome to use what's here under the terms of its license (if one is available) or the principles of fair use (if one is not). If you like the idea/premise behind this project, I would suggest starting over the way you'd want to do it yourself as I am very unlikely to accept future contributions forked off of, or derived from, this project's current stage of development.