Afterburn is a browser-based multiplayer arcade fighter jet dogfighting game. It runs as a Vite/React/Three.js client with a Node/Express/Socket.IO authoritative game server.
The live deployment target is:
- Private browser rooms with shareable room codes.
- 3D arcade jet flight with mouse aim and keyboard controls.
- Server-authoritative PvP simulation with local flight prediction and remote snapshot interpolation.
- Guns, missiles, flares, lock-on behavior, damage, respawns, scoring, and terrain collisions.
- Automatic reconnect/rejoin support for in-progress rooms.
- Static frontend deployment through nginx plus a separate realtime Socket.IO server.
- Debug performance/network/prediction overlay and network capture tools via
F3.
- Mouse movement: aim instructor / steer toward the aim point
- Left click or
Space: guns - Right click: free look
W/S: pitchA/D: roll- Arrow keys or
IJKL: alternate pitch/yaw controls Shift: afterburnerE: missileF: flareTab: scoreboardF3: debug overlayR/O/CwhileF3is open: record, export, or clear a network capture
Install dependencies:
npm ciRun the dev server:
npm run devOpen:
http://localhost:3000
The server uses Vite middleware in development, so the client hot reloads while the Node server handles Socket.IO.
The server owns room state and simulates the authoritative game loop. Clients send input frames, predict only their local aircraft for responsiveness, and reconcile against server acknowledgements. Remote aircraft and projectiles are rendered through a snapshot interpolation buffer using server send timestamps, clock sync, and adaptive jitter delay.
Gun hits are validated server-side against a short room history using the shooter's measured latency and interpolation delay, so high-latency players can fire at what they actually saw while combat remains authoritative. The server also queues and consumes ordered input frames instead of relying on a single latest input value.
Combat, scoring, respawns, terrain collisions, and room lifecycle decisions remain server-authoritative.
npm run typecheck
npm test
npm run build
npm run network:qa
npm run network:browser-qanetwork:browser-qa launches automated Chrome clients, creates a multiplayer room, applies Socket.IO WebSocket latency profiles, and writes a report to artifacts/network-browser-qa/latest.json. Set AFTERBURN_BROWSER_EXECUTABLE=/path/to/chrome if Chrome is not installed in a standard location.
Afterburn builds two container images:
ghcr.io/osuakatsuki/afterburn-web:latestghcr.io/osuakatsuki/afterburn-server:latest
The web container serves the static Vite build with nginx. The server container runs the authoritative game loop and Socket.IO endpoint.
In production, host nginx routes:
/toafterburn-web/socket.io/toafterburn-server
No Vault secrets are required for the current deployment.
This is an active prototype. See GAPS.md for the current gap analysis and future improvement areas.