How It’s Made: Glidepath
Glidepath is the studio’s arcade flyer: tap to thrust, thread the asteroid gates, and land on the pad. The whole game is one file of HTML, CSS, and JavaScript — 644 lines, no game engine, no assets.
It’s split into 7 sections. Each one shows the real code next to a plain explanation of what it does — read a pair side by side to see how it’s written as well as what it means.
- 01SetupThe page itself: the HTML shell, the CSS that makes it full-screen, and the canvas setup that gives the game a fixed 480×640 playfield on any screen.
- 02State, levels and landingThe game's memory: every variable, the constants that tune how it feels, the level generator, and the landing-zone scoring that pays PERFECT +500.
- 03AudioEvery sound, synthesized live with WebAudio — no audio files. The thruster roar, the score blips, and the crash.
- 04InputHow taps, clicks, and keys reach the game — including the dedupe that stops one tap counting twice, and the Space-bar fix that forwards keys from the site shell.
- 05Update and physicsThe game's brain: the governor burn, gravity, scrolling, collisions, and the landing rules. This is where Glidepath actually plays.
- 06DrawingEverything you see: the sky, the asteroid gates, the pad with its PERFECT / GREAT / GOOD strips, the rocket, and the HUD.
- 07Game loopThe main loop that runs everything sixty times a second, and the three lines that start the game.