NET FORGE DOCS

Net Forge and Phaser: when to use each

Last updated Checked against @netforge/engine 0.2.0View as Markdown

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 when you are making a 2D browser game and want the largest library of 2D examples and a long-established community. Pick Net Forge when you want a 3D multiplayer game in the browser that starts from a finished, server-authoritative template and is shaped so your own coding agent can change it safely.

npm create netforge@latest my-game -- --template arena --yes

At a glance

PhaserNet Forge
What it isA 2D game framework for web browsers (Phaser docs)A multiplayer browser game engine plus ten genre templates
LanguageJavaScript or TypeScriptTypeScript
RenderingWebGL and Canvasthree.js, WebGPU with a WebGL2 fallback
Multiplayer modelYour choice of server library (Phaser's overview page does not describe a networking layer)Authoritative room host running the same simulation as the client
LicenseMIT (npm)MIT
Latest version (checked 2026-10-23)4.2.1, released 2026-07-09@netforge/engine 0.2.0
Best for2D games of every kind, including platform targets such as Discord Activities and YouTube Playables3D online games in ten genres, built and changed by people working with coding agents

When to pick Phaser

  • Your game is 2D. Phaser describes itself as "a 2D game framework" with WebGL and Canvas rendering across desktop and mobile browsers (What is Phaser?). Sprites, tilemaps, arcade physics and cameras are its home ground. Phaser 4 shipped in April 2026 (4.0.0 on npm on 2026-04-10, announced on 2026-04-23) with a WebGL renderer rebuilt from scratch around a new RenderNode architecture (Phaser news, release notes).
  • You learn by example. Phaser publishes an examples index for agents at phaser.io/llms.txt; on 2026-10-23 it was about 400 KB of example entries, each with a version, folder, title and description.
  • You want an agent service built around Phaser. The Phaser Game Agent MCP connects Claude Code, Cursor, Copilot, Codex, Gemini CLI and Windsurf to Phaser's hosted game agent (Phaser news, 2026-07).
  • You target platforms beyond the open web. Phaser's docs list YouTube Playables, Discord Activities and Twitch Overlays, and native apps through third-party wrappers (What is Phaser?).

When to pick Net Forge

  • You want multiplayer from the first minute. Every template is already an online game: an authoritative host steps the world at a fixed tick (30 or 60 Hz, by template) and each browser predicts its own player with the same simulation code. See Simulation and ECS.
  • You want to start from a finished game. Ten templates (survivor-like, arena shooter, tower defense, dungeon crawl, idle, platformer, card battler, monster collector, kart racer, party game) ship with netcode, rendering, touch controls, bots and a playtest. See Templates.
  • Your coding agent does the editing. A game is one declarative file, src/game.ts, that may import only @netforge/engine. Bad declarations fail with one actionable line, and npm run check plays the game headless with bots and reports JSON. See Let an AI agent build your game.
  • You want 3D. The renderer is three.js with WebGPU and a WebGL2 fallback, and the asset library has CC0 models in six art styles.

Honest limits of Net Forge

Net Forge is young (0.2.0). It covers ten genres, not every kind of game, and a 2D-first game with hand-drawn sprites and tilemaps is more natural in Phaser. Game code is restricted to the declarative API on purpose, so a mechanic the API does not describe needs a change to the template, not to src/game.ts. The public repository's room host is for playing on your own computer and network; the production room server is the hosted Net Forge service.

Moving from Phaser

PhaserNet Forge
Phaser.Game configgame({ template, style, players, ... }) in src/game.ts
Scene create() and update()Declarations plus system() callbacks that run on the simulation tick
Sprites and animationsPrefabs with a library model id, such as "style.lowpoly.bat"
Arcade or Matter physicsRapier physics inside @netforge/engine-sim, the same on client and server
Your own server (often Socket.IO or Colyseus)The template's authoritative room host
Asset loader with file pathsAsset ids from the library, never URLs

A first step: pick the template closest to your game and port one enemy or item at a time. If your Phaser game already has a Colyseus server, Net Forge vs Phaser + Colyseus maps both halves.

npm create netforge@latest my-game -- --template platformer --yes
cd my-game
npm run play
src/game.ts
import { prefab } from "@netforge/engine";

// A Phaser enemy sprite becomes a prefab with a library model and numbers.
prefab("bat", { model: "style.lowpoly.bat", health: 8, speed: 5, radius: 0.25, damage: 4, ai: "chase" });

FAQ

Is Net Forge a Phaser alternative?

For 3D multiplayer browser games, yes. For 2D games, Phaser is usually the better fit: it is built for 2D and has a far larger example library. For other 3D options, see 3D multiplayer browser game engines compared.

Can I use Phaser and Net Forge together?

Not in one game client: Net Forge templates draw with three.js. A Phaser game can still use other parts of the ecosystem, such as a Colyseus server.

Does Phaser have multiplayer?

Phaser's overview page describes rendering, input and platforms, not networking, so Phaser games pair with a server library. Colyseus, for example, documents a JavaScript client that works with browser frameworks (Colyseus docs).

Is Net Forge free like Phaser?

Yes. Both are MIT licensed. Net Forge's library assets are CC0.