ERAS
November 5, 2026

Ten thousand

Six hundred soldiers slowed a whole world to a crawl. A day later the server ran ten thousand, and the screen could draw them. How we got there.

Open war lets armies grow as large as their realms can feed. At a playtest this week, they did. Late in the evening every move lagged, and by the end the server was getting through six ticks a second where it should manage twenty. When we counted afterwards, the world held about 600 soldiers. Not thousands. Six hundred.

A day later the server ran ten thousand soldiers in a few milliseconds a tick, and the game could draw them all. Here's what was in the way.

Everyone asking everyone

We profiled the live server while it struggled. Most of its time went into one question: who should I fight? Four times a second, every soldier without a foe looked at every other soldier, every villager and every building in the world. For each one it first asked whether their realms were at war, which meant looking up realm names as strings, and only then checked how far away they were.

That's a search whose cost grows with the square of the army. Twice the soldiers, four times the work. At 600 it was enough to swamp the server.

The first fix was a matter of order: check the distance first, and look up who's at war only for those close enough to matter. A test battle of 1,000 soldiers went from 8.3 to 3.2 ms a tick, and 2,000 from 29.9 to 11.0 ms. Every battle played out exactly as before, blow for blow. Our tests check that by comparing a fingerprint of the whole battle.

A grid on the land

The real fix was to stop looking at the whole world. Soldiers now sit in a grid of 4 m cells, and buildings in a coarser one of 32 m. A soldier looking for a fight checks only the cells around it. Realms are numbers instead of names, and an army with no foe anywhere near skips past its own comrades without asking about each one.

With the grid, 2,000 soldiers went from 11.0 ms a tick to 1.05 ms. Ten thousand took 5.5 to 7.4 ms. Again, every test battle came out identical, from 1,000 soldiers to 10,000.

Soldiers on the wire

A server that can run ten thousand soldiers still has to tell every player where they all are, many times a second.

So we cut what we send. A soldier's update is now written once and shared by everyone watching, instead of once for each player. Soldiers far from you update less often: every second update past 80 m, every fourth past 160 m. Anything that matters, a blow or a fall, still arrives at once, and your client smooths the far ones over the gap. Then all the blows, swings, arrows and deaths of a tick were bundled into one message per player.

With ten thousand soldiers and sixteen players, each player's traffic dropped from 4.2 to 1.39 MB a second, and the messages from 2,367 a second to 40. In a full fight, the server's slowest ticks went from 218 ms to 24.

Fifteen hundred soldiers of four realms crowding a green hilltop, riders among them
Fifteen hundred soldiers of four realms on the march.

Drawing a crowd

Then the screen. Each soldier used to be a full character: about 190 separate parts to move, and their own animation running every frame, even as a dot on the far side of a valley. Three hundred soldiers took the browser 59 ms a frame.

Now only the nearest soldiers get the full treatment. The rest are drawn together on the graphics card, with their animations baked once into a texture so the card can pose them itself. Further out they swap to lighter models, and far away to painted cards. In the browser, 1,000 soldiers went from 28.8 ms a frame to 4.6, and 3,000 from 71 ms to 8.4. Ten thousand load at all, which they didn't before.

Before
After
BeforeAfter
A hundred soldiers round a village, and three thousand

We built the same crowd for the new native app (more on that soon). There, each soldier has three levels of detail, from 19,000 triangles up close to 1,100 a little way off, then a card past 80 m. Ten thousand animated soldiers run at 11 to 14 ms a frame, on a scene that takes 10 ms by itself. Twenty thousand hold too. The soldiers take at most 18 draw calls between them, however many there are.

What's next

Ten thousand soldiers fit now, but sending each one to every player still costs about 11 Mbit/s a player at that size. The next step is to send far-off armies as squads, a centre, a facing and a count, and only the soldiers near you one by one.

More from the dev blog