Wayout maze
1982In the spirit of Paul Lutus's Wayout: a handful of chunky columns, four colours, two wall shades by facing and black outlines at corners, at a modest frame rate. Free rotation through a tile map on a 1 MHz CPU.
height = screen_h / distance
1982 to today
Not a ray per pixel: a ray per column. Walk it across a flat tile map until it hits a wall, and the distance tells you how tall to draw that slice. The trick that let a 1 MHz 6502 draw a maze in 1982, and later made a 286 feel like a 3D world.
The algorithm
The world is a 2D grid of wall tiles, seen from eye height. For each screen column, cast one ray from the player across the grid with a DDA (digital differential analyser): step to whichever cell border, x or y, comes first, until the cell holds a wall. The perpendicular distance to that wall gives the height of the vertical slice to draw, centred on the horizon. Where along the wall the ray landed picks the texture column; scale that column to the slice height and you have textured walls. Floors and ceilings come from casting per row instead: every row of the floor is one fixed distance away, so its texture coordinates step linearly across the screen.
Why a 286 could do it
320 rays instead of 64,000, and each ray only adds a precomputed delta per grid line. Using the distance perpendicular to the camera plane (not the true ray length) removes the fish-eye bulge for free. Walls are always vertical and the eye never tilts, so every wall slice is a pure vertical scale of one texture column: Wolfenstein 3D compiled a scaler routine per height. Shading y-facing walls darker gives instant depth.
for x in 0..319:
ray = dir + plane · (2x/320 − 1)
cell = floor(pos) ; side_dist, delta = ...
while map[cell] == 0: // DDA
if side_dist.x < side_dist.y: step x
else: step y
d = perpendicular distance
slice = 200 / d
draw texture column u = frac(hit) scaled to sliceDocumented milestones, with a source for each. Famous examples, not claims of who did it first.
Paul Lutus · Sirius Software · Atari 8-bit · Apple II
A first-person maze with free rotation, drawn column by column across a tile map on a 1 MHz 6502: generally named as the first raycasting game.
SourceXanth Software F/X · Atari ST
Flat-shaded raycast maze on an 8 MHz 68000, with up to 16 STs linked over their MIDI ports for the first deathmatches.
Sourceid Software · MS-DOS · EGA
Flat, untextured walls drawn by casting rays across a tile map: the first of two raycasting games John Carmack built for Softdisk before Wolfenstein.
Sourceid Software · MS-DOS · EGA
Added texture-mapped walls in 16 colours, the bridge between Hovertank and Wolfenstein.
Sourceid Software · MS-DOS · VGA
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.
SourceNovaLogic · Comanche · MS-DOS
The same per-column casting over a height map instead of a tile grid. See the voxel landscape page for that branch.
SourceLode Vandevenne · Tutorial
The widely used write-up of DDA wall casting, textures, floor casting and sprites that most modern raycasters are learnt from.
Source5 live versions, from the oldest platform to today: 4 on the CPU, 1 on the GPU. Retro versions run at their original resolution and palette. Demos pause when off screen.
In the spirit of Paul Lutus's Wayout: a handful of chunky columns, four colours, two wall shades by facing and black outlines at corners, at a modest frame rate. Free rotation through a tile map on a 1 MHz CPU.
Like Hovertank 3D: one ray per column, one flat colour per wall material, darker on the y-sides. Grey ceiling, green floor.
As in Wolfenstein 3D: brick, wood and stone textures, each wall slice one scaled texture column. Floors and ceilings stay flat colour.
Textured floors and ceilings cast per row, plus distance shading: the step the later raycasters took before Doom moved on to sectors.
Every pixel runs its own column's DDA in a fragment shader: the old algorithm, unchanged, a thousand times over.