Le Coursier relativiste
Deliver parcels in a town where light only travels at 30 m/s
A first-person delivery game in a town where the speed of light can be set from 10 to 100 m/s. On an electric scooter you quickly reach a sizeable fraction of c: the scenery crowds towards the front, turns blue ahead and red behind, some colours slip into infrared or ultraviolet, and two clocks drift apart — your watch (your battery) and the town's (your customers' deadlines). Nothing is faked: aberration and light delay per vertex, spectral Doppler per pixel, headlight effect. Three delivery rounds teach the Doppler effect and the twin paradox through play; a Theory page explains it at three levels.
What shines
- Exact relativistic rendering in the browser: aberration and light delay per vertex, per-pixel Doppler from a real spectral model (5,800 K sun, reflectances with infrared and ultraviolet), D⁴ headlight effect and a hold-to-compare classic view
- Exact, tested physics: proper velocity and hyperbolic segments, accurate to a millionth at any frame rate; the speed of light is a player setting and the game adapts
- Two clocks at the heart of the game: your watch is your battery, the town clock sets the deadlines; waiting costs more than driving fast, so the twin paradox becomes a strategy
- Built for phones: tilt steering with the iOS permission flow and a touch fallback, multi-touch, 60 fps on iPhone, add-to-home-screen install
- Inspired by OpenRelativity (MIT Game Lab, "A Slower Speed of Light"), rewritten in GLSL and fixed; a Theory page at beginner, intermediate and expert levels
How to use it
On a phone, in landscape: hold the right half to accelerate, tilt the phone (or swipe on the left) to steer, Brake to slow down, 👁 to see the town without relativity. On a keyboard: arrows, Space to brake, C for the classic view. The speed of light is set in Settings.
Made with
- JavaScript sans framework
- Three.js (WebGL2, shaders GLSL maison)
- Vite
- Vitest (775 tests)
- DeviceOrientation (inclinaison, permission iOS)
- Pointer Events multi-touch
- Wake Lock, plein écran, manifeste PWA
- MathML (page Théorie)
- Playwright (vérifications et captures)
- GitHub Actions + GitHub Pages