Vector-line lunar descent on a green phosphor tube, with a suicide-burn autopilot.
A vector arcade descent over procedural terrain: wrapping fractal noise plus dozens of craters, each a parabolic bowl with a raised Gaussian rim, and flat pads pressed in where narrow pads pay more. The lander has real lunar gravity, a throttleable engine whose acceleration climbs as propellant burns off, and attitude jets, stepped with semi-implicit Euler at a fixed 1/240 second. Every scene line goes into a phosphor buffer that is only partly erased each frame (with a color-burn black-point shift so 8-bit rounding never strands ghost trails) and is bloomed by adding back two downsampled copies under scan lines, while the readouts sit on a fresh layer so they stay crisp. The autopilot picks a pad, flies toward it with a braking-limited speed profile by tilting the thrust vector, then stands upright and free-falls until the stopping distance v squared over 2(a minus g) equals its height, lighting the engine at the last moment, while the landing radar plots the unpowered ballistic arc to where it would hit.
Try it. Press an arrow key to take over: left and right rotate, up (or space) throttles up, down throttles down. On a touch screen, hold to fire the engine and the lander leans toward your finger. Land slowly, upright, on a pad. A toggles the autopilot, R starts a new landing site.
Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.
Build a lunar lander arcade game with glowing green vector graphics, using JavaScript and the HTML canvas element. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.
Start simple:
- Make a full-window canvas that stays sharp on high-DPI screens, with a black background and everything drawn as thin green lines.
- Generate terrain as a height array: a few octaves of 1D noise you write yourself, plus craters (a parabolic bowl with a raised rim around it) and two or three flattened landing pads.
- Model the lander in meters: lunar gravity 1.62 m/s^2, a main engine whose acceleration is thrust divided by the current mass, fuel that burns while thrusting, and rotation from small jets. Step the physics at a fixed small timestep with semi-implicit Euler (update velocity, then position).
- Left and right rotate, up thrusts. Detect touchdown with the two footpads: land if vertical speed is under about 2 m/s, sideways speed is small and the lander is nearly upright, otherwise crash.
- Show altitude, horizontal and vertical speed, and fuel.
Once that works, make it beautiful:
- Fake a phosphor tube: draw into an offscreen canvas that you only partly clear each frame, so moving lines leave a short glow, then add a blurred, downscaled copy on top for bloom, plus faint scan lines and a vignette.
- Zoom the camera in as the ground gets close, and kick up dust when the exhaust reaches the surface.
- Draw a flickering engine flame and make pads show score multipliers.
Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as an autopilot that flies a suicide burn (free fall until the stopping distance equals the altitude), a landing radar showing the unpowered ballistic arc, or a crash that breaks the lander into flying line segments.