Canyon of Glass is a browser game where you fly a jet down the street canyons of a procedural city and thread gates between glass towers. It runs at 60 fps on a mid-range phone. Here is how it is put together.

One city, thousands of towers
The city is generated from a fixed seed, so it is identical for every player. Every block's towers are boxes in a few InstancedMesh draws, and the look comes from shaders rather than geometry: windows, glass reflections, fog, rain and night lighting are all computed per pixel from shared uniforms. Traffic is a set of points moved entirely on the GPU.

The same route for everyone
Every bit of gameplay randomness comes from seeded streams: one for the route and its events, one for loot, one for upgrades, one for missions. Each gate's extras get their own sub-seed, so an upgrade that adds loot caches never shifts the gates after it. The Daily Run takes its seed from the date, so route number N is the same on every device, and players can compare runs and share a Wordle-style grid of their gates.

Recording every flight
The game records the plane 10 times a second, storing positions as second differences in decimetres and angles in milliradians, packed as variable-length integers. That is about 10 bytes per sample, around 20 KB gzipped for a five-minute run. The same recording powers three features: rewinding after a crash, racing a friend's ghost on the same route, and replaying your best moment as a shareable video.

Making phones happy
The first real-phone test held 60 fps on average but stuttered, and the slowest 1% of frames ran at 20 fps. Three changes fixed it: adaptive resolution judged against the 60 fps target instead of a fixed threshold (which had stopped it from ever recovering), compiling every shader before the first frame, and removing the live blur behind the HUD on touch screens. The slowest 1% of frames went to 60 fps.

A game that films its own trailer
A film mode lets an outside script step time one frame at a time. Every morning a GitHub Action loads the game in a headless browser with no GPU, an autopilot flies the day's route, and the camera waits beyond a gate for a head-on shot. ffmpeg turns the frames into a vertical video for the day's posts.

Play it: https://ppolydoras.github.io/canyon-of-glass/?ref=devto
Code: https://github.com/ppolydoras/canyon-of-glass