---
title: "Civitas"
url: "https://aigamehub.app/en/games/civitas-f09314"
source: "https://github.com/reneodlt/civitas"
source_type: "github"
play_url: "https://civitas.reneo.app"
platform: "desktop"
login_required: false
pricing: "free"
origin: "original"
ai_tools: ["Claude Code"]
game_languages: ["en"]
author: "reneodlt"
author_handle: "reneodlt"
category: "Simulation"
categories: ["simulation"]
tags: ["city-builder", "multiplayer", "open-source", "three.js", "typescript"]
added: "2026-10-19T13:22:30.741Z"
updated: "2026-10-19T13:22:30.741Z"
locale: "en"
content_locale: "en"
---

# Civitas

Civitas is a browser-based multiplayer city builder built with three.js on the client and an authoritative TypeScript simulation server over WebSockets. Players buy and manage land parcels, zone land, build roads and set tax rates; citizens are simulated individually, living where they spawned, finding the nearest job on the connected road network, commuting daily, and paying income tax to the parcel owner where they work and property tax to the owner where they live. It runs in the browser and can also be self-hosted via the repository.

## Description

Civitas (also titled msimcity in the README) is a web-based, multiplayer, unbounded city builder. The client uses three.js; an authoritative TypeScript simulation server communicates over WebSockets, with a shared package defining the world format for both sides. Players buy and manage land parcels, but citizens are not owned by players: a citizen lives in the residential building that spawned it, seeks the nearest job anywhere on the connected road network, commutes there every day, and pays income tax to the owner of the parcel where it works and property tax to the owner of the parcel where it lives. Competition and cooperation happen through zoning, roads and tax rates rather than walls. Multiple browsers joining the same server share one world. Buildings are defined as data files compiled into the tables the game reads, and a viewer page displays every kind, level and design. The project is AGPL-3.0 licensed and can be run locally with npm install and npm run dev, or in production with npm run build and npm start; a Dockerfile is included and the world can be persisted by mounting /data. Environment variables cover port, host, seed, world file and static directory, and a read-only showcase mode (SPECTATE=1) is available. The author states the project was built with Claude Code.

## Original post

Civitas: a browser-based multiplayer city builder in three.js and TypeScript where every citizen is simulated. Built with Claude Code. AGPL-3.0.

Topics: city-builder, claude-code, game, multiplayer, simulation, threejs, typescript

# msimcity A web-based, multiplayer, unbounded city builder platform. three.js on the client, an authoritative TypeScript simulation server over WebSockets, and a shared package so both sides agree on the world format. The core idea: players buy and manage **land parcels**, but **citizens are not theirs**. A citizen lives in whichever residential building spawned them, looks for the nearest job anywhere on the connected road network, commutes there every day, pays income tax to whoever owns the parcel they work in and property tax to whoever owns the parcel they live in. Players compete and cooperate through zoning, roads and tax rates, not through walls. ## Run it ```sh npm install npm run dev # server on :8080 and Vite client on :5173, both bound to 0.0.0.0 ``` Open `http://<your-lan-ip>:5173/` (the Vite banner lists the addresses), pick a name, and you are in. Every browser that joins shares the same world. Buildings are data: `packages/shared/src/buildings/` holds one file per kind family, and `npm run buildings:compile` (run automatically by dev and build) turns it into the tables the game reads. `/viewer.html` shows every kind, level and design on a turntable by day and night. Format and a worked example: `docs/buildings.md`. `npm run buildings:check` is its snapshot test. Production: `npm run build` then `npm start`. The server then serves the built client and the WebSocket on one port (default 8080). A `Dockerfile` is included; mount `/data` to keep the world across restarts. Environment: `PORT`, `HOST`, `SEED` (new worlds only), `WORLD_FILE`, `STATIC_DIR`. Dev knobs: `SIM_STEPS=10` fast-forwards (ten simulation ticks per interval), `SEED_BUILT=3` starts a new world with the Commons already built to that level, and a file named `RESET` next to the world file makes the next start discard it. Client: `VITE_WS_URL` to point at a server on another host, or `?ws=host:port`. `TEST_CITY_BASE_PORT` (default 8100) moves the test-city ports. A public showcase (`docs/demo.md`, "A public showcase"): `SPECTATE=1` makes the whole deployment read-only for every client, the live world and every demo child alike (the children inherit it). The server refuses every intent that changes the world with a "Read-only showcase" toast (a whitelist in `net.ts`, `READ_ONLY`: subscriptions, inspects, the lines list, the charts), and the HTTP API refuses demo stop and reset and test-city start and stop (403); starting a demo still works, as that is how a visitor gets in. The page hides the tool bar, the treasury, the tech tree, Reset demo and the context menu's changes, and joins at once as a made-up "Visitor 1234" instead of showing the join form. `DEFAULT_DEMO=<id>` (e.g. `london`) sends a page opened without `?demo=`, `?ws=` or `?city=` to that demo instead of the live world, and the server starts it as it starts; with `SPECTATE` it is then the only demo the server lists, starts or joins (a `?demo=<other>` link opens it instead). The page reads both from `GET /api/
