Learn

Learn Multiplayer Game Development with Colyseus

Tutorials that build a multiplayer game step by step, plus ready-to-run examples for your engine. Further down, open-source demos where one authoritative server drives clients across more than a dozen engines.

Premium Demos

5 complete prototypes you can play right now in your browser. Each runs the whole stack at once: authoritative server, client prediction, smoothed remotes and lag compensation.

We’re actively expanding the set, and adding engine ports to it: Air Hockey already ships Godot and Unity clients alongside its Three.js build.

Air Hockey, gameplay screenshot
Air Hockey
3D air hockey where everything is predicted: your mallet, the puck, hits and even goals resolve locally and are settled by the server. First to 7 wins.Three.js · Godot · Unity
ColyStrike (FPS), gameplay screenshot
ColyStrike (FPS)
First-person shooter: predicted movement with reconciliation, server-validated hitscan with lag compensation, and a C4 plant and defuse loop.Three.js
MOBA, gameplay screenshot
MOBA
A 3-lane MOBA on a deterministic shared simulation: fixed timestep and client prediction driving heroes, creeps, towers and 5v5 bot matches.Three.js
Platformer, gameplay screenshot
Platformer
2.5D platformer built as a prediction harness: reconciled movement, rideable moving platforms, and stomps and dashes that hold up under lag.Three.js
Colyseus Karts, gameplay screenshot
Colyseus Karts
Kart racing with hold-to-drift mini-turbos, item boxes and rockets: rollback prediction, dead-reckoned projectiles, and rewind-based hit checks.Three.js

The source code is the sponsor-only part: these repositories are private, available to Colyseus sponsors.

Become a sponsor for the source code

Open-Source Demos

Every one of these is MIT-licensed and free to clone. Each runs from a single authoritative server with multiple client implementations, one per game engine. Read the source to see exactly how each SDK connects, synchronizes state, and handles real-time gameplay with Colyseus.

Unity, Godot, Defold, GameMaker and Haxe have a client in all three. Whichever you work in, there are three different projects to read in it.

Prediction Playground

colyseus/prediction-playground

A tour rather than a game: twelve small labs, each isolating one netcode technique. Reconciliation, the interpolation modes, dead reckoning, lag compensation, optimistic events, predicted spawns. Every lab has a live latency slider and shows the exact SDK-facing code it runs.

The opening split screen: the same entity in the same room at 200 ms of injected latency, raw server echo above, client prediction below

All twelve labs run on one shared server, so each client below is the same lab logic ported to a different SDK.

TypeScriptWeb (TypeScript)
Web
UnityUnity
Desktop · Web · Mobile
GodotGodot (GDScript)
Desktop · Web
GodotGodot (C#)
Desktop
Defold EngineDefold
Desktop · Web · Mobile
GameMakerGameMaker
Desktop · Web
HaxeHaxe + Heaps
Desktop
CC + raylib
Desktop · Web
FlutterFlutter
macOS
Lab 06: lag compensation
06 · Lag Compensation: the server rewinds to what you saw, so aiming at a moving target lands.
Lab 10: composite world
10 · Composite World: paddle and puck both predicted; the dashed ghost is the server trailing by one round trip.

Realtime Tanks Multiplayer

colyseus/realtime-tanks-demo

A real-time arena shooter: drive, aim and fire against everyone else in the room, with health pickups and a live leaderboard. Nine clients, one server: every row below joins the same match.

Realtime Tanks running in the browser on PlayCanvas

JavaScriptPlayCanvas
Web
GameMakerGameMaker
Desktop · Web
GodotGodot
Desktop · Web · Mobile
Defold EngineDefold
Desktop · Web · Mobile
HaxeHaxe + Heaps
Desktop · Web
UnityUnity
Desktop · Web · Mobile
JavaScriptThree.js
Web
Construct 3Construct 3
Web
MonoGameMonoGame
Desktop

Turn-based “UNO” Card Game

colyseus/turnbased-cards-demo

A four-player game of UNO: turn order, draw and discard piles, and bots to fill the empty seats. Six clients, one server: every row below sits at the same table.

Turn-based UNO running in the browser on React + React Three Fiber

ReactReact + R3F
Web
GameMakerGameMaker
Desktop · Web
GodotGodot
Desktop · Web · Mobile
Defold EngineDefold
Desktop · Web · Mobile
HaxeHaxe + Heaps
Desktop · Web
UnityUnity
Desktop · Web · Mobile

Framework Overview Talk

Watch Endel Dreyer’s talk at JS GameDev Summit 2022, organized by GitNation. The talk covers how Colyseus handles authoritative game state, client synchronization, and room-based matchmaking.

Going Further

Built your first room? The Netcode section covers the prediction stack: authoritative input, client-side prediction, and lag compensation. These techniques are the built-in version of what the tutorials build by hand.