# Net Forge > Net Forge (two words) is the open-source multiplayer browser game engine built for AI coding agents: an MIT-licensed TypeScript engine published on npm under `@netforge`, with source at https://github.com/netnetdev/net-forge. One simulation (ECS plus Rapier physics, fixed tick, 30 Hz by default) runs in the browser and on the server, a three.js renderer draws it with WebGPU and a WebGL2 fallback, and games are written against a typed, declarative API that AI coding agents can edit safely. Ten complete genre templates are included. Start with `npm create netforge@latest`. Create a game: `npm create netforge@latest my-game -- --template survivor --yes`, then `cd my-game && npm run play`. Ten templates: survivor, arena, tower-defense, dungeon, idle, platformer, cards, collector, racer, party. Every page below is also available as markdown: append `.md` to its URL (for example https://forge.netnet.capital/docs/quickstart.md). The whole corpus is one file at https://forge.netnet.capital/docs/llms-full.txt. Net Forge is not affiliated with other projects named NetForge, such as .NET starter templates or network simulators. Everything in the public repository runs with play money on your own computer. The on-chain economy (game tokens, rewards) is an optional upgrade that runs only on the hosted Net Forge service. ## Start - [Quickstart](https://forge.netnet.capital/docs/quickstart.md): Start a multiplayer browser game with one command, play it in two browser tabs, change the rules in src/game.ts and run the headless playtest bots. Everything runs on your computer with play money. - [Set up your coding agent](https://forge.netnet.capital/docs/agents.md): Run npx netforge setup agent in a game folder to write AGENTS.md, CLAUDE.md, Cursor rules and MCP configs, or add the @netforge/mcp server to Claude Code, Cursor, VS Code, Codex or Gemini CLI with one line. The server lists templates, scaffolds games, searches the docs, validates game modules and runs bot playtests, with no keys and no network. - [Agent Skills](https://forge.netnet.capital/docs/skills.md): The netforge package ships four Agent Skills, each a folder with a SKILL.md, that teach a coding agent to create a Net Forge game, add content, playtest after every change and play the game locally. Install them with npx skills add netnetdev/net-forge or copy them with npx netforge skills copy. - [Changelog](https://forge.netnet.capital/docs/changelog.md): What changed in the Net Forge docs and the package versions they were checked against, newest first. ## Templates - [Survivor-like (EMBERWATCH)](https://forge.netnet.capital/docs/templates/survivor-like.md): EMBERWATCH is a four-player co-op survivor-like that holds up to 2,000 enemies at once in the browser: auto-firing weapons, XP gems, level-up cards, evolutions, bosses and co-op revives. Start it with one command and change it in src/game.ts. - [Arena shooter (VOLTYARD)](https://forge.netnet.capital/docs/templates/arena-shooter.md): VOLTYARD is a twin-stick arena shooter for up to 16 players with a server-authoritative room at 60 Hz, lag-compensated beams, loadouts, rounds and bots that fill empty seats. Start it with one command and change it in src/game.ts. - [Tower defense (COGSPIRE)](https://forge.netnet.capital/docs/templates/tower-defense.md): COGSPIRE is a co-op tower defense for up to four players on one shared board: a winding road, twenty waves, four tower kinds with upgrades, shared lives and per-player gold. Start it with one command and change it in src/game.ts. - [Dungeon crawler (CRYPTWICK)](https://forge.netnet.capital/docs/templates/dungeon-crawler.md): CRYPTWICK is a four-player co-op dungeon crawl with procedural rooms grown from a seed, walls and doors, enemies that path around them, room-by-room encounters, upgrade chests and permadeath. Start it with one command and change it in src/game.ts. - [Idle game (BRINEWORKS)](https://forge.netnet.capital/docs/templates/idle-game.md): BRINEWORKS is a shared idle game for up to eight players: each runs a production chain on one salt flat, buys and levels plants, and everyone fills one contract together during a fixed-length shift. Start it with one command and change it in src/game.ts. - [Platformer (SKYLEDGE)](https://forge.netnet.capital/docs/templates/platformer.md): SKYLEDGE is a side-view platformer race for up to eight players with coyote time, jump buffering, variable jump height, an air dash, springs, moving platforms, per-player coins and seat bots that run planned routes. Start it with one command and change it in src/game.ts. - [Card battler (INKWRIT)](https://forge.netnet.capital/docs/templates/card-battler.md): INKWRIT is a one-against-one online card battler: decks shuffled on the server, hidden hands, mana, units and spells, guards and rush, a draft between duels, and a gauntlet of AI opponents for a player alone. Start it with one command and change it in src/game.ts. - [Monster collector (MOSSBOUND)](https://forge.netnet.capital/docs/templates/monster-collector.md): MOSSBOUND is a multiplayer monster collector for up to eight players: pick a starter, walk a shared marsh, meet wild creatures in tall grass, battle turn by turn with a team of three, catch the ones you want and bring down a shared boss before dusk. Start it with one command and change it in src/game.ts. - [Kart racer (TORQUEBAY)](https://forge.netnet.capital/docs/templates/kart-racer.md): TORQUEBAY is an online kart racer for up to eight players: arcade kart physics at 60 Hz, drift mini-turbos in three tiers, boost pads, coins, laps through ordered checkpoints, a streamed track and bots that drive the racing line. Start it with one command and change it in src/game.ts. - [Party game (ROMPHOUSE)](https://forge.netnet.capital/docs/templates/party-game.md): ROMPHOUSE is a co-op party game for two to eight players on phones and laptops: one playroom, five quick minigame rounds a show, auto-firing weapons, revives and a finale boss. Start it with one command and change the minigames in src/game.ts. ## Guides - [Multiplayer browser game](https://forge.netnet.capital/docs/guides/multiplayer-browser-game.md): Start from a finished multiplayer game with one command: the server runs the simulation, every browser predicts its own player from the same code, and you change the rules in one TypeScript file. - [.io-style arena shooter](https://forge.netnet.capital/docs/guides/io-game.md): Make a .io-style browser shooter where players join a room from a link, the server owns all movement and hits, and bots fill empty seats so a lone player still gets a fight. One command starts it. - [Authoritative multiplayer for three.js](https://forge.netnet.capital/docs/guides/threejs-authoritative-multiplayer.md): Put the rules in one simulation that the server runs as the authority and the browser runs again to predict, and send only inputs from each client. With Net Forge that simulation is one game file shared by server and browser, so there is no separate server codebase; three.js only draws what it says. - [Three.js netcode](https://forge.netnet.capital/docs/guides/threejs-multiplayer-netcode.md): How client-side prediction, server reconciliation, interpolation and delta snapshots work in a three.js multiplayer game, with a runnable TypeScript example that converges exactly under 80 ms latency and 5% packet loss. - [Deterministic Rapier physics](https://forge.netnet.capital/docs/guides/threejs-rapier-physics.md): Use @netforge/engine-sim's createPhysics for Rapier rigid bodies, triggers, ray casts and a character controller on a fixed tick, with bit-exact snapshots and a state hash, so the server and every browser compute the same world. - [Shared client and server simulation](https://forge.netnet.capital/docs/guides/shared-client-server-simulation.md): @netforge/engine-sim is one TypeScript module that steps the same world on a Node server and in the browser: fixed tick, quantized inputs, integer state and snapshots that restore bit-exact. A runnable example proves two worlds stay identical. - [Free CC0 models and sounds](https://forge.netnet.capital/docs/guides/cc0-game-assets.md): The Net Forge asset library gives a web game CC0 characters, creatures, vehicles, props, sprites and sound effects addressed by id, in four model sets and six art styles, with each pack's licence verified and every file pinned by hash. - [WebGPU with a WebGL2 fallback](https://forge.netnet.capital/docs/guides/webgpu-browser-game.md): Net Forge draws with three.js's WebGPURenderer, which uses WebGPU where the browser has it and WebGL 2 everywhere else, and wraps it in a render stack with lighting, post effects, GPU particles and quality tiers that adapt to the device. - [Test locally with bots](https://forge.netnet.capital/docs/guides/local-multiplayer-testing.md): Open one room in several browser tabs with npm run play, let phones on your network join, and run headless playtest bots with npm test and npm run check. Everything runs on your computer with play money. - [Let an AI agent build your game](https://forge.netnet.capital/docs/guides/build-a-game-with-an-ai-agent.md): Scaffold a Net Forge game with npm create netforge, open it in Claude Code, Cursor or Copilot, and ask for changes in plain words. The agent edits one typed file, src/game.ts, and checks every edit with npm run check, a headless bot playtest that prints JSON. - [Deploy and host](https://forge.netnet.capital/docs/guides/deploy-and-host.md): Two honest options: play and playtest on your own computer and network with the kit-play local host, or publish through the hosted Net Forge studio, which runs the production room servers, lag compensation and run verification. - [Survivor-like with thousands of enemies](https://forge.netnet.capital/docs/guides/horde-survivor-browser-game.md): Start from the EMBERWATCH template with one command: a four-player co-op survivor-like that holds 2,000 enemies on an authoritative server at 30 Hz, drawn with instanced three.js crowds. Then tune the swarm, the weapons and the waves in src/game.ts. - [Co-op game joined with a link](https://forge.netnet.capital/docs/guides/co-op-browser-game.md): Start a four-player co-op game with one command, share a room link so friends drop into the same run, and tune revives, shared XP and boss scaling in src/game.ts. Rooms, the authoritative server and prediction come with the template. - [Host a game server](https://forge.netnet.capital/docs/guides/host-browser-game-server.md): What a browser game server needs (WebSockets, a fixed-tick authoritative loop, TLS, rooms that stay on one process), how Net Forge's local room host does it on one port, and which hosted and self-hosted options fit a public game. - [Vibe-code a multiplayer game](https://forge.netnet.capital/docs/guides/vibe-code-multiplayer-game.md): Start from a finished multiplayer template instead of a blank page, let your agent change only the declarative game file, and gate every change on a headless bot playtest. The netcode, rendering and server authority are already done, so prompts change the game, not the plumbing. - [In-game store and currency](https://forge.netnet.capital/docs/guides/in-game-store-and-currency.md): Declare store items, coin prices and earn rules in src/game.ts with store.sku and earn.rule. Locally they run with play money; on the hosted Net Forge service a game can optionally upgrade its coins to its own token. - [Online card battler with AI opponents](https://forge.netnet.capital/docs/guides/online-card-game.md): Start the INKWRIT card battler with one command: one-against-one duels with turns, a turn timer, hidden hands shuffled on the server, a draft between duels and AI opponents in four tiers. Change cards, the table and the AI in src/game.ts. - [Turn-based multiplayer game](https://forge.netnet.capital/docs/guides/turn-based-browser-game.md): Start from a turn-based template (the card battler or the monster collector) with one command. Turns, validated actions, hidden information and replays come from Net Forge rules genres: deterministic modules the room server runs at 30 Hz behind the same netcode as the action games. - [Co-op tower defense](https://forge.netnet.capital/docs/guides/tower-defense-browser-game.md): Start the COGSPIRE tower defense template with one command: up to four players build and upgrade towers on one shared board against twenty waves. Change the road, towers, creeps and waves in src/game.ts; targeting, gold, co-op and netcode come with it. - [Online kart racer](https://forge.netnet.capital/docs/guides/kart-racer-browser.md): Start the TORQUEBAY kart racer with one command: up to eight karts race laps with drift boosts, boost pads and coins, seat bots fill the grid, and the server runs arcade kart physics at 60 Hz. Add circuits and tune the handling in src/game.ts. - [Dungeon crawler with procedural rooms](https://forge.netnet.capital/docs/guides/dungeon-crawler-typescript.md): Start the CRYPTWICK template with one command: a four-player co-op crawl through a crypt grown from a seed, with rooms that wake as you approach, flow-field pathing round walls, reliquary upgrades and permadeath. Change the seed, the rooms and the encounters in src/game.ts. - [Multiplayer idle game](https://forge.netnet.capital/docs/guides/idle-game.md): Start the BRINEWORKS idle template with one command: up to eight players each run a works on one shared salt flat and fill a contract together. Production runs only on the server's clock while you are in the room, so the game cannot be farmed. Tune plants, costs and shifts in src/game.ts. - [Multiplayer 3D platformer](https://forge.netnet.capital/docs/guides/3d-platformer-web.md): Start the SKYLEDGE platformer with one command: up to eight climbers race cliffside courses with coyote time, jump buffering, variable jump height, dashes, springs and moving platforms. The movement is predicted bit for bit, and a route planner checks every course. Tune the feel in src/game.ts. - [Monster collector with battles](https://forge.netnet.capital/docs/guides/monster-collector-game.md): Start the MOSSBOUND monster collector with one command: up to eight players walk a shared marsh, meet wild creatures in tall grass, battle them turn by turn with a team of three, catch the ones worth keeping and wear down one shared boss. Add creatures, moves and grass zones in src/game.ts. - [Party game for 2 to 8 players](https://forge.netnet.capital/docs/guides/party-game-browser.md): Start the ROMPHOUSE party template with one command: two to eight friends in one playroom play five quick co-op minigame rounds a show, on phones or laptops. Each minigame is an entry in a ROUNDS list in src/game.ts that you can add to or change. ## Concepts - [Simulation and ECS](https://forge.netnet.capital/docs/concepts/simulation-ecs.md): Net Forge runs one simulation module, @netforge/engine-sim, on the server for authority and in the browser for prediction. It is a bitECS world with deterministic Rapier physics, stepped at a fixed tick, with integer state and bit-exact snapshots. - [Netcode and prediction](https://forge.netnet.capital/docs/concepts/netcode-prediction.md): The server runs the simulation and decides what happened. Each browser predicts its own player with the same simulation, reconciles when the server's snapshot arrives, and interpolates everyone else. Inputs are sequence-numbered and sent with redundancy; snapshots are bit-packed deltas. - [The typed game API](https://forge.netnet.capital/docs/concepts/game-api.md): A Net Forge game is one TypeScript file, src/game.ts, that declares what exists and the rules with game(), prefab(), weapon(), director(), system(), earn and store from @netforge/engine. Declarations are Zod-validated, and a mistake fails with one line that says what to fix. - [Assets and art styles](https://forge.netnet.capital/docs/concepts/assets-art-styles.md): Net Forge games reference models and sounds from a CC0 asset library by id, such as style.lowpoly.ghost, never by URL. Every template draws in six art styles (lowpoly, toon, ps1, pixel, voxel, handdrawn), and an id resolves to that style's own model when the style has one. - [Testing with playtest bots](https://forge.netnet.capital/docs/concepts/playtest-bots.md): engine.test.run plays a declared Net Forge game headless with bots and reports kills, waves, levels, earn rules fired, softlocks, the server cost per tick and design metrics such as time to first threat. npm test runs it on your game folder; npm run check prints it as JSON for coding agents. ## Compare - [3D multiplayer engines compared](https://forge.netnet.capital/docs/compare/3d-multiplayer-engines.md): Babylon.js, PlayCanvas, three.js, Godot web export, Unity Web and Net Forge side by side for a 3D multiplayer browser game: rendering, editor, physics, multiplayer and the backends each pairs with, language, license and AI-agent tooling, each cited from its own docs. - [Net Forge and Phaser](https://forge.netnet.capital/docs/compare/phaser.md): Phaser is a mature 2D framework for browser games with a very large example library. Net Forge is a 3D multiplayer engine with one simulation shared by client and server and ten finished multiplayer games to start from. - [Net Forge vs Phaser + Colyseus](https://forge.netnet.capital/docs/compare/phaser-colyseus.md): Phaser + Colyseus is a proven open-source stack for 2D multiplayer browser games, with the client and the server as two codebases you own. Net Forge is a 3D engine where one simulation runs on the server and in the browser, with ten finished multiplayer games to start from. - [Net Forge and Colyseus](https://forge.netnet.capital/docs/compare/colyseus.md): Colyseus is an open-source multiplayer server framework for Node.js with SDKs for many engines. Net Forge uses Colyseus for its rooms and transport and adds a shared simulation, a three.js renderer, a typed game API and ten finished games on top. - [Net Forge and Godot web export](https://forge.netnet.capital/docs/compare/godot-web-export.md): Godot is a free, open-source 2D and 3D engine with an editor that also exports to the web. Net Forge is a TypeScript engine made for the browser, with one simulation shared by client and server and ten finished multiplayer games. - [Net Forge and PlayCanvas](https://forge.netnet.capital/docs/compare/playcanvas.md): PlayCanvas is an open-source WebGL2 and WebGPU engine with a browser-based visual editor. Net Forge is a code-first TypeScript engine with one simulation shared by client and server and ten finished multiplayer games. - [Net Forge and Babylon.js](https://forge.netnet.capital/docs/compare/babylonjs.md): Babylon.js is an open game and rendering engine for the web with WebGPU support and a large Playground. Net Forge is a TypeScript engine with one simulation shared by client and server and ten finished multiplayer games. - [Net Forge and three.js](https://forge.netnet.capital/docs/compare/threejs.md): three.js is a general-purpose JavaScript 3D library, and Net Forge is built on it. Net Forge adds a simulation shared by client and server, netcode, physics, a typed game API and ten finished multiplayer games. - [Net Forge and boardgame.io](https://forge.netnet.capital/docs/compare/boardgame-io.md): boardgame.io is an open-source engine for turn-based games that turns move functions into a multiplayer game with secret state, phases, bots and a lobby. Net Forge offers a finished 3D card battler and three other board-style templates on an authoritative room. ## Migrate - [From Hathora](https://forge.netnet.capital/docs/migrate/from-hathora.md): Hathora's game server hosting shut down on 2026-05-05. If your game is a browser game in TypeScript, this page shows what moves to Net Forge, what Net Forge does not replace, and the other options. - [From a Socket.IO prototype](https://forge.netnet.capital/docs/migrate/from-socket-io-prototype.md): A Socket.IO prototype relays events between browsers. Net Forge replaces the hand-written relay with an authoritative room that steps one shared simulation, so movement, hits and scores are decided in one place. - [From a three.js scene](https://forge.netnet.capital/docs/migrate/from-threejs-scene.md): Net Forge renders with three.js, so a three.js game moves over by splitting it in two: rules go into a declarative src/game.ts that runs on the server and the client, and drawing stays in the template's three.js client. ## API reference - [@netforge/engine](https://forge.netnet.capital/docs/reference/engine.md): Every export of @netforge/engine, generated from its TypeScript source: 145 functions, classes, constants and types with their signatures and doc comments. - [@netforge/engine/game](https://forge.netnet.capital/docs/reference/engine-game.md): Every export of @netforge/engine/game, generated from its TypeScript source: 106 functions, classes, constants and types with their signatures and doc comments. - [@netforge/engine/net](https://forge.netnet.capital/docs/reference/engine-net.md): Every export of @netforge/engine/net, generated from its TypeScript source: 90 functions, classes, constants and types with their signatures and doc comments. - [@netforge/engine/rules](https://forge.netnet.capital/docs/reference/engine-rules.md): Every export of @netforge/engine/rules, generated from its TypeScript source: 88 functions, classes, constants and types with their signatures and doc comments. - [@netforge/engine/runtime](https://forge.netnet.capital/docs/reference/engine-runtime.md): Every export of @netforge/engine/runtime, generated from its TypeScript source: 199 functions, classes, constants and types with their signatures and doc comments. - [@netforge/engine-sim](https://forge.netnet.capital/docs/reference/engine-sim.md): Every export of @netforge/engine-sim, generated from its TypeScript source: 259 functions, classes, constants and types with their signatures and doc comments. - [@netforge/kit-play](https://forge.netnet.capital/docs/reference/kit-play.md): Every export of @netforge/kit-play, generated from its TypeScript source: 26 functions, classes, constants and types with their signatures and doc comments. ## Optional - [Source repository](https://github.com/netnetdev/net-forge): engine, simulation, templates and kit-play, MIT licensed - [Net Forge studio](https://forge.netnet.capital): make a game from a prompt in the browser