One prompt.
A real
multiplayer game.
Colyseus is built for AI. Paste one prompt and let it run in Claude Code
Your coding agent ships an authoritative server, client-side prediction, matchmaking, reconnection and tests that prove two players can see each other, all on the Colyseus 0.18 API.
1 prompt 0 hand edits First attempt 64 min, prompt to commit How we ran it ↓npx skills add colyseus/skill Works with any agent that supports Agent Skills. Add --global for every project.
48 Vibe Jam 2026 games shipped their multiplayer on Colyseus →
The Prompt
Pick a game. Paste the prompt.
Pick a genre, tweak the game line, paste it into your coding agent in an empty folder. It installs the Colyseus skill, scaffolds a 0.18 project and keeps going until the tests prove two players can see each other.
2-8 players frag each other in a 3D arena, with predicted movement and lag-compensated shots.
- 1
Open an empty folder
In Claude Code, Codex, Cursor, Gemini CLI or Copilot. Node.js 22+ required.
- 2
Paste the prompt
The agent installs the skill, scaffolds, builds and tests on its own. Our verified run took 64 minutes.
- 3
npm start, two tabs
Open http://localhost:5173 twice and play against yourself.
- 4
Play with a friend
npm i -D @colyseus/tunnel, then press s + Enter wherenpm startruns and send the link. Needs a free Colyseus Cloud login.
Only the arena shooter prompt has a verified run: Claude Code with Claude Opus 5.5, 64 minutes. The other genres, agents and models are untested, so tell us how yours went.
Terminal? claude "$(curl -fsSL https://colyseus.io/ai/prompts/arena-shooter.txt)"
Proof, not a promise
We ran it. Unedited.
We pasted the arena shooter prompt above into a fresh Claude Code session in an empty folder and walked away. 64 minutes later it had committed Blaster Arena, the game in the video up top.
An AI agent installs the Colyseus skill, scaffolds a Colyseus 0.18 project, passes its tests and starts the game.
Condensed replay of the real session · Claude Code, Claude Opus 5.5 · Nov 23, 2026
- prompt
- 1
- follow-ups
- 0
- hand edits
- 0
- lines written
- 2,169
- tests passing
- 6
- prompt → commit
- 64m
- First attempt
- 0 prediction drift at 150 ms lag
It plays with a keyboard and mouse.
The agent skill
What your model writes without it
Most models learned Colyseus from code older than 0.18. Same request, same model: flip the switch.
colyseus/skill import { Room, Client } from "colyseus";import { Schema, MapSchema, type } from "@colyseus/schema";
class Player extends Schema { @type("number") x = 0; @type("number") y = 0;}class State extends Schema { @type({ map: Player }) players = new MapSchema<Player>();}
export class ArenaRoom extends Room<State> { onCreate() { this.setState(new State()); this.onMessage("move", (client, data) => { const player = this.state.players.get(client.id); player.x = data.x; player.y = data.y; }); }
onJoin(client: Client) { this.state.players.set(client.id, new Player()); }
async onLeave(client: Client, consented: boolean) { if (!consented) { await this.allowReconnection(client, 30); } }}import { Room, Client, CloseCode, validate } from "colyseus";import { schema, t } from "@colyseus/schema";import { z } from "zod";
const Player = schema({ x: t.number(), y: t.number() }, "Player");const State = schema({ players: t.map(Player) }, "State");
export class ArenaRoom extends Room { state = new State();
messages = { move: validate(z.object({ x: z.number(), y: z.number() }), (client, { x, y }) => { const player = this.state.players.get(client.sessionId); player.x = x; player.y = y; }), };
onJoin(client: Client) { this.state.players.set(client.sessionId, new Player()); }
onDrop(client: Client, code: CloseCode) { this.allowReconnection(client, 30); }
onLeave(client: Client, code: CloseCode) { this.state.players.delete(client.sessionId); }}import { Client, getStateCallbacks } from "colyseus.js";
const client = new Client("ws://localhost:2567");const room = await client.joinOrCreate<State>("arena");
const $ = getStateCallbacks(room);$(room.state).players.onAdd((player, id) => { $(player).listen("x", (x) => draw(id, x));});import { Client, Callbacks } from "@colyseus/sdk";import type { server } from "./app.config";
const client = new Client<typeof server>("http://localhost:2567");const room = await client.joinOrCreate("arena");
const callbacks = Callbacks.get(room);callbacks.onAdd("players", (player, sessionId) => { callbacks.listen(player, "x", (x) => draw(sessionId, x));});-
"colyseus.js" → "@colyseus/sdk"
The JS client was renamed in 0.17; colyseus.js is the pre-0.17 client.
-
Room<State> → state = new State()
The generic is now an options object; a bare state type no longer type-checks.
-
client.id → client.sessionId
Removed in 0.18, so it is silently undefined at runtime.
-
onLeave(client, consented) → onDrop + CloseCode
The second argument is a close code. 4000 is truthy, so reconnection never runs.
No skill support? Point your agent at docs.colyseus.io/llms.txt
or llms-full.txt,
or append .md to any docs URL.
Why it works
A framework agents get right
Vibe-coded multiplayer usually breaks at the network layer. Colyseus puts the hard parts in the framework and gives your agent the feedback loops to check its own work.
Scaffolds without questions
create-colyseus-app takes layout, netcode, matchmaking, auth and database as flags, so an agent never gets stuck on an interactive prompt.
Types from server to client
new Client<typeof server>() infers room state and message types. A hallucinated field becomes a compile error the agent fixes on its own.
Proves sync before you look
@colyseus/testing boots the real server and connects real clients, so the agent can assert two players see each other before you open a browser.
Authoritative by default
The server owns the state and sanitizes every input; prediction, reconciliation and interpolation are built in. Your agent writes one pure step function.
Vibe Jam 2026
1 in 7 vibe-coded multiplayer games shipped on Colyseus
In @levelsio's month-long Vibe Jam, sponsored by Cursor, at least 90% of every game's code had to be written by AI. 48 of the 945 entries used Colyseus for their multiplayer: about 1 in 7 of the jam's online multiplayer games.
- games built with Colyseus
- 48
- total entries
- 945
- online multiplayer entries used Colyseus
- 1 in 7
- of every line had to come from AI
- 90%+
FAQ
Building multiplayer games with AI
Which AI coding agents can build a Colyseus game?
Any agent that can run shell commands in a folder: Claude Code, OpenAI Codex, Cursor, Gemini CLI, GitHub Copilot, and others that support Agent Skills. Chat-only assistants can't run the scaffolder, but they can still read the docs through https://docs.colyseus.io/llms.txt.
What is the Colyseus agent skill?
An open Agent Skill (github.com/colyseus/skill) that teaches your agent the Colyseus 0.18 APIs: canonical shapes for rooms, schema state, the client SDK and netcode, plus a table of outdated patterns to avoid. It checks your installed versions before writing code and never runs anything on its own. Install it with npx skills add colyseus/skill, or add --global to enable it for every project.
Why does my AI write outdated Colyseus code?
Most models learned Colyseus from material older than 0.18. Left alone, they import colyseus.js, type rooms as Room<MyState>, read client.id and treat onLeave's second argument as a boolean. That code fails to compile or silently breaks reconnection. The skill, or the Markdown docs at llms.txt, keep the agent on the current API.
Do I need to understand netcode to make a real-time game?
Not to get started. The fixed-tick scaffold (--netcode fixed) already wires an authoritative fixed-tick loop, per-client input buffers with sanitization, client-side prediction with reconciliation, and interpolation for other players. You, or your agent, write one pure step function that the server and the client both run.
Can players cheat when the client was written by an AI?
The server is authoritative: clients only send inputs, which are clamped by sanitize and applied by the server's own simulation. A modified client can't teleport or award itself points; it can only send the inputs a real player could.
Where do I host a Colyseus game?
Anywhere Node.js 22 runs. npm run build outputs the client to dist/client and the server to dist/server. Colyseus Cloud deploys and scales it for you, and the scaffold already ships its ecosystem.config.cjs.
Is Colyseus free?
Yes. Colyseus is MIT-licensed open source. Colyseus Cloud is optional managed hosting, and the source code of the premium demos is a perk for GitHub sponsors.
Can I use Unity, Godot, Defold or another engine?
Yes. The server is the same, and official SDKs cover Unity, Godot, Defold, GameMaker, Construct 3, Haxe, C and more. The prompts here target the browser because an agent can build and test that end to end on its own.
Your agent is ready
Copy the prompt, open an empty folder, and come back in about an hour to a tested multiplayer game. Then take it live on Colyseus Cloud.
Community
Join Our Growing Community
Connect with thousands of multiplayer game developers