3body, a Multiplayer Arena Game Built on Chaos

3body is a 2D browser-based multiplayer arena game where up to 15 players control planets caught in the gravity of three suns locked in a chaotic three-body orbit. The suns fling everything around unpredictably; read the gravitational field, fire curving rockets, and be the last planet alive.

3body started as a simple question: what if the gravitational field was the game? Instead of static walls and predictable arenas, you get three suns tracing a chaotic three-body orbit, their combined pull stretching, bending, and slingshotting every planet on the map.

# The Concept

Each player controls a planet. Your only real trajectory control is a Boost ability. Everything else is about reading the system: where the suns are heading, how your orbit will bend, and where your opponents will drift.

The design pillars are:

  • Chaos as gameplay: the gravitational field is the primary antagonist; combat rides on top of it.
  • Read the system: mastery means reading the field, not just aiming.
  • Short, replayable rounds: 3-7 minute matches that always feel different.
  • Easy to drop in: browser-based, no install, AI fills empty seats so a match is always playable.

# Combat

Rockets inherit your planet's velocity at launch and are also affected by the suns' gravity, so they curve. Leading a shot through a chaotic field is the central skill of the game. There are three rocket types: a fast Light shot, a slow one-shot Heavy, and a turning Seeker, plus a directional shield. Caches drift through the arena holding ammo, repairs, shield extensions, and the occasional gravity-pulse wildcard, while stray asteroids add another hazard to dodge.

If a match stalls past a minute, a black hole spawns at the center and collapses the arena inward. The winner is still simply the last planet standing.

# The Tech

3body is TypeScript end-to-end:

  • Frontend: Vite + React + Three.js, rendering through three/webgpu with TSL node materials.
  • Backend: an authoritative Bun WebSocket server running the simulation at a fixed 60 Hz.
  • Shared: the N-body physics, entity types, and balance constants live in one shared module imported by both sides, so there's a single place to change a number and no parity tests.

The simulation uses a Velocity Verlet integrator (symplectic, so orbits stay stable over long timescales) with a softening term so close passes don't blow up numerically. The server is authoritative: clients send intent, and render interpolated snapshots.

# Try It

You can play it at 3bodyspace.com. There's an offline mode against AI bots if you just want to poke at the physics, plus an online mode that drops you into a live match with other players, where bots fill any empty seats.

dark/light theme