Local development

Plot's temporary development-game workbench at https://plot.game/dev can load your own game URL into the same sandbox and party runtime used by published games. You can keep using the development server provided by your framework, including live reload.

Keep two modes easy to exercise:

Install the SDK

Keep the SDK as a normal versioned dependency:

npm install @plot.game/sdk

Your game framework can then build and serve the app normally. Pin a complete version before publishing so an SDK update cannot change an already-tested game.

Start a development game

  1. Start your game server and open the game directly once to confirm that its assets load.
  2. Open plot.game/dev. Enter the launch URL and any catalog-preview details or browser permissions you need. Plot saves this form in local storage on that browser.
  3. Create or join a party and invite the other test players.
  4. Start the development game. Plot uses the exact launch URL and permission selection for every current player, reconnecting player, and late joiner.

Plot pins that address for the active party game. Editing the saved form does not navigate a running session. To test a different address or permission set, leave the game from Plot, update the form, and start a new development game.

The workbench is a temporary development tool. It does not publish a game or create a durable catalog record.

Choose an address every player can reach

For testing on the same computer, a loopback address can use plain HTTP, for example http://localhost:5173. localhost always means the device opening the page, however. A phone or another computer given that URL will try to load port 5173 on itself, not on your development machine.

For other devices, use one of these instead:

  • a reachable LAN address served over HTTPS with a certificate each test device trusts; or
  • an HTTPS development tunnel; or
  • any HTTPS site outside the trusted plot.game origin.

Plain HTTP LAN addresses are not accepted. Every player must be able to reach the exact URL, including its port, path, query, and fragment. Do not put API keys, bearer tokens, or other secrets in it: the launch address is shared with the party and is not an authorization credential.

Connect to the Plot parent

A loopback development build trusts the production https://plot.game parent automatically, so use the same readiness call as a published game:

import Plot from '@plot.game/sdk'

await Plot.ready()

If Plot provides a different preview or test origin, pass that exact origin with the parentOrigin option. The explicit value replaces the defaults; it does not add another broadly trusted site. Keep one readiness call in the normal startup path—importing the SDK or using another API does not start the connection.

Allow Plot to frame the game

Your game must remain frameable by its matching Plot parent. The canonical parent is https://plot.game; a supplied preview may use a different exact origin. Do not send X-Frame-Options: DENY or X-Frame-Options: SAMEORIGIN. If your response has a Content Security Policy with frame-ancestors, include that parent origin. Your own CSP must also permit the scripts, assets, network connections, and development websocket used by your build.

Plot still treats the page as untrusted, cross-origin game content. The normal iframe sandbox, Permissions Policy, SDK connection checks, readiness rules, and runtime authorization all remain in force. The game never receives Plot cookies, account credentials, party transport credentials, or an unrestricted Plot backend API.

Test lifecycle behavior

During standalone UI work, provide sample player and game data inside your own development setup rather than calling undocumented Plot interfaces. Keep those fixtures out of production behavior, and test the real SDK path again in Plot development mode before publishing. For timer UI, a standalone fixture can use performance.now() or an injected now() function; verify the real shared deadline behavior with several game copies in Plot development mode.

In development mode, also delay one copy's Plot.ready() call while watching another. The other copy should show that player as Joining, then receive their change to Connected when that copy can participate. Refresh a connected copy to verify that it keeps the same player ID and Player Data, and test a true leave/rejoin separately to verify that only that player's data resets.

Save a player's choice in Player Data, refresh that player, then refresh the host and verify that the game resumes from synchronized state. Leave/rejoin starts fresh Player Data. Also test host absence, a shared deadline spanning background/foreground, and unavailable latest messages while the rest of the game remains connected. Desktop mobile emulation helps with layout; exercise suspension and recovery on physical phones as well.

Also test recovery with missed reliable events: render the current state first, then process historical events without applying state effects twice. Test a disconnection just inside five minutes and one beyond retention, where Plot.connection.recovery reports a replay gap. Treat a checkpoint-restored state as an older authoritative state, and verify that game-owned receipts and phases reconcile from it. The recovery guide distinguishes browser interruption, planned service updates, and unexpected crashes.