NET FORGE DOCS

Migrating from Hathora to Net Forge

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.

Hathora closed its game server hosting platform on 2026-05-05, after announcing the closure on 2026-03-04 (Gameye; Supercraft). If your game runs in the browser and its server logic is TypeScript, Net Forge can take over the room: start from the template closest to your game, move your rules into src/game.ts, and run the same simulation on the room host and in the page.

npm create netforge@latest my-game -- --template arena --yes
cd my-game
npm run play -- --players 2

Both sources above are published by companies that sell game server hosting, so read their framing with that in mind. On 2026-10-23, hathora.com and hathora.dev answered with a permanent redirect (HTTP 301) to gamefabric.com.

Who this page is for

Your gameGood next step
Browser game, TypeScript server logic, one of Net Forge's ten genresThis page
Browser game, you want to keep your own server codeA room framework such as Colyseus (Net Forge and Colyseus)
Native client (Unity, Unreal, Godot) on dedicated serversA dedicated server host; Gameye describes GameFabric by Nitrado as Hathora's recommended migration path (Gameye)

What maps to what

On Hathora you hadIn Net Forge
A server process per room or matchA room on the room host, created when the first player joins
Your authoritative game loop@netforge/engine-sim's fixed-tick step (30 Hz by default, 60 Hz in the arena, racer and platformer templates), driven by the template
State you serialized and sentQuantized delta snapshots, 20 a second in local play, encoded for you
A room id or code shared with friendsA room link (?room=<id>) on the hosted service; locally, every tab joins the open room
Regions and fleet scalingThe hosted Net Forge service; the public repository's host runs on one machine

1. Pick the template nearest your game

Start from a finished game rather than an empty room. The ten ids are survivor, arena, tower-defense, dungeon, idle, platformer, cards, collector, racer and party. See Templates.

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

2. Move your rules into src/game.ts

Port one entity or rule at a time as declarations. An enemy your server spawned becomes a prefab, and a timed event becomes a system:

src/game.ts
import { prefab } from "@netforge/engine";

prefab("raider", { model: "style.lowpoly.bat", health: 30, speed: 4, radius: 0.4, damage: 6, ai: "chase" });

See The typed game API for what the declarations cover.

3. Test it headless, then with people

npm test
npm run play -- --host 0.0.0.0

npm test plays the game with bots and no browser. The second line lets phones and laptops on your network join through your computer.

4. Decide where it runs

The public repository's room host (in @netforge/kit-play) is built for your own computer and network: one process, play money, no lag-compensation history. For a game on the internet, publish it through the hosted Net Forge service. See Deploy and host your game.

What Net Forge does not replace

  • Arbitrary server code. Net Forge rooms run Net Forge games; src/game.ts may import only @netforge/engine. If your server does work outside the game's rules, keep it in a service of your own.
  • Native clients. Net Forge is browser only.
  • Self-hosted production fleets from the public repository. The local host is not a production server.

FAQ

When did Hathora shut down?

Hathora's game server hosting shut down on 2026-05-05, after an announcement on 2026-03-04, according to Gameye and Supercraft, both of which sell competing hosting.

What is a Hathora alternative for browser games?

For a browser game in one of Net Forge's ten genres, a Net Forge template gives you the server and the client together. To keep your own TypeScript server code, Colyseus is a room framework with managed hosting in Colyseus Cloud (Colyseus docs).

Can I run Net Forge rooms on my own servers?

The public repository's host runs on one machine and is meant for local and LAN play. The production room server is the hosted Net Forge service.

Do I have to rewrite my client?

Yes, if it is not a three.js game. Net Forge templates bring their own browser client; your work is mostly moving rules into src/game.ts.