I'm making a dark fantasy game. Before opening an engine I built the part

that decides what's true: a simulation with no graphics, which runs a

province for two hundred years and produces a history nobody wrote.

Here's what it gave me. This is the simulation explaining why a noble house

ended. It worked out the causes itself, and every step is something that

actually happened in the model:

```

year 13  something takes hold in the wet ground north-west of Marwick

     33  the blight creeps beyond the marshes

     56  the blight has taken a tenth of the province

     68  Marwick brings in a harvest at 50% of what it needs

     68  Haelfell takes Marwick from Farreach

     68  the house of Farreach holds nothing, its line ends after 67 years

```

None of that is scripted. Each step only reads what the step before it left

behind.

## What's in it

Four systems, all simple, wired into each other.

**People.** Settlements have named residents with a trade, a family and a

memory. They marry, have children, get old. Lords are just residents who

inherited a seat, and they starve like anyone else.

**Goods.** Production is capped by land, not workers. Putting more people in

a village doesn't create more soil. Prices are local. There's no global price

table in the code, only stock against demand in each town.

**Houses.** They hold territory, inherit, feud, go to war. War resolves

against supply, so it sits downstream of the economy rather than beside it.

**The Rot.** A corruption that spreads across the map. 

That last one is the whole trick. It's the simplest thing in the project, a

number per tile that grows and spreads by contact, and it's what makes the

other three visible. It lowers what the land can grow. That starves towns,

which raises unrest, which weakens levies, which loses wars. Nobody watching

can see an economy solver. They can see a stain spreading on a map, and they

work out on their own that everything downstream of it is about to get worse.

## Three things I got wrong

**Population grew forever.** Production scaled with workers, workers scaled

with population, so the surplus never changed. One village hit 49,000 people

in sixty years. Fixed by giving land a carrying capacity, which is also what

makes the Rot dangerous. It lowers a ceiling people are already standing on.

**The Rot didn't spread.** I wrote it as gradient diffusion first. Diffusion

conserves what it moves, so a fixed source reaches equilibrium and stops. I

got a static halo about five tiles across that sat there for two hundred

years and never threatened anyone. A blight doesn't equilibrate, it

reproduces. Now it seeds neighbours by contact and also grows in place once

it's rooted, and that turns a stain into a front that moves.

**Fertility got applied twice**, once in the land's capacity and again per

farm worker. That squared the Rot's effect and killed every province by year

175. Fixing it meant giving the highlands ground the corruption can't take

hold in, which turned the last fifty years into a crowded fight over the

only clean land left. Better than what I'd designed. I got there by fixing a

bug.

## What it actually produces

Over two centuries a province goes from about 8,600 people to about 3,200.

Towns mostly don't disappear, they hollow out. Gallrow drops from 813

residents to 68. Grain roughly quadruples.

The thing I didn't expect: almost nothing gets abandoned. I tried making the

land four times harsher and still only 3 towns out of 64 ever emptied,

because people leave before they starve. Migration acts as a pressure valve.

I could have forced a catastrophe by breaking the model, but attrition turned

out to be the better story anyway. Half the roofs empty, and someone old

still living there who remembers when they weren't.

Press play and watch it spread. Seed 10 is the interesting one. Its highlands

held, so its houses were still standing after two hundred years. Same rules,

different geography, completely different outcome.

## Where it goes

The simulation has no engine dependency and won't get one. It knows what's

true about the world and nothing about how it's drawn. Unreal will render

what it reports and own none of it. That split means about 70% of the game is

testable from a terminal, and it survives an engine migration untouched.

Next job is porting it to C++ so it can run live with a player inside it,

instead of being a recording you walk through.

Happy to answer anything about how the systems work.

Published 25 days ago
StatusPrototype
PlatformsHTML5
Authorcpquack
GenreSimulation
AI DisclosureAI Assisted, Text

Development log

Leave a comment

Log in with itch.io to leave a comment.