Lander

A Lunar Lander homage in the browser — Mars or Moon gravity, one tank of fuel, and narrow pads that pay more

šŸ“… September 2026šŸ’» TypeScript
Next.jsTypeScriptCanvasTailwind CSSGitHub Pages
nextjstypescriptgamecanvasphysicsstatic-site

An homage to the 1979 arcade classic. Gravity pulls, you rotate and burn precious fuel, and only a slow, upright touchdown on a flat pad counts — the narrower the pad, the higher the multiplier.

A flight beginning over Mars

Two worlds share one engine: Mars at 3.71 m/s² is the real test, and the Moon at 1.62 m/s² is the floatier training ground — the gravities are true to scale, so the Moon genuinely gives you more than twice the thrust authority. The terrain is generated fresh for every flight by midpoint displacement, with three pads carved in, and the classic's real tension is preserved: one tank of fuel persists across flights, and the game ends when it runs dry. Best scores are kept per world, in the browser, and nowhere else.

The structure follows a pattern I keep returning to for these small games: the entire game — physics integration, terrain, touchdown resolution, scoring — is a pure TypeScript module with no React or canvas imports, and the interface is a thin requestAnimationFrame loop that feeds inputs in and paints the state out. The purity paid for itself the same afternoon: I could prove the landing, crash, and out-of-fuel paths deterministically in Node, after two of my autopilots had crashed repeatedly trying. The tolerances are honest; flying it well takes practice.