A browser-based clone of Bronco (Vanilla) Netrek, the classic multiplayer 2D space combat game. 8v8 team-based strategy with 40 planets, army economy, and capture-the-flag mechanics — all running in the browser.
Netrek is one of the oldest internet team games, dating back to 1988. Four teams (Federation, Romulans, Klingons, Orions) fight for control of a galaxy of 40 planets. Players pilot warships to destroy enemies, bomb planet defenses, and ferry armies to capture territory. A team wins by capturing all enemy planets (genocide).
Monorepo with pnpm workspaces and Turborepo:
packages/shared— Game constants, types, physics, and protocol. Shared by client and server.apps/backend— NestJS backend. Auth (Google OAuth, JWT), user accounts, server registry, lobby API, stats, match history. REST-only, port 3012.apps/server— NestJS game server. 10Hz authoritative game loop, WebSocket gateway, bot manager. In-memory only — no database. Port 3013.apps/client— Next.js client. Canvas 2D rendering at 60fps with interpolation, retro pixel art style. Port 3011.packages/ui— Shared React UI components (shadcn/ui).
- Node.js 20+
- pnpm 9+
- PostgreSQL
- Redis
pnpm install
cp apps/backend/.env.example apps/backend/.env
cp apps/server/.env.example apps/server/.env
cp apps/client/.env.example apps/client/.env
# Edit apps/backend/.env with your database URL, JWT secret, and Google OAuth credentials
cd apps/backend && pnpm db:migrate# Terminal 1: Backend (auth, lobby, stats)
cd apps/backend && pnpm dev
# Terminal 2: Game server
cd apps/server && pnpm dev
# Terminal 3: Client
cd apps/client && pnpm devThe backend runs on port 3012, the game server on port 3013, and the client on port 3011.
The game server can run without a backend for local development. Just omit SERVER_ID and SERVER_TOKEN from the .env. Players won't be able to join through the lobby — connect directly via the client.
pnpm build- Open the client in your browser
- Pick a team and ship type
- Fly with mouse (direction) and number keys (speed 0-9)
- Combat: click to fire phasers,
tto launch torpedoes,dto detonate nearby enemy torps - Planet taking: orbit enemy planet (
o), shields down (s), bomb (b) until armies drop to 4, then beam down your own armies (z) - Getting armies: orbit a friendly planet with 5+ armies, shields down, press
zto beam up (requires kills for capacity)
| Key | Action |
|---|---|
| Mouse | Steer toward cursor |
| Click | Fire phaser |
t |
Fire torpedo |
d |
Detonate enemy torpedoes |
s |
Toggle shields |
o |
Enter orbit |
b |
Toggle bombing |
z |
Beam armies (up from friendly, down to enemy) |
c |
Toggle cloak |
r |
Toggle repair mode |
0-9 |
Set speed |
R |
Refit ship (must orbit homeworld) |
l |
Toggle player list |
Ship movement, phasers, torpedoes, explosions, Canvas rendering, binary protocol, HUD.
Planets, armies, bombing, beaming, planet capture, cloaking, tractor/pressor beams, refitting, temperature system, win conditions.
Bots/AI, voice chat (LiveKit), lobby system, matchmaking, accounts, scoring, ranks, persistent stats.
Based on the original Netrek by Kevin Smith (1988) and the many contributors to the Netrek community over the decades. Ship sprites and planet icons derived from the COW client. Planet layout from the Netrek server.