Doom Codexery

Doom engine

Engine rendering 3D space from a 2D floor plan.

The Doom engine powers id Software's *Doom* and *Doom II: Hell on Earth*, along with titles like *Heretic*, *Hexen: Beyond Heretic*, *Strife: Quest for the Sigil*, *Hacx: Twitch 'n Kill*, *Freedoom*, and various licensed games. John Carmack built the core engine, with contributions from Mike Abrash, John Romero, Dave Taylor, and Paul Radek. It was first developed on NeXT computers, then moved to MS-DOS and compatible systems for *Doom*'s launch, and later adapted for multiple game consoles and operating systems.

The Linux version of *Doom* had its source code released for non-commercial use on December 23, 1997, followed by *Doom II*'s Linux source about a week later. On October 3, 1999, the code was re-released under the GNU General Public License v2.0 or later. Since then, dozens of unofficial source ports have emerged, letting *Doom* run on previously unsupported systems and often adding new features.

Though the engine displays a 3D space, that space is built from a two-dimensional floor plan. The player's line of sight stays parallel to the floor, walls must be perpendicular to floors, and multi-level structures or sloped surfaces are impossible. Even so, it was a major step forward from id's earlier Wolfenstein 3D engine.

The rendering and game logic are separate. The graphics run as fast as the hardware allows, but the game world updates at a fixed 35 frames per second, enabling fair multiplayer matches across different machines.

All *Doom* levels are effectively two-dimensional when viewed from above—room-over-room is not possible. This limitation makes a map mode easy to display, showing walls and the player's position.

The smallest unit is the vertex, a 2D point. Vertices connect to form linedefs, which can have one or two sides (sidedefs). Sidedefs group into polygons called sectors, which define distinct areas of the level.

Each sector has properties: floor height, ceiling height, light level, and textures for floor and ceiling. To change the light level in a spot, a new sector must be created there. One-sided linedefs act as solid walls; two-sided linedefs form bridges between sectors.

Sidedefs store wall textures separately from floor and ceiling textures. Each sidedef can hold three textures: middle, upper, and lower. One-sided linedefs use only the middle texture.

Creator
John Carmack
Auxiliary functions by
Mike Abrash, John Romero, Dave Taylor, Paul Radek
Initial platform
NeXT computers
First release platform
MS-DOS and compatible operating systems
Source code first released
December 23, 1997 (Linux version, non-commercial license)
Source code re-released under gpl
October 3, 1999

Lore & Background

The Doom engine separates rendering from the rest of the game. The graphics engine runs as fast as possible, but the game world runs at 35 frames per second regardless of the hardware, so multiple players can play against each other using computers of varying performance. Viewed from the top down, all Doom levels are actually two-dimensional, demonstrating one of the key limitations of the Doom engine: room-over-room is not possible. This limitation, however, has a silver lining: a 'map mode' can be easily displayed, which represents the walls and the player's position.

Reader's Guide

The Doom engine represented a technological leap from id's previous Wolfenstein 3D engine. Although the engine renders a 3D space, that space is projected from a two-dimensional floor plan. The line of sight is always parallel to the floor, walls must be perpendicular to the floors, and it is not possible to create multi-level structures or sloped areas. Despite these limitations, the engine's use of binary space partitioning (BSP) allowed maps to become very large without any speed penalty. The source code to the Linux version of Doom was released to the public under a license that granted rights to non-commercial use on December 23, 1997, followed by the Linux version of Doom II about a week later on December 29, 1997. The source code was later re-released under the GNU General Public License v2.0 or later on October 3, 1999. The dozens of unofficial Doom source ports that have been created since then allow Doom to run on previously unsupported operating systems and sometimes radically expand the engine's functionality with new features.

Did You Know?

More in Characters & Enemies

Elsewhere in Doom

Spotted an error? Know more?

Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced

Comments

Loading…
Open in the interactive codex →