Devlog

What changed, what broke, and why

Cairnheim is made by one person. These are the notes I take anyway — the decisions that were hard, the bugs that were embarrassing, and the numbers behind both. Newest first.

11 September 2026

How the art actually gets made

The building sprites are generated. I use an image model, I pick from what comes back, and then the real work starts. I would rather write that here, in my own words, than have someone find it out and decide I was hiding it.

Here is what the honest version of that sentence looks like, because “I used AI” and “I pressed a button and shipped it” are not the same job.

A generated picture is not a game asset. A building in Cairnheim sits on an isometric grid. It has to occupy an exact number of tiles, meet the ground at an exact point, and sort correctly against everything in front of and behind it. What a model returns is an image on a square canvas with the drawing floating somewhere inside it. The sawmill’s artwork fills 46.4 % of its texture width, so it needs a scale of 2.09 for the drawing — not the file — to cover a 2 × 2 block. Every building in the game has that pair of numbers, measured, one at a time.

The construction stages were the hard part, and they are the reason this entry exists. Each stage has to occupy the same pixels as the finished building, because the game swaps one texture for another — a stage four pixels off makes the structure jump when it completes. Nothing about a generated image respects that. I ended up writing a tool that measures the distance between the silhouettes of two pictures and reports the offset, because doing it by eye cost an hour per building and still drifted.

The walk cycles needed rebuilding outright. A sheet comes back with frames at irregular spacing and inconsistent size; a script cuts it, recomposes it into a regular 5 × 2 grid and re-aligns the feet so the settler does not bob. The digging poses came back about a third smaller than the walking ones. A carrier who shrinks when he picks up a shovel is not something you notice in a gallery of pictures. You notice it immediately in motion, which is the only place this game exists.

Nothing is generated while you play. The game ships fixed files. No model runs on your machine, none runs on the server, nothing about your colony is invented on the fly, and there is no service that has to stay alive for the art to exist. What you install is what there is.

The sound is generated too — the four music tracks, the effects, the axe on wood, the pickaxe, the furnace, the general's voice when he gives an order. A few effects still carry a fallback synthesised in code with Web Audio, which is what plays if a file fails to load, but that is a safety net and not the game's sound.

I am not going to argue the tool is neutral, or pretend the choice costs nothing. If you would rather not buy a game whose sprites were generated, that is a completely reasonable position and I would rather you knew now than after paying.

But I will say what I think the actual test is. Open a screenshot of a busy colony and look at a junction: can you tell the sawmill from the bakery from the mine without reading a label? Does the queue at a cairn read as a queue? Does the half-built hall look like a hall waiting for its carpenter? That is the part I spend my time on, it is the part that decides whether this game is any good, and it is the part no model does for you.

Corrected a few hours after posting: the first version of this entry said the sound effects were mostly synthesised in code. That was the state of the game months ago and I wrote it from an out-of-date comment in my own source file without checking. The effects are generated. An entry about being straight with you is a poor place to be approximate.

artprocess

11 September 2026

Your colony keeps its own hours

A colony in Cairnheim does not stop when you close the game. Your carriers keep walking, your foresters keep replanting, and the shaft keeps bringing up stone while you are at work. That is the point of the thing — a logistics network you set up well should pay you back for hours, not only while you watch it.

Which means the colony cannot live on your hard drive. It moved onto a server this week, and that decision drags two consequences behind it that I would rather state plainly now than have anyone discover after buying.

What that buys. Other players' colonies are places you go. Visiting already ran on an earlier build of this engine — you sail to someone else's island and walk their road network, which in a game about logistics is the single most useful thing one player can show another. You steal their junction layout, or you work out why theirs is faster than yours. Guilds and guild objectives come after that. None of it survives a world that is a file on a hard drive, frozen the moment its owner closes the game.

You need a connection to play. If the server cannot be reached, the game refuses to open rather than starting you on an empty map — because an empty map would be autosaved ten seconds later straight over a colony that was perfectly intact.

There is one colony, and no save files. No quicksave, no reloading an hour ago because the last decision went badly. I am aware this is a real cost in a genre where save-scumming is half the fun for some players. It buys something I want more: choices that actually count, and a shared world where your colony is the same colony everyone else sees.

It also forces a rule on me that I think makes the game better anyway — nothing in Cairnheim may be both available at any moment and permanently unrecoverable. The next entry is what happened when I went looking for places I had broken that rule.

serversdesign

10 September 2026

Five clicks to kill a colony

I went hunting for dead ends — states a player could reach and never get out of. I found one immediately, and it was mine.

40 planks
what the starting chest holds
5 planks
the Woodcutter — the only source of logs in the entire game
2 planks
a Palisade. No prerequisite, no limit on how many you place
0 planks
what demolishing a finished building gave you back

Twenty palisades before the woodcutter — exactly what a player does when their instinct is to fence the village first — and the colony never has another plank, therefore never another woodcutter, therefore never another plank. Dead. Permanently. In about five clicks, in the first two minutes, with no save to go back to.

The fix is old and boring: tearing a building down now returns half its build cost, rounded down. Not all of it — at 100% you stop thinking before you place, and thinking before you place is most of the game. At 50% a mistake is a real loss you can still walk away from. Twenty palisades give back twenty planks: enough to start again, nowhere near enough to rebuild the same village.

The salvage is written into the confirmation box, too. An escape hatch nobody can see does not exist.

What stung is that the rule was already in the game, and had been for weeks — in one place only. Colonists never leave during a famine, and there is a comment next to that line saying why: it would create a spiral you cannot climb out of. I had understood the principle perfectly for food and never once applied it to materials.

economybugs

10 September 2026

Bandits you can see coming

There are two bandit camps on the starting map, and an objective that asks you to clear them. Players were not finding them. Not because the map is large — because a bandit camp looked like scenery. A cluster of tents among four hundred other props.

Three changes, in ascending order of how much I should have done them sooner:

Combat got rebuilt underneath all that. Three rules, none of which existed before: overkill is wasted — a hit kills at most one defender and the excess damage is thrown away, so a wall of cheap spearmen is a real strategy rather than a rounding error. Armour subtracts rather than scaling, which is what makes the heavy red bandits feel heavy. And a camp's palisade absorbs the first rounds, so you arrive with enough or you do not arrive.

I tuned this on a bench that ran every army composition against every camp shape, and the bench lied to me twice before I noticed why: it compared armies of equal headcount, and an archer costs 0.91 worker-minutes to field against 3.86 for a swordsman. Equal numbers was never the constraint. Equal cost is.

combatart

9 September 2026

Nothing is switched on

Four painted stages of the military school: a levelled yard with a crane and stacked timber, then a raised frame and scaffolded tower, then walls closed around the frame, then the finished hall with banners and lit windows.
The military school, start to finish. Same footprint, four paintings.

Until this week, putting up a building in Cairnheim meant watching a progress bar and then having a building. It worked. It was also the single most lifeless thing on the screen.

Every building now goes up in painted stages. A digger levels the ground first and leaves a bare yard; a builder then works through two to four painted states before the real sprite appears. Materials are not consumed on click — they are carried to the site by the same carriers that carry everything else, and spent on the last hammer blow. A half-built sawmill with planks stacked beside it is a sawmill waiting for its carpenter, and it looks like one.

The hard part was not the painting. It was that every stage has to occupy exactly the same pixels as the finished building — the game swaps one texture for another, so a stage that is four pixels off makes the whole structure jump when it completes. I ended up writing a small alignment tool that measures the distance between the silhouettes of two images and reports the offset, because doing it by eye was costing an hour per building and still drifting.

Thirty-eight buildings, all of them staged. The two exceptions are deliberate: the expedition mine, which a player plants on a vein and should appear at once, and the ruined shaft, which is restored rather than built.

artconstruction