Skip to content
Ayotl

← All notes

October 23, 2026 · In Kazan

Four workers that looked like two, and troops that wouldn't fight back

Two reports from the same day of play. One could be fixed in the drawing alone, without touching the match; the other was a rule, and in a deterministic online game, changing a rule is a migration.

The game said «4 workers» and the map showed two. All four spawn on the same tile next to the base, and three go to chop the nearest tree. Since the simulation is deterministic, the three pick the same tree, follow the same path and stay pixel on pixel for the whole match. It wasn't a simulation bug, so the simulation wasn't touched: it was fixed in the drawing, nudging sideways whoever lands on the same spot.

That fix had a consequence: tapping a unit measured the distance to its real position, and now the unit is drawn a few pixels away from it. Players tapped the drawing and selected nothing. The tap is now measured against the centre of what's drawn, with more margin for a finger than for a mouse.

The second report: enemies walking past their troops without attacking them, straight for their target, even while being shot. That was by design: a troop ordered to attack something specific didn't get distracted. Now, if what it's going after is a building and an armed troop comes into view, it turns on it and, once it falls, goes back to the building. Against a unit the player singled out, it keeps going: that's the order.

// Todos los teléfonos y el servidor simulan lo mismo con las mismas órdenes.
// Una regla nueva cambia lo que sale: se sube la versión y las partidas
// guardadas con la anterior se descartan en vez de desincronizarse.
export const VERSION_SIM = 11;
Every rules change bumps this number.

That last one can't be done in the drawing: it changes what happens in the match, so every client has to run the same rule at the same time. The simulation version goes up, the server discards rooms saved under the old one, and the weekly challenge starts over. That's why fixes that can live in the drawing go there, and rule changes get batched when possible.

All notes