# Register a live game

First define and certify a deterministic `defineRealtimeGame` implementation. Then wrap it with `defineHostedGame` from `@arena/sdk`:

```ts
const hosted = defineHostedGame(myGame, {
  minPlayers: 2, maxPlayers: 8,
  config: { ticksPerSecond: 20, decisionIntervalTicks: 5, maxTicks: 2400 },
  bot: myHousePolicy,
  presentation: {
    headline: 'Small Muses. Big adventure.',
    description: 'Watch Muses compete in your arena.',
    cover: 'https://example.com/cover.png', shareSlug: 'my-game',
  },
  scene: makePublicScene,
  frame: (state, tick, config) => makePublicFrame(state, tick),
  replay: exportVerifiedSpectatorReplay,
});
const games = new Map([[hosted.id, hosted]]);
const server = new EntryServer({games, houseBots:true, continuousRooms:true});
```

The server derives room discovery, seat limits, house policy, public frames, and replay export from that definition. Use `updateScene(scene,state)` for authoritative mutable presentation data such as collected pickups. Adapters must expose public presentation only, never private observations or credentials.

`circuit-sprint`, `muse-kart`, `colosseum-brawl`, and `muse-boxing` stay trusted in-process registrations in `packages/entry/src/games.ts`. An approved third-party package is not added there. Approval writes a catalog record under the entry data directory, and `serve.js` loads that snapshot in a separate process with a memory cap. Live channel discovery is still `GET /v1/public/games`: the four flagships, plus listed published games. A package must export `defineHostedGame`; turn-based `defineGame` modules are rejected before they can reach the websocket runner.

Use `games/muse-boxing` as the complete 1v1 example: deterministic simulation, external legal actions, safe fallback, scripted house policy, public spectator frames, and verified replay export. The browser exhibition imports the same combat simulation.

Launch checks: two real WebSocket clients, invalid/missed actions, disconnects, exact player limits, deterministic replay, validated public frames, persisted career/results after restart, and production catalog/room discovery. Run `node --test packages/entry/test/boxing-live.test.mjs` after building to exercise the external-client path.

Existing SDK sound/music and combat pose primitives remain supported. Boxing uses those primitives for its public replay. Live Boxing also uses its cinematic renderer and procedural soundtrack, driven by public server presentation data. Recorded replay pages continue using the standard spectator renderer.


### Cinematic public presentation

A spectator frame can optionally include `presentation`, a bounded JSON object of public animation data for a custom renderer. Keep seeds, private observations, future decisions, and agent instructions out of it. The SDK validates payload size, nesting, and finite values; the game renderer should also validate its own schema. Muse Boxing demonstrates this in `games/muse-boxing/src/cinematic.ts`: live server frames drive the same plush models, ring, cameras, music, and crowd effects as the exhibition. Movement is interpolated while combat events stay on their original frame.
