Mark Trapp

Zork

This project is an attempt at porting the text-based adventure game Zork from its original source code written in the MIT Design Language (MDL) to PHP. More information about this project can be found in the blog post, "Porting Zork — Part 1: Introduction".

Installation and usage

Installation is done using Composer via Packagist:

composer create-project itafroma/zork:dev-master --dev

At this stage of development, there is no working binary, but you can run tests using PHPUnit:

cd zork
./vendor/bin/phpunit

Caveats

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.

Roadmap

You can follow along with development on my blog in a series of posts I'm calling "Porting Zork". This project follows 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.

Acknowledgments

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.

Copyright and license

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 LICENSE file.


Comments and feedback are welcome and appreciated. Need help on your next project? Let's talk.