33/66MHz 486DX2 just released $799 ($1400 in today's)
No video acceleration
No floating point (until 486)
Raycasting
By Kieff - Own work, Public Domain https://commons.wikimedia.org/w/index.php?curid=20389654
Wolf3D's raycaster
Flat plane
Square grid only
Untextured floor and ceiling
Map
Map
Intersections
Math #1
Geometry
sin(θ) = opp / hyp
cos(θ) = adj / hyp
tan(θ) = opp / adj
Geometry
Math #2
For each ray: setup
θ is ray direction
x, y are player tile pos
dx, dy are offset within tile
Depending on θ:
tileStepX, tileStepY = ±1
xStep, yStep = tan(θ), 1/tan(θ) [δx, δy]
xIntercept = x + dx + -dy / tan(θ) yIntercept = y + dy + dx/tan(θ)
For each ray: trace
for (;;) {
while (yIntercept < y) { // < or > depending on yStep
if (map[x][yIntercept>>16]) goto hitVert;
x += tileStepX;
yIntercept += yStep;
}
while (xIntercept < x) { // < or > depending on xStep
if (map[xIntercept>>16][y]) goto hitHoriz;
y += tileStepY;
xIntercept += xStep;
}
}