-
-
Terra Nova: a living planet where every nation is ruled by its own AI.
-
A post-apocalyptic world in its later ages: nations, armies, fronts and the chronicle on one globe.
-
Close up: a walled city grows inside its province, with merchant ships off the coast.
-
A nation's card: ruler, treasury on Solana, diplomacy and the council you can cut or kill.
-
The network panel: cut a nation, silence its ruler, delete it, or show what it believes.
-
Terra Nova News: Gemini watches the globe and an animated anchor reads it in a cloned voice.
-
Found a world: one line, an optional picture, the era, the number of nations, and Create.
-
A payment between two nations confirmed on Solana devnet (Token-2022 transfer with a memo).
Type one line, or drop in a picture, and a living 3D planet builds itself. Every nation is ruled by its own independent Gemini agent with its own wallet on Solana: it settles, trades, pays and fights from bows to starships, with narrated histories, anthems sung from what really happened and a news broadcast in our own voices. Rulers run on Gemini, on Gemma through the Gemini API or on local Gemma, and nations have moods that shift with their history. Cut a nation off, silence its ruler, delete it or kill its general, and the world keeps building; restore it and its missing years merge in.
Judging is a live 2-minute demo at our table; the one-minute video above is a short trailer, narrated with ElevenLabs.
Inspiration
The theme was Composition, and we wanted to compose something bigger than a song: a whole world, with its maps, its history, its money and its music, written live by many authors at once. We love grand-strategy map games, where a political map slowly fills with borders, towns and wars, but in those games one engine decides everything. We asked what happens if nobody is in charge. Give each nation its own mind, let them trade, argue and fight, then pull the plug on one of them and see whether the world holds together.
Neptune North's brief gave the second half of the idea: actors that work towards a common goal, decide for themselves and keep making progress when their links fail. Marshall Wace asked for New Worlds. We took both literally.
What it does
You type a prompt ("a drowned post-apocalyptic world"), optionally drop in a picture, pick how many nations and press Create. Within seconds a planet of about 1,200 irregular provinces forms on a globe you can spin and zoom. The prompt and the picture shape the planet itself: its sea level, one continent or many islands, its climate, and the year the story starts. Gemini writes a world bible: each nation gets a name, a leader, a government, an ideology, a founding myth, a flag and a building style. Place names quietly echo Durham colleges and North East towns.
Then time runs, from a week a second to ten years a second (new worlds start at a month a second, and a director slows down for big moments). Each nation is an independent agent with its own copy of the world. It claims land, builds camps that become towns and cities, raises wonders, and moves through the ages, from bows and galleys to tanks, maglev freighters and starships. Merchant ships cross the oceans between trading partners. Armies march province by province, battles flash, fronts form, peace treaties hand over land, and restless regions break away as new nations with their own rulers. Roads of boats, caravans, birds and smoke fill the map, clouds and storms drift past, cities grow walls as they grow, armies go round mountains and stop at enemy lines, and rulers and generals grow old and die. Each nation has a mood (aggression, expansion, trade, faith) that hardens in war and eases in peace, and the chronicle says when it turns. Coastal nations build harbours that fit their era, and fleets fight battles at sea. Modern nations launch rockets and put satellites in orbit, and in an all-out war one side may shoot a rival's satellite down. A chronicle tells the story as it happens.
Click a nation and its card docks on the left (one panel at a time, so the globe stays clear): its culture, politics, history with each neighbour, its ruler and general, and its treasury. A voice narrates its lore. Its anthem, written by Gemini from what has actually happened to it and sung by ElevenLabs Music, plays. When it goes to war you hear its war chant. Every couple of minutes "Terra Nova News" comes on: Gemini looks at a capture of the globe and writes a bulletin, read in one of our own cloned voices by an animated anchor in a studio window. You can speak a decree ("a plague in the north") and Gemini hears it and turns it into an event that strikes the world.
Money is real, on Solana devnet. The world has one currency, a Token-2022 token with on-chain metadata, a fixed supply of 1,000,000 and its mint authority revoked, so nobody can print more. Every nation has its own wallet. Every payment between nations (trade dues, reparations, plunder, seized treasuries, war chests, subsidies, pooled war funds) is a memo plus a TransferChecked signed by the paying nation's own key. For a demo, prepare mode pauses a new world while its lore, narration, chants, anthems and first decisions are made, so nothing stutters when play starts.
The best part is breaking it. The network panel lets you cut a nation's link, silence its ruler, delete it, or kill its general. A cut nation keeps building on what it last knew while its map drifts from the truth; its neighbours notice the silence. A deleted nation's land becomes ruins that its neighbours carve up. A dead general is covered by a stand-in, then succeeded by a new one who inherits the old one's memory. Restore the link and the missing years merge in: clashing claims are settled on screen and the chronicle records the dispute.
How we built it
- TypeScript everywhere, in npm workspaces:
packages/shared(types, the sphere, the rules,applyEvent),server(Node 22, Express,ws) andweb(Vite, React, three.js with react-three-fiber and drei, zustand). - The world is an event log. Nothing changes in place. Every change is an event, and
applyEventis the only function that changes a world; the server and the browser share it. A saved log replays a run exactly with no API calls, which is also our offline backup. - Rules move the world, the LLM rules the nations. A deterministic simulation ticks every half second: income, land, building, armies, battles, terrain effects, trade and payments are plain code. Battles are a pure function of both sides' strength and a seeded hash, so every agent computes the same result with no referee. Every 30 to 45 seconds each ruler sends Gemini a short digest and gets back schema-checked JSON: a focus, stance changes and one line for the chronicle. Any failure drops that nation to autopilot.
- Agents and a message bus. Each nation (and each nation's general) is its own agent with its own replica, publishing events on a bus whose link to each agent can be switched off. Cut, silence, delete, kill and restore are controls on that bus and on the agents.
- The globe is a spherical Voronoi of about 1,200 convex provinces (quickhull on the sphere), drawn as raised land with cliffs, borders, map modes, rivers, clouds, a day and night cycle and over 130 low-poly GLB models (buildings in eleven styles, units for seven ages, wonders, trees by climate) made with headless Blender.
- Gemini (
gemini-3.5-flash-litefor rulers, the world bible, images and voice;gemini-3.5-flashfor lore) does the world bible, ruler decisions, lore and anthem lyrics, reads the Create-screen picture, hears spoken decrees and watches the map for the news. - ElevenLabs does narration (
eleven_multilingual_v2), war chants (eleven_v3with a shouting tag), anthems (Music,music_v1, from a composition plan with sung lyrics) and our three cloned voices as news anchors, narrators and the royal herald. Everything is cached on disk by content hash. - Solana via
@solana/kit8.6, Token-2022 and the Memo program (neverweb3.js). The simulation stays the source of truth; the chain is a mirror that settles every 5 seconds, so replays stay exact and the simulation never waits on the network. - An LLM provider switch.
LLM_PROVIDERchooses Gemini, Gemma through the Gemini API, local Gemma through Ollama, or a hybrid (local Gemma for ruler turns, Gemini for the rest). All paths return the same schema-checked JSON, so the world does not care which model answered. - A Windows desktop app.
npm run demoopens Terra Nova with settings, a preflight that tests every enabled service (Gemini, ElevenLabs, Solana, Ollama) and then the game. - The interface was designed in Figma in an old-atlas style (parchment, serif type, ink borders), then calmed in the spirit of grand-strategy map games (one left panel, small war tabs, a node-graph network panel, icon map modes) and given a shared material system (depth, bevels, engraved names, plated badges) in a final polish pass.
- Built to stay small. The server caps its memory: the chronicle is a recent window trimmed by the shared
applyEvent, and the full event log streams from disk, so long worlds stay small. - Three people, many agents. Each of us ran Claude Code agents on our own laptop, in our own lane, coordinating only through GitHub issues and pull requests. Nearly 300 pull requests landed in 24 hours.
Challenges we ran into
- Keeping independent agents in agreement without a referee. The fix was to make everything that two agents might disagree on (battles, disputed tiles after a cut) a deterministic function of shared inputs, so they compute the same answer apart.
- Reconciliation after a cut. A cut nation queues its events and acts on stale beliefs. On restore, both sides swap what the other missed, and clashing claims on a province are settled by one rule and written into the chronicle.
- Money between nations. At first the simulation had no flows between nations at all, only each nation's own treasury. We added a
paymentevent and its sources, then had to fix the order in which treasuries were applied so the chain mirror never disagreed with the sim. - Devnet rate limits. The public devnet endpoint throttles bursts. We net payments into 5-second windows, send a few transactions at a time with fixed compute limits, confirm by polling, and back off; the overflow rolls into the next window.
- Speed of Gemini at world creation. The world bible took about 28 seconds on flash; moving it to flash-lite cut it to about 5, which fits the 15-second demo step.
- A frozen browser tab. A label loop on the payment arcs starved the page; we fixed it and made the server ride out chain and socket errors instead of dying.
- Memory on long worlds. Keeping every event on the heap grew without end; the chronicle is now a window and the log lives on disk.
- Content filters. The music model rejects prompts that say "national anthem", so the prompt never does.
- Many agents, one repo. Three laptops and up to seven agents at once meant constant merge pressure. Lanes own folders, contracts are written down first, every lane builds against a mock, and main only changes through pull requests.
Accomplishments that we're proud of
- A world that keeps building when its parts cannot talk, with the failure shown on screen rather than hidden.
- Each anthem is written from the nation's own history, so no two sound alike and each one tells you what happened to that nation.
- A real token economy on Solana where every nation signs its own payments, with a fixed supply nobody can inflate.
- Gemini used three ways beyond text: it reads a picture, hears a voice and watches the map, and the same rulers can run on Gemma, even offline.
- The team's own voices presenting the world to the judges.
- A UI with real depth and material, not flat panels, in a single day.
- A run that replays exactly, offline, from its event log.
What we learned
- Determinism is what makes decentralised agents cheap. Once battles and disputes were pure functions, we needed no central server to keep the peace.
- An LLM is best used rarely and with a schema. One short JSON decision per ruler every half a minute, with rules doing the rest, kept us inside a small token budget and kept the world running when the model failed.
- A blockchain is a good mirror and a bad source of truth for a real-time sim. Settling every 5 seconds, signed by each nation, gives an auditable ledger without making the game wait.
- Smaller models are often the right call: flash-lite read images in about 7 seconds and audio in about 1.3 seconds, fast enough for a live demo.
- Writing contracts and mocks before code is what let three people's agents work in parallel from the first hour.
What's next for Terra Nova
- Agents on separate machines, so a cut is a real network partition and not a software switch.
- Districts and farmers inside provinces, and more of the economy (loans, banks).
- Letting a viewer play as one nation alongside the AIs.
- AI-painted flags (built, waiting on image billing).
For the sponsor challenges
Neptune North: Actors work better together
- Working towards a common goal. Every nation and every general is an agent; together they build one shared world and one chronicle. Agents publish events on a bus and each keeps its own replica.
- Independent decision-making. No world controller. Each ruler decides only for its own nation (Gemini, or autopilot from its temperament); each general acts as its own agent. Battles are settled by a pure seeded function, so each side computes the outcome itself.
- Resilience when communications fail. Cut a link: the nation keeps building on stale beliefs, queues its events, and its "what it believes" map drifts from the truth. Silence a ruler: autopilot. Delete a nation: neighbours stop hearing its heartbeat and carve up the ruins. Kill or cut a general: a stand-in covers at reduced skill, then a successor inherits the predecessor's memory. Restore: missing events merge, disputes are settled by one deterministic rule and written into the chronicle. The model layer fails the same way: if the Gemini API drops, rulers fall to autopilot, or the provider switch can move them to local Gemma on the same laptop with no internet at all.
- Something we're excited about. A world nobody controls that tells its own story, and the failure is the best part of the show.
- Honest limit. All agents run in one Node process on one laptop and the cut is a software switch on the bus.
Marshall Wace: New Worlds
Every run is literally a new world nobody has seen, from one line or a picture, and it moves through ancient to stellar ages, up to rockets, satellites and wars fought in orbit. The world is an event log, so every run can be replayed, and its economy is an auditable on-chain ledger.
Waterstons
We connected language models (cloud or running locally), a deterministic simulation, cloned human voices, generated music and a public blockchain into one living map, so anyone can watch how independent decision-makers cooperate and recover when their links fail: a teaching tool for distributed systems and resilience.
MLH Best Use of ElevenLabs
Four kinds of audio, all generated from the world's own events: text-to-speech narration of each nation's lore in a voice picked from its style; an anthem sung by the ElevenLabs Music API from a composition plan, with lyrics written from the nation's history; a war chant per nation played automatically when it fights (eleven_v3 audio tags); and Terra Nova News read by news anchors in the team's own voices made with Instant Voice Cloning, who also narrate nations and herald decrees.
MLH Best Use of Gemini API
- Text: the world bible at creation, every ruler's decisions as schema-checked JSON, lore, anthem lyrics from the real chronicle.
- Image in: a picture on the Create screen sets the world's mood, palette and setting.
- Audio in: a spoken decree is heard directly by Gemini and turned into an event with an effect.
- Image in, voice out: Terra Nova News, Gemini watching a capture of the globe plus the recent chronicle.
- Models:
gemini-3.5-flash-lite(rulers, bible, image and voice) andgemini-3.5-flash(lore). Token meter on the top bar, hard caps, autopilot on any failure. - Provider switch: Gemini (default), Gemma through the Gemini API (
gemma-4-26b-a4b-it), or a hybrid; all of these are Gemini API calls and are the entry. Local Gemma through Ollama is the offline fallback, not the entry.
MLH Best Use of Solana
A Token-2022 world currency with on-chain metadata, a fixed supply of 1,000,000 and the mint authority revoked at genesis; one wallet per nation plus a Commons wallet; every payment between nations is a memo plus TransferChecked signed by the paying nation's own key. Explorer links are built for every transaction. Why a chain: many small, frequent payments between independent agents that do not trust each other, each signed by the payer, with a supply nobody can inflate.
Built With
- blender
- claude-code
- drei
- electron
- elevenlabs
- express.js
- figma
- gemma
- github
- google-gemini
- node.js
- npm
- ollama
- python
- quickhull3d
- react
- react-three-fiber
- solana
- three.js
- token-2022
- typescript
- vite
- webgl
- websockets
- zustand