Civitas:一款基于浏览器、使用 three.js 和 TypeScript 开发的多人城市建造游戏,其中每一位市民都经过模拟。由 Claude Code 构建。AGPL-3.0。
AI 翻译
Civitas: a browser-based multiplayer city builder in three.js and TypeScript where every citizen is simulated. Built with Claude Code. AGPL-3.0.
游戏TypeScript · CSSGitHub @reneodlt在线运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗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.
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). The page is a home page with three ways in (docs/demo.md, "The home page"):
?demo=<id>, read-only on a public showcase./play/, saves live in this browser (docs/local-mode.md).packages/server/servers.json (ours is listed as closed until sign-in exists), and on a dev or UAT server "This server's live world" with the mayor-name join form, folded.Above these sits a showreel strip: ten building thumbnails, three short clips of the Showcase and three lines on how it plays, all pre-rendered (so the page has no WebGL) by node packages/client/scripts/showreel.mjs into packages/client/src/showreel/ (docs/demo.md, "Showreel").
Every browser that joins a live world shares it. A link with any query (?demo=london, ?name=Ana, ?ws=host:port, ?local, ?at=x,y) skips the home page and opens the game as before; /?go is the game's bare page (the join form, or DEFAULT_DEMO).
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.
Landmarks (a famous building, a town hall, a monument): docs/landmarks.md is a brief a person or a model can follow on its own, with a template, a worked example and a draft path (landmark-drafts.ts, viewer tag draft); npm run landmarks:check checks them.
Production: npm run build (add npm run build:local for /play/) then npm start. The server then serves the built
client, the offline build under /play/ and the WebSocket on one port (default 8080). A Dockerfile is included;
mount /data to keep the world across restarts.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗