Eye of the Beholder, decompiled: how it works
Eye of the Beholder won't start unless it is handed the word homie. What the 1991 game was, why CRPG fans still talk about it, and how the whole program works, read from its decompiled C.
A matching decompilation
Eye of the Beholder, the 1991 DOS dungeon crawl, came without its source code, so we wrote some, in C. The original compiler, Turbo C++ 1.00, turns it back into the game's own bytes, all 1,011 functions of it. Then we read it to see how the game actually works.
Eye of the Beholder is a real-time, first-person dungeon crawl, made by Westwood Associates for SSI in 1991 under the Advanced Dungeons and Dragons licence. It brought the Dungeon Master formula to the PC: four heroes, one first-person view, and monsters that don't wait around for you. I played it growing up, on a 486 with VGA graphics and an AdLib card.
The game is three programs, START1.EXE, INTRO.EXE and EOB.EXE, and no source code. This project wrote that source code in C, function by function, and the test is strict: Borland Turbo C++ 1.00, the compiler the original was built with, has to turn it back into exactly the same bytes.
All 1,011 functions match: 783 in EOB.EXE, 213 in INTRO.EXE and 15 in START1.EXE. Linked with TLINK 3.0, the programs rebuild from that source. START1.EXE comes out identical, the other two differ only in documented details like the link date, and recorded play sessions replay the same on the rebuilt programs as on the originals.
This is the second game done this way, after Pool of Radiance, with the same method and a team of AI agents doing most of the work. With readable source we can see how the game works inside: one big loop on a single clock, a dungeon made of cells with small scripts, a 3D view painted from pre-drawn pieces, and four graphics cards driven through one table.
One note: the copy studied is the fan patch called "1.9", not the retail release, so a quirk shown here may not match the copy you played in 1991.
Seven pieces, each one a video and a written article, out one at a time.
Every level, from the game's own filesThirteen PDF maps of Eye of the Beholder, one for each of the twelve levels and one for how they connect. They are extracted from the game's level files, not from walkthroughs: walls and doors from the level maps, and switches, locks, traps, messages, items and quests from the level scripts.Download the maps
Get each article as it lands, or watch the videos.