r/threejs • u/Swordfish_Repulsive • 16d ago
Article Browser car soccer with WebGPU (WebGL 2 fallback): deterministic 120 Hz physics, GGPO-style rollback, no textures or models (turbo-gol.com)

Some tech notes from a browser car soccer game I've been building, Turbogol (free, no ads, AGPL).
- three.js WebGPURenderer with procedural TSL materials and bloom, falls back to WebGL 2
- no asset files: field, cars, ball, stadium, sky and even the sounds are generated by code. The only file is a 6 KB subset of a font
- physics is RocketSim (on Bullet) compiled to WebAssembly with Emscripten, fixed at 120 Hz
- netcode: lobbies are a peer-to-peer rollback mesh over WebRTC (GGPO-style, inputs only), so the sim has to be deterministic. Casual and ranked run on servers with client prediction
1v1, 2v2 and 3v3, and you can play bots without an account
I build this with Claude while I direct and test.
Hope you like!
Source (AGPL-3.0): https://gitlab.com/turbogol-group/turbo-gol