Mipmap Arcade

LodZero

An arcade racer whose road is a texture. Switch between point, bilinear and trilinear sampling while you drive, and slide the split to see which mip level every pixel is reading.

Pace car driving

55%

Steer with A and D or the arrow keys. W accelerates, S brakes. Hold Space to drift, release to boost. Keys 1, 2 and 3 pick the sampling mode. P toggles the pace car, M mutes, R restarts. Press any driving key to take over from the pace car.

Sampling

Trilinear blends two pyramid levels by the fraction of lambda.

Drive

Track seed 2026

Telemetry

Slip angle
0.0 deg
Lambda at probe
0.00
Level read
0
Gates
0 of 8
Energy cells
0
Pylon hits
0
0 0

Mip pyramid

Reading level 0.

Frame time

  • Within the 16.7 ms budget
  • Over budget

Warming up.

Spatial hash

  • Occupied cell
  • Cells the car queries

Waiting for the first step.

How it works

One file of engine, no engine

Everything under the hood lives in engine.js: the physics, the collision, the track, the texture filters and the rasterizer. There is no game engine, no graphics library and no dependency. The page only paints the finished pixel buffer to a 2D canvas.

The road is a texture

Each pixel below the horizon is cast onto the ground plane. The texture footprint of that pixel comes from an exact Jacobian, not an estimate, and lambda is the base two logarithm of the larger of its two edge lengths measured in texels.

Three ways to read it

Point and bilinear sampling stay on the full size level, so distant stripes crawl and shimmer. Trilinear sampling blends the two pyramid levels around lambda, which is why the horizon stays calm.

Same run, every time

The simulation advances in fixed steps of one hundred and twentieth of a second. Inputs are quantized and run length encoded, so a ghost is just a short byte string that replays to the exact same position.

Honest notes

This project was written with AI assistance. Hack Club Mipmap counts AI-written code at a discount and does not allow retyping an entire model-written project, so this repository is a disclosed reference build and is not a Mipmap entry. The tests are automated checks that run in Node, and the visual result was checked in a real browser. No human playtesting has been done. The full details are in NOTES.md.