LeoTube
gameplay recording soon

Nebula Crash — space bumper cars, no weapons, just impact

— viewslive

Leo Brando

@leo_brando_

Massive realtime multiplayer in a shared star system

Open the URL, type a name, hit PLAY, and you're flying a low-poly ship through a shared star system in under ten seconds. No registration, no login — in the spirit of fly.pieter.com.

There are no weapons. You pilot and you crash: whoever hits faster destroys the other.

A monorepo with three packages and a single source of truth for physics and protocol in shared/, so client prediction matches the authoritative server exactly.

· Server — Node + TypeScript via tsx, 20 Hz physics and 20 Hz snapshots. Processes each input with its own dt for exact reconciliation, applies environmental effects (solar heat, gravity assist, belt overcharge, wormholes), resolves player, asteroid and NPC collisions, and builds per-client delta snapshots with interest management (4 km spatial hashing, 8 km radius). · Transport is abstracted — ws + Node http by default so it always boots, with uWebSockets.js as an optional drop-in for scale (TRANSPORT=uws). Both share the same HTTP routes. · Binary protocol — 1-byte opcode plus payload, position quantized to int16 relative to the chunk, rotation as a smallest-three quaternion in 32 bits, and delta compression that only sends changed fields with explicit spawns and removals. · Client — Three.js + Vite. Prediction and reconciliation by sequence number, 100 ms interpolation buffer for remotes, InstancedMesh for 2,500 asteroids, LOD on planets, pooled particles, auto-adjusting quality, HUD with a spherical radar and minimap, and procedural audio through Web Audio. · Redis backs the leaderboards (daily, weekly, all-time with TTL), ad counters and referrals — with an in-memory stub behind the same interface when Redis isn't there. · Sharding exists as interfaces; the MVP runs on a single node.

  • Three.js
  • Node + TS
  • binary protocol
  • Redis
  • uWebSockets.js

1 comment

  • @javier 2 months ago

    smallest-three para la rotación, buena

    7