ORBIUM
Contents
Developers

Run Orbium locally

The game server, the client and bot players on your own machine, and the checks every change goes through.

View as Markdown

What you need

  • Deno 2: it runs everything, from the build to the tests.
  • Celld, for the game server (celld dev).
  • A browser with WebGPU: a recent Chrome or Edge.

Start it

You need the code first: the open-source edition, coming to GitHub with the next releases. In its folder:

deno install
deno task dev

deno task dev starts the game server (Celld, on port 9876) and the client (Vite, on port 5190) with hot reload. Open http://127.0.0.1:5190, press Play, sign in and open a Hold. The demo is at /demo. Signing in takes an OAuth client of your own at Google or Patreon (its callback: http://127.0.0.1:5190/api/auth/<provider>/callback; its id in server/wrangler.json, its secret in server/.dev.vars), or a test account (below).

Play with bots

A match needs a crew. Bots join a Hold as real players, over the same protocol:

deno task bots <CODE> 8             # 8 bots ask to dock (the host: "Let all in")
deno task bots <CODE> 8 --skill=0.8 # better aim (0 to 1)

To play several units yourself, use a browser profile each.

Test accounts

The dev server has one more route, which is never deployed: POST /api/dev/account (server/src/dev.js) makes a test account with a membership. The bots and the tests use it. To be one in a browser, without a Google or Patreon client:

curl -s -X POST http://127.0.0.1:9876/api/dev/account \
  -d '{"n": "2", "name": "Ana", "tier": "host"}'
# -> { "id": ..., "session": ... }; tier: none (null), backer, host, founding,
#    sponsor or gold; "until": its end (unix seconds), to see one that ends

then, in the browser's console on http://127.0.0.1:5190: localStorage.setItem("orbium.session", "<session>") and reload.

The checks

deno task format   # formatting (deno fmt --check)
deno task lint     # deno lint and deno check
deno task test     # the unit tests: rules, Holds, movement, the island, the engine headless

Hold and server changes also run the end-to-end test, a full Hold of simulated players against a running server:

deno task dev:server &
deno run -A test/e2e-hold.mjs

Measuring the GPU

Add ?profile to a Hold's link. A readout under the fps counter shows the frame's GPU time and its costliest passes, grouped by system. PERFORMANCE.md explains how to measure well, and what each preset costs.

Where things are

The architecture page maps the folders. For contributors, ARCHITECTURE.md and AGENTS.md in the repository hold the details and the conventions.