Dynamic Types and Encapsulated Rooms: How MIT Hackers Engineered Zork

A glowing sapphire-blue crystal cube containing a miniature golden door sits on a dark basalt desk.

In late May 1977, programmer Dave Lebling assembled a primitive text adventure engine on a DEC PDP-10 computer at MIT's Dynamic Modeling Group and departed for a two-week vacation. He left behind an experimental project file named "Zork"—a placeholder term used in MIT hacker slang for unproven software. Earlier that year, Don Woods of Stanford’s AI Lab had brought Crowther’s FORTRAN-based Adventure game to MIT. While impressive, FORTRAN lacked native support for variable-length strings, forcing programmers to manage world descriptions through cryptic, external lookup tables.

Photograph: Dave Lebling
Photograph: Dave Lebling. Photo: Ben Collins-Sussman. Wikimedia Commons · CC BY 2.0. Resized and converted to WebP; no retouching.

Encapsulation Before Object-Oriented Standard

MIT developers chose to surpass Adventure by using MDL, a language built for artificial intelligence research. MDL featured flexible string manipulation and allowed programmers to tie operational code directly into custom data structures. Rather than splitting room descriptions, exit directions, and item lists across isolated tables, MDL enabled the team to encapsulate entire locations inside self-contained blocks. For example, the opening room structure, named WHOUS, bound together narrative text, specific direction responses, starting items, and flags such as RLANDBIT for terrain state and RSACREDBIT to shield the room from wandering non-player characters.

Two Weeks of Hacking and Fifty Iterations

While Lebling was away on vacation, Marc Blank, Tim Anderson, and Bruce Daniels constructed the foundational framework of the game. When Lebling returned, the placeholder name stuck. The system was engineered modularly so that rooms, items, and logic could be expanded without modifying the underlying engine scaffolding. Marc Blank focused heavily on input processing, drawing on MIT's natural-language research tradition. Blank refined the game's natural-language parser through 40 to 50 iterations, transforming it from a simple two-word pattern matcher into a system capable of handling complex sentences, complete with prepositions, indirect objects, conjunctions, and punctuation.

ARPANET Randoms and the TOPS-20 Decryption

The game ran on a DEC PDP-10 operating under the Incompatible Timesharing System (ITS), an environment maintained without passwords or default access controls. Remote network users across the early ARPANET quickly uncovered the unannounced program. To keep these external testers informed of active changes, the developers placed an in-game newspaper called the U.S. News and Dungeon Report inside one of the starting rooms. Demand soon led the team to distribute encrypted binaries for machines running the TOPS-20 operating system. That security was short-lived: a DEC system hacker patched running ITS memory to bypass directory protections, then ran a key-matching program on a testing TOPS-20 machine to decrypt the source code in under a day.

Data Structures That Shaped Interactive Worlds

By embedding procedural code directly into room and object definitions through MDL, the MIT developers established patterns that defined how complex virtual spaces were structured. This architectural shift from static data tables to self-contained objects provided the structural foundation that guided the design of text-based virtual worlds for decades.

Cover: AI-generated editorial illustration; not a documentary photograph.

Source: Zork on the PDP-10

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *