Joinable
v0.2.4Make any game joinable: pick the pattern, get the snippet, run a two-player self-test.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
joinable_kit Read the Joinable agent kit
Make a web game multiplayer with Joinable: returns the agent kit (how to pick a pattern for the game's genre, what to change, the API that exists today, how to test). Read it before changing a game. Joinable provides hosted rooms, invites, quick match, waiting room, countdown, results and rematch: never write server or WebSocket code.
joinable_choose_pattern Choose a multiplayer pattern
Picks how to make this web game multiplayer with Joinable, from its genre: full rounds ("race" or "score"), lockstep (RTS and strategy), Pattern A (shared world), B (avatars), C (turns), or not supported yet (fighting, shooters).
| Parameter | Type | Description |
|---|---|---|
genre * | string | e.g. racing, arcade, puzzle, board, card, clicker, builder, platformer, top-down, party, turn-based, rts, fighting, shooter |
has_score_or_time | boolean | Each round ends with a score or a time |
held_key_avatars | boolean | Players move a character with held keys or a joystick |
turn_based | boolean |
joinable_snippet Get the Joinable snippet
Returns the exact script tag and setup code for a Joinable pattern, with the relay and the project key filled in.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | |
key | string | The project's public key, pk_…, for a real site. Leave it out while the game runs on localhost: no key is needed there. |
state | string | Name of the game's state object, for patterns A, B and C (default "game") |
joinable_selftest Run the Joinable self-test
Opens two headless players on the game's local page and checks the full-rounds contract (same seed on both, players see each other, one result, rematch). Every failure says what to fix. Run until it passes. Needs playwright-core's Chromium.
| Parameter | Type | Description |
|---|---|---|
url * | string | The game page, served locally, e.g. http://localhost:5173/ |
channel | string | Use the installed Chrome (with the GPU), for heavy 3D games |
round | integer | Seconds to wait for a round to finish (default 60) |
joinable_desyncs Get lockstep desync reports
When a lockstep game's players went out of sync, Joinable keeps a report: the first tick where the devices' simulations differed, each device's fingerprint, the browsers and builds, and the orders around that tick. Fetch the latest reports for a game by its public key (or, for keyless local play, its page origin), then fix what isn't deterministic in the simulation.
| Parameter | Type | Description |
|---|---|---|
key | string | The game's public key, pk_… |
origin | string | For keyless play on a local site: the page origin, e.g. http://localhost:5173 |