Play online together
For games. Tell your AI agent "Make it playable online" (or "add online multiplayer"). It follows the
multiplayer Skill that ships with every template (.claude/skills/multiplayer/ and .agents/skills/multiplayer/) and
builds it on KUMODeck's multiplayer rooms. There is no server code to write.
First, one short question (with prices)#
There is no single right way to play online, so the agent asks once, in plain words, before it builds anything. Answer with numbers, or just say "leave it to you":
- Who plays? people you know (send them a 6-letter code to join the same room) / anyone (paired automatically) / both
- How fast is the game? taking turns or mostly talking / relaxed real-time (co-op, party) / fast action
- Does cheating, like an impossible score, matter? no, we play among ourselves / yes, scores that count or prizes
- Leave it to you: the agent picks the cheapest way that fits your game
Each way shows its price first. Per match of 4 players for 30 minutes, paid at cost from your prepaid balance (the numbers are estimates, not promises):
| Way | Price per match | What you give up |
|---|---|---|
| Send a link or QR code, get a reply link back (people you know) | 0 cents, completely — nothing goes through KUMODeck | 2 messages instead of 1; on some connections the two devices cannot reach each other and it does not connect (then use the 6-letter code) |
| Tell a 6-letter code once | joining: about 50 cents per million joins (estimate), plus one of the ways below for the game itself | — |
| KUMODeck carries every move | turn-based about 0.31 cents (≈ 1,600 matches for $5) · relaxed real-time about 0.39 cents (≈ 1,280) · fast action about 0.47 cents (≈ 1,060) | nothing is visible to other players; it still cannot judge your game's rules (see below) |
| Players' devices connect directly | moves during the game: 0 cents · joining the room: under 0.01 cents (estimate, not measured yet) | other players can see roughly where you live (city or region) from your connection; nobody stops cheating; at most 8 players |
| Directly, and KUMODeck carries it when needed | the direct price + carrying, billed by the amount sent ($0.05 per GB): turn-based under 0.01 cents, relaxed about 0.2 cents, fast action about 0.3 cents (estimates) | nobody stops cheating; where you live stays hidden when it is carried |
| Directly only, never carried | moves: 0 cents · joining: under 0.01 cents | two players who cannot reach each other directly simply cannot play together |
What the agent picks from your answers:
| Your answers | Setting the agent writes |
|---|---|
| cheating matters, or more than 8 players | "transport": "server" (the default) |
| only people you know, and "leave it to you" | the link or QR invite (no rooms at all; the SDK's link tool), with the 6-letter code as the backup |
| only people you know | "transport": "p2p", "p2p": { "relay": "fallback" } — direct first, carried only when direct fails |
| anyone, or both | "transport": "p2p", "p2p": { "relay": "always" } — strangers never see where you live |
| leave it to you | the cheapest that fits: "p2p": { "relay": "fallback" }, or the server when the game has scores that count or prizes |
| you ask for zero carrying cost | "p2p": { "relay": "never" } — some players may fail to connect |
What the agent does#
- Turns rooms on and adds a mode that fits your answers (for example 2 players for a duel): ``
sh kumodeck features on multiplayer kumodeck config push # development``json { "multiplayer": { "modes": [{ "key": "duel", "minPlayers": 2, "maxPlayers": 2, "fillTimeoutSeconds": 20 }] } }`` - Adds a Play online button: quick match with anyone, or a private room with a 6-letter code and an invite link for the people you choose (
kumo.rooms.quickMatch,kumo.rooms.create(mode, { private: true }),kumo.rooms.join(code)). - Sends moves with
room.sendand keeps what everyone must agree on (whose turn, the board, scores) in shared state (room.setState), so a player who reconnects sees the same game. - Keeps reconnects working: the SDK reconnects by itself and the server keeps a dropped player's seat for 20 seconds, also across a page reload.
- Deploys to development (
kumodeck deploy --env development) and tells you how to try it: open the URL in two tabs and add?player=2to the second one. Production only when you ask.
What to expect#
| Server-side | who is in which room, room codes, the host, one order of shared state for everyone, size and rate limits, banned players kept out |
| Your game's job | the rules (moves, hits, who won). A modified client can send anything: let the host decide, and check anything worth cheating for (scores that count, rewards) in your own Functions and database |
| Limits | up to 64 players per room, 30 messages a second per player, 16 KB per message, 64 KB of shared state |
| Good fits | turn-based, board and card games, quizzes, party games, co-op, casual real-time games for small rooms |
| Not a fit | competitive fast-action games that need the server to run the game (FPS, fighting games with rollback, lag compensation) |
Rooms keep nothing after everyone leaves: progress goes in cloud saves, and chat with history
uses realtime channels (the chat Skill). Usage is billed at cost from your prepaid balance
(Pricing has a worked example).