The Illusion of 3D
How raycasting changed video games · Olaf Minkowicz · COM100
Source: FPS: The Definitive First Person Shooter Documentary, 2023
ray · casting
verb
send a ray out from the eye, find the first thing it hits, draw that.
1982
Scott Roth at General Motors Research Laboratories, “Ray Casting for Modeling Solids”: one ray per pixel into a model of blocks and cylinders.
games
one ray per screen column on a flat grid. No bounces, no reflections. That's the difference from ray tracing (Whitted, 1980), and why it ran on a 386.
Source: Roth, “Ray Casting for Modeling Solids”, 1982 · Vandevenne, Lode's Computer Graphics Tutorial · FPS Documentary, 2023
ThesisRaycasting helped popularize FPS games by turning a simple 2D map into a convincing view. Its history, basic process, and legacy explain why it mattered.

I · History

  • Maze War 1973–74
  • Battlezone · Wayout · The Colony
  • id: Hovertank → Catacomb 3-D → Wolfenstein 3D

II · Process

  • grid · player · rays (DDA)
  • distance → wall height · textures

III · Legacy

  • Arena · Rise of the Triad
  • Doom · Duke 3D · Quake
Source: FPS: The Definitive First Person Shooter Documentary, 2023
Intro to Maze War → multiplayer · 2.5×
Maze War (1973–74)
NASA Ames on an Imlac PDS-1, then MIT: eight players on a PDP-10. Wireframe corridors: the perspective, not the technique.
Greg ThompsonGreg Thompson
Dave LeblingDave Lebling
Imlac PDS-1Imlac PDS-1
Maze design report
Source: FPS Documentary, 2023 · Colley, DigiBarn Computer Museum, 2004
Battlezone gameplay
1980
Battlezone
Why it matters: first first-person 3D in an arcade, and the first game engine the Army reused as a trainer. Vector lines, no grid: a different road to the same place.
Battlezone periscopeBattlezone periscope
Battlezone cabinetBattlezone cabinet
Source: FPS: The Definitive First Person Shooter Documentary, 2023
Wayout 1982
1982
Wayout
Why it matters: full 360° turning on a home computer when rivals allowed four directions, plus an automap that fills in as you walk. Both became standard.
Sirius 1983 catalog: Wayout comic pageSirius 1983 catalog: Wayout comic page
Source: FPS Documentary, 2023 · Sirius Software catalog, 1983
The Colony
1988
The Colony
Why it matters: mouse-look, real-time polygons, a whole station in 128 KB. The control scheme every shooter uses today, and proof the map can be the game.
David A. SmithDavid A. Smith
Source: FPS Documentary, 2023 · Smith, “Colony Memoirs”, 2005
id Software, Shreveport, 1991
id Software team
id Software, 1991 · “we're not wearing any pants”
Carmack, Carmack, Romero
John Carmack · Adrian Carmack · John Romero
Source: FPS: The Definitive First Person Shooter Documentary, 2023
Hovertank One (Apr 1991) · flat-shaded walls · id's first raycaster
Hovertank One coverHovertank One cover
Hovertank title screenHovertank title screen
Source: FPS Documentary, 2023 · MobyGames screenshot
Catacomb 3-D (Nov 1991) · textured walls
Ultima Underworld (Mar 1992) · its 1991 demo ↑ pushed id to add textures
Catacomb 3-D box artCatacomb 3-D box art
Ultima Underworld coverUltima Underworld cover
Source: FPS Documentary, 2023 · Sanglard, Game Engine Black Book: Wolfenstein 3D, pp. 11, 73 · MobyGames
Wolfenstein 3D gameplay
Wolfenstein 3D
May 1992
Wolfenstein 3D box art
Why it matters:
  • the breakthrough: fast, textured, grid-based raycasting on a 286/386, no 3D hardware
  • one ray per screen column, 64×64 wall textures, flat floor and ceiling colours
  • shareware, May 1992: episode one free through Apogee, so it spread everywhere
  • the formula every raycaster after it copied; id released the source in 1995
Source: FPS Documentary, 2023 · Sanglard, Black Book: Wolfenstein 3D · MobyGames
The math you need: one triangle, one circle, one plane
1 · triangle tan = opposite / adjacent = rise / run
SOH-CAH-TOA
Fish-eye, opposite over adjacent
2 · circle cos θ → x step · sin θ → y step
Terminal side of an angle
3 · plane distance to plane = 160 / tan 30°
Projection plane: 320 / 60 degrees / tan
Source: Pezzi, Raycasting Engine Programming, Pikuma · mathwords.com
JavaScript
JavaScript
JavaScript
JavaScript
Source: Leftover Salad, “Programming People” (leftoversalad.com) · Olaf Minkowicz, raycaster demo (JavaScript)
Demo 1 · The world is a grid

            
Source: Pezzi, Raycasting Engine Programming, Pikuma · Olaf Minkowicz, raycaster demo (JavaScript)
Demo 2 · The player: position + angle

            
Source: Pezzi, Raycasting Engine Programming, Pikuma · Olaf Minkowicz, raycaster demo (JavaScript)
Demo 3 · Rays, horizontal grid lines

            
Source: Pezzi, Raycasting Engine Programming, Pikuma · Olaf Minkowicz, raycaster demo (JavaScript)
Demo 4 · Rays, vertical lines, keep the nearest

            
Source: Pezzi, Raycasting Engine Programming, Pikuma · Olaf Minkowicz, raycaster demo (JavaScript)
Demo 5 · Distance → wall height (projection)

            
raw ray length: bowedraw ray length: bowed
perpendicular: straightperpendicular: straight
Source: Pezzi, Pikuma · Sanglard, Black Book: Wolfenstein 3D, p. 180 · Olaf Minkowicz, raycaster demo (JavaScript)
Texture mapping: tex_x to stripeDemo 6 · Textures: where the ray hit picks the texture column
Source: El Garouaz, “From Flat to Fantastic”, Medium
The Elder Scrolls: Arena
Mar 1994
Arena cover
What it pushed forward:
  • Bethesda's own raycaster (Todd Howard, Game Informer)
  • a continent-sized, procedurally generated world
  • outdoor skies, weather and fog from the same wall slices
  • raycasting for an open RPG, not a corridor shooter
Arena gameplay
Source: Howard, in Miller, Game Informer, 2010 · FPS Documentary, 2023 · MobyGames
ROTT gameplay
Rise of the Triad
Dec 1994 / Feb 1995
ROTT cover
What it pushed forward:
  • Wolfenstein engine, licensed and extended (Sanglard p. 256)
  • textured floors and ceilings
  • elevated platforms and jump pads: fake vertical movement in a technique with no vertical
  • Tom Hall, id co-founder, as creative director
Source: FPS Documentary, 2023 · Sanglard, Black Book: Wolfenstein 3D, p. 256 · MobyGames
What replaced it: Doom · Duke 3D · Quake
Doom gameplay
Doom box art
Doom · Dec 1993
  • dropped the grid for a BSP tree: walls at any angle, rooms at different heights
  • textured floors and ceilings, light levels
Duke Nukem 3D gameplay
Duke Nukem 3D box art
Duke Nukem 3D · Jan 1996
  • Ken Silverman's Build engine: sectors and portals, rooms over rooms
  • slopes, mirrors, destructible scenery
Quake gameplay
Quake box art
Quake · Jun 1996
  • true polygonal 3D: full look up and down, 3D enemies
  • the end of the 2.5D era; raycasting was the on-ramp
Source: FPS Documentary, 2023 · Sanglard, Game Engine Black Book: DOOM, pp. 197–200 · MobyGames
Build one yourself
History · Process · Legacy · scan one
Gustavo Pezzi
Gustavo PezziUK university lecturer, HEA Fellow, teaching-award winner. Raycasting Engine Programming course.
QR code for pikuma.compikuma.com/
Fabien Sanglard with John Carmack
Fabien SanglardStaff Software Engineer, Google. Author of Game Engine Black Book: Wolfenstein 3D and DOOM; foreword by John Carmack.
QR code for fabiensanglard.net/gebbwolf3d/fabiensanglard.net/gebbwolf3d/
Lode Vandevenne
Lode VandevenneGoogle compression engineer (Zopfli, Brotli), author of LodePNG. Raycasting tutorial online since 2004.
QR code for lodev.org/cgtutor/raycasting.htmllodev.org/cgtutor/raycasting.html
Source: Pezzi, Pikuma · Sanglard, Game Engine Black Book: Wolfenstein 3D · Vandevenne, Lode's Computer Graphics Tutorial