Guide

Make a multiplayer game with GitHub Copilot

Updated 2026-11-23

Short answer: open your web game's folder in VS Code, switch Copilot Chat to agent mode, and paste Joinable's prompt. Copilot reads getjoinable.com/AGENTS.md, picks the pattern for your genre, adds an async script tag and a few hooks, and runs npx getjoinable test to play a round in two real browsers. No server code, no account and no key while the game runs on localhost. For Joinable's tools, add the MCP server in .vscode/mcp.json.

1. Paste the prompt in agent mode

Agent mode is the Copilot Chat mode that edits files and runs terminal commands; ask mode only answers. Open the Chat view, pick Agent, and paste:

Make this web game multiplayer using Joinable. Read
https://getjoinable.com/AGENTS.md first and follow it exactly: it says how
to pick the right pattern for this game's genre, what to change, and how to test
with two browser tabs. Start with the smallest change that works (usually one
script tag), test it with two tabs, and only go further if the doc's checks fail
for this game. Don't write any server code: Joinable's hosted relay does all of
that. No key is needed on localhost. If the doc's self-test applies (full rounds),
run it with `npx getjoinable test <the game's local URL>` until it passes. When
you're done, tell me which pattern you used, what you changed, and anything that
doesn't sync.

Copilot has to read the kit from the web. If it answers without reading it, add #fetch before the URL in the prompt so it uses VS Code's fetch tool, or add the MCP server below. Approve the terminal commands it asks to run: the self-test needs one, and the game has to be served locally (npm run dev, npx serve, or whatever the project uses).

2. Optional: add Joinable's MCP server

In .vscode/mcp.json in the project:

{
  "servers": {
    "joinable": { "type": "stdio", "command": "npx", "args": ["-y", "getjoinable", "mcp"] }
  }
}

That's the local server, with the self-test. For the remote server (nothing to install, every tool except the self-test):

{
  "servers": {
    "joinable": { "type": "http", "url": "https://getjoinable.com/mcp" }
  }
}

VS Code shows a Start control above the server in mcp.json; once it runs, the tools appear in agent mode's tool list: joinable_kit, joinable_choose_pattern, joinable_snippet, joinable_get_started, joinable_desyncs, and locally joinable_selftest. The package is getjoinable, one word: never npx joinable, which is someone else's.

3. What Copilot changes

The prompt asks Copilot to tell you the pattern it chose. The diff should look like one of these:

Nothing on a server. If Copilot adds Express, Socket.IO or a lobby page, it skipped the kit: undo it and point it back at https://getjoinable.com/AGENTS.md. The game must still play solo when Joinable doesn't load, so the tag stays async and calls stay guarded.

4. Test it

For full rounds, in VS Code's terminal:

npx getjoinable test http://localhost:5173/

The test opens two headless browsers, joins them by invite link and checks one seed, both players seeing each other, one result and a rematch. --players 4 tests a bigger room (up to 8 on localhost); --channel chrome helps heavy 3D games. If Playwright's Chromium is missing: npx playwright-core install chromium.

Then play it yourself in two browser windows side by side: Play online, invite, open the link in the second window, Ready in both. For shared worlds, that two-window check is the test. Last, a phone and a laptop on different networks.

5. Go live

  1. Get a free key at getjoinable.com/app and add your game.
  2. Add the game's real address to its sites. If it's on GitHub Pages, that's https://yourname.github.io.
  3. Ask Copilot to add data-key="pk_…" to the tag. Public keys aren't secrets.

On free Sandbox, a live site gets 100 player-hours a month in rooms of 4. Starter is $9.99 a month for 3,000 player-hours and rooms of 8. Pricing.

Troubleshooting

Where it stops working

Joinable is for web games: native desktop, console and mobile app builds aren't supported. Fighting games and competitive shooters need rollback or a trusted server, which don't exist yet. Players report their own scores, so it suits friends and casual leaderboards, not prize play. See the general guide.

FAQ

Can GitHub Copilot make my game multiplayer?

Yes, in agent mode in VS Code, for games that run in a browser. Paste Joinable's prompt: Copilot reads the kit, wires an async script tag and the hooks for your genre, and runs a two-browser self-test. No server code.

What goes in .vscode/mcp.json for Joinable?

A server named joinable with "type": "stdio", "command": "npx" and "args": ["-y", "getjoinable", "mcp"] for the local server, or "type": "http" with "url": "https://getjoinable.com/mcp" for the remote one.

Do I need a key to test?

No. On localhost Joinable needs no key and no account, in rooms of up to 8. Get a free key when the game goes on a real site, such as GitHub Pages.

Does Copilot need to write a server?

No. Joinable's hosted relay runs the rooms, and the kit tells the agent never to write server or WebSocket code.

Copy the prompt for your coding agent or sign up free