The Capitol
An online game where the economy is the whole game. No combat: you gather, craft, trade and build in one shared world, a city of rings round a tower with farms and mountains beyond. Everyone starts at the edge with nothing and works inward, alongside citizens: AI players who earn everything a person does. A Rust server runs the world, and a 3D client on my Flint engine lets you stand in it.
Clips
The wilds at dawn
From the southern massif's summit, east along the ranges. The land is a height field the server and the client share. The water runs down from it: rivers, streams and lakes, worked out from the height. Mist lies in the valleys at dawn and dusk, and the far ranges go blue in the haze.
Farms on lanes
The north-west farms at midday, down the arterial to the tower. Half the sectors have straight roads and half have winding lanes, laid out round the water running in from the wilds. A claimed farm grows a farmhouse and a barn.
The bazaar at dusk
In through the arch and down the lane. Each stall is one of five kinds: an open stall, a tent, a cart, a shopfront or a kiosk. Every kept stall has its shop's name painted on its sign, and the lanterns come on at dusk. The shops and the citizens strolling the lane are a scripted sample, played without a server.
Stations at work
A row of stations running recipes from their own boxes while their owner is away: forges burning, a kiln with its box full, a workbench and an anvil. A running station glows and smokes, and a paused one dims. It's a scripted sample.
A street fills in
Eight lots on a suburban street are claimed at once, and each house goes up over four seconds: a timber frame, then the walls, then the roof. Every choice, from the storeys and the roof to the colour of the render, is seeded from the plot's id, so everyone sees the same house on the same lot.
One day over the suburbs
The same view at six hours, dissolved together: dawn mist, noon, late afternoon, evening and night. The light follows the server's clock, so everyone in the world shares the same hour. As it gets dark the windows of claimed houses come on, and the tower's lantern burns at the crown.
Screenshots
About
The Capitol is an online game where the economy isn’t a side system. It’s the whole game. There’s no combat. You get ahead by gathering, crafting, trading and building machines that work while you’re away. Everyone plays in the same persistent world, so every price you pay was set by another player.
Every item has a quality from 0 to 100, graded A to F, and quality carries down the production chain. Rope made from good fiber is better rope, and a workbench made from good rope does better work. The tool in your hand counts too, and it wears as you use it. A stack shows its average, but every unit keeps its own quality and the mark of whoever made it. A player who cares about every step can sell something nobody else can make, and the market can tell.
The money works the same way. The currency is the Strand, and it’s backed by Fiber, the grass that grows everywhere. One Strand is one Fiber, and about a second of gathering earns one. No computer-run shop prints money. Every Strand in the world came from someone’s work.
Start with nothing. End with everything.
The Shape of the World
The world is a city of rings, 13,600 units across. At its centre stands the Capitol, a modern tower inside a medieval keep. Around it come:
- the Bailey and the Trade District, with the Exchange hall and the bazaar
- the Guild District and its 72 guild halls
- the urban grid
- about 1,900 suburban lots on post-war street plans
- the farms
- the wilds, out to the edge of the world
A moat and two canals divide the inner rings, and the only ways across are the bridges.
A new player starts at the edge with nothing. The first goal is to earn enough for a deed, walk inward to register it, and choose where to put down roots. Near the centre you’re close to the markets, but space is tight. Out in the country there’s room, but every trip to market takes longer. Land isn’t free once you hold it, either. Every plot pays property tax by the hour, and a plot four weeks behind is foreclosed and goes back on the market.
The wilds are new this month: a ring of mountains between the farms and the edge of the world.
- The land. It rises in eight massifs from a height field that the server and the client share. Their valleys open on the city’s arterial roads, and wild trails run up them.
- The water. Water runs down from the land: rivers, streams and lakes, worked out from the height. Rivers and lakes stop you, except at a ford or a trail bridge. Streams you wade. Steep ground slows you, and a cliff stops you.
- The resources. Old growth grows on the valley floors, stone on the scree, clay on the banks, and iron, copper and tin high on the rock. The further out and the higher up you go, the better the quality.
- The look. From the city the ranges stand blue in the haze, and at dawn and dusk mist lies in the valleys.
The farms were relaid this week, as farms of about 120,000 square units on lanes. In four of the eight sectors the roads run straight, like concession roads. In the other four they wind. The fields lie between them, and the whole layout keeps clear of the water running in from the wilds.
The suburbs were rebuilt earlier in the autumn, modelled on how post-war American suburbs were actually planned. You start from the lot, not the road. A lot is about 60 by 110, two lots back to back plus a street set the spacing, and the streets follow from that. Each wedge between two arterials gets one of three plans:
- gently warped parallel streets
- a loop with cul-de-sacs
- a central loop with cul-de-sacs pointing out
The ground left over becomes parks.
Standing in It
Until this autumn, The Capitol was a flat map drawn by a web client in React and a second client in LÖVE. In October I started a third client on Flint, my own 3D engine. It reads the same server, so everyone walks the same streets. A few ideas shape how it looks:
- The tower is always visible. From anywhere in the world you can see which way is “up in the world”. At dusk its windows are lit and a lantern burns at its crown.
- The city fills in as people build. Every claimed plot grows a house, everyone’s, not just yours. At night their windows come on, so you can read from above where people have settled.
- The world keeps one clock. Day and night follow the server’s time, so everyone sees the same dawn.
- Water draws the city. The moat and canals use the ocean from Float, held inside the canal walls. Out in the wilds the rivers run downhill in their beds, the fords riffle, and the rivers at the rim run off the edge of the world.
- Grass is the economy’s raw material, so it’s everywhere. The fields are real grass, grown on the GPU, with a clearing round each tuft you can gather.
What Works Today
You can make an account and walk into the live world. Clicking the ground walks you there, and the land and its water decide whether you get through. You can:
- gather fiber, wood, stone, clay and reeds, and ore in the wilds, with a tool that wears as you use it
- craft from 37 recipes at six kinds of station: workbench, sawbench, kiln, forge, anvil and storage chest. Tools come in four kinds (sickle, axe, pickaxe, hammer) and three tiers.
- claim a plot and watch your house go up on it
- place stations on your land, share them with other players, and set them to run a recipe from their own box while you’re away. They glow and smoke while they work.
- trade at the Exchange: one order book for the whole world, by grade, with every order held in escrow and price charts for each grade
- trade hand to hand. Both sides draft an offer, and both have to accept.
- rent a stall in the bazaar by the day, name your shop and stock it. Its name is painted on its sign.
- read the Capitol Gazette. A new edition comes out every game day, with the prices that moved, the finest sale and who made it, the deeds claimed and lost, and the busiest hands.
Citizens are the newest part. They’re AI players, run by their own process, and they live in the world on the same terms as people.
- What they do. They gather, craft, build, trade and keep stalls, and they keep human hours.
- What they get. No grants: they earn everything a person does.
- How you tell. Each carries a pale, steady lantern, and the Gazette names them as citizens, so you always know.
- Why. With one human on, a world this size would be empty. Citizens make it feel inhabited, and they stress-test the economy at the same time. A soak with 200 of them balanced every Strand and every unit.
- How they decide. Every decision goes through one cascade: rules first, then a fast choice model when the rules aren’t sure.
I also tried Claude as a layer on those decisions. It agreed with the cheaper layers almost every time, and at many times the cost. So decisions stay with the rules and the small model. Language models are being kept for what citizens say, which is next.
Next:
- Citizens with voices.
- A second way to move. An over-the-shoulder action camera with WASD and a gamepad, played side by side against click-to-move to choose between them.
- Property tax that bites.
How It’s Built
-
One server, any window. The world exists only on the server, a Rust and Axum service on a 100 ms tick. Clients send commands and get events back over a WebSocket. The wire format and the shared rules are one Rust crate. The server and the 3D client both compile against it, so walking, water crossings and grades are worked out the same way on both sides. Every message type has a JSON fixture that must round-trip byte for byte.
-
Generated, so everyone sees the same thing. Everything below is generated from seeds and ids. The default world is pinned by a version hash, so a change that moves it has to say so.
- the roads, neighbourhoods and farms
- the wilds’ height field and water
- the houses
- the sounds
The generators have their own test harnesses, which draw each plan as an SVG and check it against targets.
-
Rust for the wire, scripts for the feel. The 3D client’s networking and state live in a crate with no engine in it, so they test fast and headless. The same crate drives the citizens. The camera, the HUD and the floating names are Rhai scripts.
-
The engine grew to fit. Flint had no networking, no text input and no way for a game to add its own code. Since then the game has needed more than thirty engine changes, each merged upstream with a design record of its own, among them:
- compute grass
- shoreline foam
- aerial haze
- world text painted on signs
- sound that falls off with distance
Any limit the game hits becomes an issue, so the fix goes into the engine rather than around it.
-
Built with Claude. Like my other recent projects, The Capitol is built in close collaboration with Claude, Anthropic’s AI model: 380 of its 470 commits are co-authored. I set the direction and the taste and made the calls. The work is a queue of GitHub issues, about 300 closed so far, and several Claude sessions on more than one machine work through it at once. A session claims an issue by pushing a git branch, which only one of them can win. It lands its work only after the checks pass again on top of everyone else’s.
How These Were Made
Every image and film here came from the client’s own capture mode, rendered offline from a saved copy of the world. Each one is a keyframed camera path, and each frame advances the game clock by exactly a thirtieth of a second. The lit houses come from a sample that claims a share of the lots.
The samples are scripted:
- the gather
- the panels
- the citizens stood side by side
They’re played without a server. The films are cut by a script in the repository, and their sound is the game’s own: every sound in it is synthesized in code.
Technical Details
- Server: Rust (Axum, Tokio, sqlx), PostgreSQL and Redis, JWT auth with rotating refresh tokens, OpenAPI docs; about 64,000 lines with the shared protocol
- 3D client: Rust on Flint (wgpu, winit), egui for the panels with a custom theme, Rhai for the camera and HUD; about 91,000 lines of Rust and 2,800 of Rhai
- Citizens: a separate process on the client’s core crate, deciding through a cascade of rules and a fast choice model
- World: concentric rings with water and bridges, post-war suburbs, farms on lanes, a ring of mountains with rivers, lakes, fords and trails, procedural houses on every claimed plot, GPU grass, and terrain built into meshes at runtime
- Economy: 44 item types and 37 recipes, quality grades and maker’s marks, tools that wear, shared and automated stations, a commodity-backed currency, a global order book, a bazaar of rented stalls, a daily newspaper, and plots with deeds, hourly tax and foreclosure
- Testing: about 1,500 tests across the server, the shared protocol and the client, plus live tests that play against a local server