Skip to main content

Eye of the Beholder II, from the inside

Eye of the Beholder II: The Legend of Darkmoon (Westwood Studios, 1991) is a first-person dungeon crawler set in the Forgotten Realms. The party explores a grid of corridors one step at a time, while monsters move, spells take effect and level scripts open doors, spring traps and stage encounters.

This site, the DungeonEye Codex, explains how the DOS version of the game works internally: what its data files contain and what its executable does with them. Everything here comes from studying the original files and code, and each finding states how well it is established.

How this site is organized​

The site reads like a book in three parts, with a short way in.

PartThe question it answersWhat you will find
How the game worksWhat does the game do, and with what?One chapter per subject: the rules, precise enough to reproduce, then the things of the game they apply to.
From files to the gameHow does the game read its files?One family of files at a time: what each file holds, when the game reads it and what it turns it into.
ReferenceWhere exactly, and with which values?Enumerations, structures in memory, the executable locations behind every claim, the file schemas and the anomaly catalogue.

Where to start​

I want to understand how the game plays. Read the engine in ten minutes, then the chapters of how the game works in order, starting with the engine. The level pages show what each level holds, and the glossary explains the terms used everywhere.

I want to read or modify the game files. Start with the game files, then the family of files you need in from files to the game. Each file has a field-by-field reference generated from its schema.

I want to reimplement the game, or build tools for it. Read the tour, then the rules chapter by chapter. Use the script virtual machine to parse and run level scripts, and the reference for the structures in memory and the executable locations behind every claim. The tools that produced the maps, figures and script listings can be run on your own copy of the game.

Pages that are not yet complete end with the questions that remain open, so what is not yet known is stated rather than guessed.

How to read the findings​

Some findings are read directly from bytes or instructions; others are interpretations. Only what is not established is marked, as inferred or unknown, where it applies. Names of structures, values and routines are descriptive: the original names are not known. The reading guide explains these conventions, and the technical references list the external sources consulted.

This project studies the DOS release only. It does not distribute any game files.

Questions, corrections or findings of your own are welcome on the project's Discord.