Net Forge vs Phaser + Colyseus
Net Forge, the open-source multiplayer browser game engine built for AI coding agents, is published on npm under @netforge with source at github.com/netnetdev/net-forge.
Pick Phaser + Colyseus when your game is 2D, you want the most mature ecosystem of examples and tutorials for that pairing, and you want to own the client code and the server code as two separate projects. Pick Net Forge when your game is 3D and you want one simulation shared by the client and the server (so there is no second codebase for the server), ten finished multiplayer games to start from, authoritative rooms by default, and a project shaped for your own coding agent.
npm create netforge@latest my-game -- --template survivor --yesNet Forge is the open-source multiplayer browser game engine built for AI coding agents, published on npm under @netforge. Its rooms are built on Colyseus, so this page compares a stack you assemble with a stack that is already assembled, not two rival server frameworks.
At a glance
Checked 2026-10-24 against each project's own docs and npm.
| Phaser + Colyseus | Net Forge | |
|---|---|---|
| Rendering | 2D | 3D (games can play on a plane, such as the side-view platformer) |
| Renderer | Phaser 4, WebGL and Canvas; the WebGL renderer was rebuilt for Phaser 4 (Phaser news, 2026-04-23) | three.js 0.186.1, WebGPURenderer with a WebGL2 fallback |
| Multiplayer model | Authoritative Colyseus rooms with schema state sync and matchmaking (Colyseus llms.txt) | Authoritative rooms (on Colyseus) that step a shared ECS and Rapier simulation and send delta snapshots |
| Server code | You write the room in Node.js, separately from the Phaser client | None to write for a template: the room runs the same src/game.ts and @netforge/engine-sim the browser runs |
| Prediction and reconciliation | Built into Colyseus 0.18: "the server stays authoritative, and the client predicts", and "you supply the deterministic step function" (Netcode); rewind for hits (Lag compensation) | Built in: the step function is the shared simulation, and the client predicts its own player with it |
| Physics | Phaser's Arcade and Matter physics on the client (Arcade, Matter); on the server, your choice | Rapier (deterministic WebAssembly build, 3D), the same on client and server |
| Starting points | Colyseus's four-part Phaser tutorial (movement, interpolation, client-predicted input, fixed tick rate) and Phaser examples (tutorial, examples) | Ten finished multiplayer games: survivor-like, arena shooter, tower defense, dungeon crawl, idle, platformer, card battler, monster collector, kart racer, party game |
| AI-agent tooling | Phaser's examples index at phaser.io/llms.txt and the Phaser Game Agent MCP (Phaser news, 2026-07); Colyseus publishes llms.txt | @netforge/mcp (scaffold, validate, playtest with bots, play locally), and AGENTS.md, CLAUDE.md, llms.txt and .mcp.json in every new game |
| License | Both MIT (phaser, colyseus) | MIT; library assets CC0 |
| Latest version | phaser 4.2.1 (2026-07-09); colyseus 0.18.10 and @colyseus/core 0.18.23 (2026-10-22) | @netforge/engine 0.2.0 |
| Hosting | Any Node.js host, or Colyseus Cloud for deployment, scaling and monitoring (llms.txt) | npm run play runs a local room host on your computer and network; production rooms run on the hosted Net Forge service |
When Phaser + Colyseus is the right pick
- The game is 2D. Phaser describes itself as a 2D game framework (What is Phaser?), and sprites, tilemaps, cameras and Arcade physics are its home ground. Phaser 4 was published on npm as 4.0.0 on 2026-04-10 and announced on 2026-04-23 with a WebGL renderer "rebuilt from scratch" around a new RenderNode architecture (Phaser news, release notes).
- You want a well-documented path for the pair. Colyseus maintains a Phaser tutorial that walks from basic movement to client-predicted input and a fixed tick rate (Colyseus Phaser tutorial).
- You want to own both sides. The client and the server are separate projects, so you choose the server's structure, its state schema and its deployment, and you can reuse the server with clients in other engines through Colyseus's many SDKs.
- You want prediction you tune yourself. Colyseus 0.18 provides the prediction, reconciliation and rewind loops and asks you for the deterministic step (Netcode, Migrating to 0.18).
When Net Forge is the right pick
- The game is 3D. The renderer is three.js with WebGPU and a WebGL2 fallback, and the asset library has CC0 models in six art styles.
- You do not want a second codebase for the server. The rules live in one declarative
src/game.ts. The room host and the browser both run it on@netforge/engine-sim, so the server is authoritative and the client predicts with the same code. See Simulation and ECS. - You want to start from a finished multiplayer game. Every template already has netcode, rendering, touch controls, seat bots and a headless playtest. See Templates.
- Your coding agent does the editing. Mistakes in
src/game.tsfail with one actionable line, andnpm testplays the game with bots and reports what happened. See Let an AI agent build your game.
Hundreds or thousands of enemies
The survivor-like template (EMBERWATCH) is built for a big swarm: the director caps the living crowd at 2,000 enemies, the client draws each crowd as instanced meshes in a handful of draw calls, and the room sends each player only what is near them (the local host caps a survivor snapshot at 250 enemies within 40 m).
We measured the server side on 2026-10-24 with the template's bench script, which holds the crowd at 2,000 and plays four bots through engine.test.run on the server simulation, 30 seconds per run at 30 Hz, three seeds:
| Crowd | Mean ms per tick | p99 ms per tick |
|---|---|---|
| 2,000 enemies, the template's enemy mix | 1.32 to 1.49 | 2.63 to 4.41 |
2,000 enemies, every non-boss role at once (--mix 1) | 1.70 to 2.14 | 3.49 to 7.05 |
The budget at 30 Hz is 33 ms per tick. The machine was an Apple M2 Pro (10 cores, 16 GB) on Node 22.22.3. These numbers are the simulation step with four bots, run in one process; they do not include snapshot encoding or the network. The template does not go above 2,000 living enemies, so we did not measure more. To repeat the measurement from a clone of the public repository:
git clone https://github.com/netnetdev/net-forge
cd net-forge
pnpm install
pnpm build
pnpm --filter @netforge/template-survivor bench -- --repeats 3 --seconds 30With Phaser + Colyseus, a crowd of this size is something you design: Phaser 4 adds GPU-powered sprites for large counts (Phaser 3 vs Phaser 4), and on the server you decide how enemies move, how they are synced (Colyseus schema state or your own messages) and how much each client receives. See How to make a survivor-like with thousands of enemies for the template.
Moving from Phaser + Colyseus
| Phaser + Colyseus | Net Forge |
|---|---|
Colyseus Room with onCreate, onJoin, onMessage | The template's room server, created for you; rules go in src/game.ts |
Colyseus Schema state (@type fields) | The simulation's state, sent as quantized delta snapshots |
room.send("move", data) from the client | Sequence-numbered input commands (move, facing, buttons) that the room applies on its tick |
| Your deterministic step for prediction | step(world, inputs) from @netforge/engine-sim, shared by both sides |
Phaser scenes with create() and update() | Declarations (game, prefab, weapon, director) plus system() callbacks on the simulation tick |
| Sprites and animations | Prefabs with a library model id, drawn by the three.js runtime in the template's client |
| Arcade or Matter physics | Rapier bodies, triggers and raycasts in @netforge/engine-sim |
matchMaker | Locally, every tab joins the open room until it is full; on the hosted service, matchmaking and room links (?room=<id>) |
A first step: start the template nearest your game, play it in two tabs, then port one enemy or one rule at a time.
npm create netforge@latest my-game -- --template survivor --yes
cd my-game
npm run play -- --players 2import { prefab } from "@netforge/engine";
// A Phaser enemy sprite with a Colyseus schema entry becomes one prefab.
prefab("bat", { model: "style.lowpoly.bat", health: 8, speed: 5, radius: 0.25, damage: 4, ai: "chase" });See also Net Forge and Phaser, Net Forge and Colyseus and 3D multiplayer browser game engines compared.
FAQ
Can I use Net Forge for 2D?
Partly. Net Forge always renders a 3D scene with three.js, but a game can play on a plane: the platformer template is a side-view game, the survivor-like plays on a flat field under a top-down camera, and the pixel art style draws 2D sprites as camera-facing billboards in a low-resolution, palette-snapped picture. There is no 2D-only renderer, tilemap editor or 2D physics engine (physics is Rapier 3D). For a game that is 2D through and through, Phaser is the better fit.
Is Net Forge built on Colyseus?
Its room layer is. The local room host in @netforge/kit-play runs @colyseus/core, and the browser connects with the Colyseus SDK. Net Forge sends its own binary delta snapshots over the room instead of schema state, because the shared simulation is the source of truth.
Does Phaser + Colyseus have client prediction?
Yes. Colyseus 0.18 documents client prediction with reconciliation, and server rewind for hits (Netcode), and its Phaser tutorial includes a client-predicted input chapter (tutorial).
Do I write server code with Net Forge?
Not for a template game. The rules in src/game.ts are what the room runs, so changing them changes the server. You write server-side code only if you fork a template to add a mechanic the declarative API does not describe.
Can a Phaser client join a Net Forge room?
No. Net Forge rooms expect the engine's own input commands and snapshots, and the templates draw with three.js. A Phaser client pairs with a Colyseus server you write.
Which is better for hundreds of enemies?
Both can do it. With Net Forge the swarm, its sync and its drawing are already built and measured (above). With Phaser + Colyseus you build that part yourself and keep full control of how it works.