Multiplayer Football Demo
A full multiplayer football match live in the browser, built with Three.js and Node.js. No install, twelve players for the render cost of one, netcode at about 150 bytes per snapshot, and AI opponents with no scripted behaviour.
A full multiplayer football match built with Three.js and Node.js, playable instantly through a link, no install, no app store. We built it as a stress test for real-time 3D in the browser: a duel for the ball tolerates none of the latency a virtual showroom can absorb. Open the demo with ?humans=0 to watch the AI play from the sideline.
Twelve players on the pitch means twelve draw calls. Each avatar is baked at runtime from body, face, hair, beard, jersey and shoes into a single SkinnedMesh sharing one 1024 texture atlas. A water-filling algorithm measures the real surface area of every part and weights it by visibility, so the face gets more texel budget than the shoes without anyone hand-tuning a UV layout. The result is over 100,000 visually distinct characters at the same render cost. Every player is built with our Avatar Creator.
A full world snapshot is around 150 bytes: positions as int16 centimeters, facing as uint16, animation time in centiseconds, packed into a quantized binary buffer instead of JSON. At 30 snapshots per second that stays playable even on a weak mobile connection. The Node.js relay server forwards the bytes untouched; the authoritative simulation runs in the host's browser, not on the server.
None of the AI is scripted. Every possible action, pressing, marking, dribbling, passing, shooting, making a run, switching flanks, scores itself against ten attributes, the current tactical situation and the player's personality, and the highest score wins. Six archetypes, from Aggressor to Playmaker, weight that scoring differently, and a discipline layer with hysteresis keeps defenders from chasing the ball out of position.