The world gets ages
The problem was not that gating didn't work. It was that gating worked in exactly
one way, and that way does not scale.
Everything you can build has been gated by other buildings: a Workshop unlocks five
improvements, an Archery Range unlocks the Archer, a Library contains the Scribe
tech. That is a graph, and it had already grown to 33 improvements, 14 unit types
and 13 perks, gaining an edge with every piece of content we added. It cannot be
drawn for a player, and it was only going to get wider. The obvious answer was a
Civilization-style tech tree. We went a different way.
Age of Empires II solves this with ages: buildings hold the techs,
and a global era gate decides which buildings exist for you at all. When we looked
properly, we found we had already built two-thirds of that model without naming it
— our buildings were already tech containers. What was missing was one orthogonal
axis. So we added it.
- 508 Three ages, and a commitment you can't take back. Every State starts in Age I. Advancing to Age II costs 250 science, 60 wood and 40 stone, requires you to control four different Age I buildings, and takes three turns. Age III costs 600 science, 120 wood, 90 stone and 40 iron, needs six buildings, and takes four turns. You pay when you commit, the advance cannot be cancelled, and there is no refund.
- 508 And everyone can see you doing it. Your age and any advance in progress are public, un-fogged, visible to every other State with no scouting required. That is deliberate. We shipped declared war this same stretch (below) with no mechanical teeth, and a rival's visible three-turn countdown is exactly the sort of fact that gives table talk something to bite on.
- 509 Two gates, not one. The age gate does not replace the building gate — both must pass. Age answers "is this era open to me at all"; the building requirement answers "have I built the local infrastructure". Content landed 13 / 7 / 4 across the three ages for improvements, with the naval line, the heavier military buildings and the upgrade-tier perks sitting in the later ages. Age I is deliberately a complete, playable game on its own: found, grow, defend, build an economy. It is not an antechamber.
- 509 Age-locked content stays visible, greyed, with its requirement written on it. You should be able to see what an advance would buy you before you pay for it.
- 510 A persistent age readout in the HUD that becomes a countdown while an advance is running, and an Age panel showing what the next age costs, which requirements you've met, what it unlocks, and where every other State stands.
- 507 A small thing that had been bothering us: three adjacent buttons in the HUD all read "Perks", distinguishable only by hovering. They now read Technology, Government and Special.
The consequence we nearly missed
Ages made science a contested resource, and that quietly broke the win condition.
- 511 Your Science score used to be a count of the technologies you had researched. But advancing an age also costs science — that tension is the whole point of the design, the same choice Age of Empires asks when you decide whether to click up or keep producing. Which meant that under the old rule, the most technologically advanced State in the game would score worse on Science than someone who stayed in Age I buying trinkets. Since winning requires leading four of seven score categories, that is not a balance nit; it silently inverts a category that decides games.
- 511 The fix looks obvious — score Science by age — and the obvious version is wrong. With three ages that makes Science a three-valued ladder, and our victory rule only counts a category for you if you lead it outright. Any game where two players reached the top age would leave Science permanently tied, effectively deleting a category from the maths. So Science is now age plus technologies: the age is the dominant term, the tech count separates players who are level. Advancing wins you the category; researching breaks the tie.
Declared war, with no teeth on purpose
States can now declare war and make peace. The board does not enforce any of it.
- 493 War is unilateral — anyone can declare on anyone, no consent required. Peace is not a negotiation; it is withdrawing your own declaration. If the other side also declared, the two of you stay at war, because either State still standing on its declaration is enough. There is no mechanical effect whatsoever: no combat gating, no movement restriction, no trade consequence. Knowing who is fighting whom is useful; the game does not police it.
- 494, 495 A modal to do it in, and a toast when a relation changes so a declaration against you doesn't slip past unnoticed.
- 506 The first modal listed every pair of States, which grows quadratically — eight States produced twenty-one rows, most of them saying "at peace", which is the default and carries no information. It collapsed to one row per State, your own pinned at the top, each State's wars summarised in plain English. Peace is now left unspoken. Only conflict earns a line.
The bots had no army
A report that computer players never besieged cities turned out to be three
separate failures stacked on top of each other, none of which was about sieging.
- 499 The evidence. One game, 313 turns. Genghis Khan had enqueued 188 scouts, 9 settlers, and nothing else. Cyrus the Great: 350 scouts, 5 settlers, nothing else. Not one Warrior, Slinger, Archer, Spearman or Horseman between them across the entire game. A scout has strength 3 and 10 health; a modest city has 70 health and regenerates 5 a turn. They could not have taken a city if they had tried perfectly — they had nothing to take it with.
- 498 They also could not decide to be hostile, for a reason that had nothing to do with strategy. A bot's memory of its rivals was being overwritten with a partial snapshot each turn; one bot's file after 313 turns read, in its entirety, that it knew of no opponents at all.
- 502 With that fixed, grievance still sat at zero against every opponent after 258 turns — on a board with 277 enemy units and four enemy cities within reach. The signal that turns a bot hostile was watching for too few things. It watches for more now.
- 500 The through-line: all three causes were single numbers nobody could see. The bots' per-turn heartbeat reported unit and city counts but not roster size, not relations state, not army composition — so "every unit built for 313 turns was a scout" was invisible in plain sight. The diagnostics came first; two of the three fixes followed in a day.
- 512 And they learned to advance ages — with a deliberate restraint, because a greedy bot that buys every technology it can afford would never save enough science to advance, and would sit in Age I forever while the humans walked away from it.
785 startups of quiet damage
The local server stopped booting with an error none of us had seen before:
tables can have at most 1600 columns. Nothing we had shipped that week
added a column.
- 514 What was happening. The application checks its database schema on every start by replaying a long list of statements, each written to be harmless if already applied. Back in ticket 063 that list gained two new columns on the cities table. In ticket 130 we retired that feature and added statements to drop them — but never removed the statements that add them. Both stayed. So every single server start added two columns and then dropped them again, fifty statements later.
- 514 That would be harmless, except for one detail of how PostgreSQL works: a dropped column never gives its slot back. The definition stays on the table permanently, marked dead, and still counts against the hard ceiling of 1600. The cities table has about thirty real columns. The other fifteen hundred and seventy were ghosts — two per restart, for something like 785 restarts, across months of development, with no symptom of any kind until the day the wall was reached and the game simply would not start.
- 514 The fix is two deleted lines. The part worth more is the guard that came with it: a test that reads the schema list as data and fails if any column is ever both added and dropped in it, plus a startup warning when any table starts accumulating dead columns. The bug survived 785 startups purely because nothing ever looked.
- 515 A milder relative found during the same diagnosis: a constraint listing every valid unit type was being dropped and rebuilt on every start, and rebuilding it re-scans the entire units table. It now checks whether anything actually changed first, and the list of valid types is derived from the unit registry rather than maintained by hand in two places.
- 516 Then the underlying answer: the replay-everything list is gone, replaced by versioned migrations that each run exactly once. Correctness no longer rests on every statement being individually harmless to repeat, forever, by discipline. The hard part was not the runner but the existing databases, which are fully up to date yet have no record saying so — they had to be recognised and marked, without re-running two hundred statements against them.
Under the floorboards
Nothing here changes the game. All of it changes how confidently we can change it.
- 503 A routine sweep found a test that had been failing on the main branch for an unknown number of tickets. Nobody had broken it recently; nobody had noticed.
- 505 Which happened because nothing ran the whole baseline. Quality checks verified the ticket in front of them, and the automated player's sixteen self-tests were sixteen separate commands — so "is the harness healthy?" cost sixteen invocations and therefore never got asked. It is now one command returning one answer.
- 504, 513 Two documentation passes bringing the written model back in line with the code — the second one covering the age system, written from the shipped registries rather than from the tickets that proposed them.