Raycasting

Version 4 of 5

Floor & ceiling casting.

PC · VGA · 1993

This version

Textured floors and ceilings cast per row, plus distance shading: the step the later raycasters took before Doom moved on to sectors.

How this version works

This 320-column CPU version fills the floor and ceiling before drawing textured wall slices over them. For each row below the horizon, it calculates a plane distance and steps world coordinates linearly across the buffer. Those coordinates sample repeating 64×64 stone tiles for the floor and wood for the mirrored ceiling row, shaded by inverse distance with separate brightness factors. Walls retain the brick, wood and stone textures and darker y-facing sides, but now also fade with distance.

The trick in this version

With a level camera, every point on a horizontal floor row has the same forward distance, allowing constant texture-coordinate increments across that row. The ceiling reuses the floor coordinates, reducing duplicated calculations without requiring a depth buffer.

Historical context · PC

  1. 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.

  2. 1992 · NovaLogic · Comanche

    Voxel Space

    The same per-column casting over a height map instead of a tile grid. See the voxel landscape page for that branch.

  3. 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.

Platform
PC · VGA
Era
PC
Rendered on
CPU
Tags
floor casting · fog
Sources
Wolfenstein 3D (1992)Voxel Space (1992)Hovertank 3D (1991)