Raycasting

Version 2 of 5

Flat walls.

PC · EGA 16 colours · 1991

This version

Like Hovertank 3D: one ray per column, one flat colour per wall material, darker on the y-sides. Grey ceiling, green floor.

How this version works

This version casts one ray for each of 320 columns through the shared tile map. Three wall materials use red, cyan and brown colour pairs, with darker colours on y-facing sides. Projected wall heights are capped at four times the screen height and clipped to the visible buffer. The ceiling is solid grey and the floor solid green, with no outlines, textures or distance shading.

The trick in this version

Flat vertical spans require only one colour selection per wall column, avoiding texture sampling. The code uses an EGA-style restricted set of colours, but writes RGB pixels rather than emulating EGA video memory or enforcing its exact palette.

Historical context · PC

  1. 1991 · id Software

    Hovertank 3D

    Flat, untextured walls drawn by casting rays across a tile map: the first of two raycasting games John Carmack built for Softdisk before Wolfenstein.

  2. 1991 · id Software

    Catacomb 3-D

    Added texture-mapped walls in 16 colours, the bridge between Hovertank and Wolfenstein.

  3. 1992 · id Software

    Wolfenstein 3D

    256-colour textured walls at speed on a 286: not the first raycaster, but the VGA breakthrough that took it mainstream and started the first-person shooter.

Platform
PC · EGA 16 colours
Era
PC
Rendered on
CPU
Tags
DDA · EGA
Sources
Hovertank 3D (1991)Catacomb 3-D (1991)Wolfenstein 3D (1992)