I wanted a world that keeps moving when you close the tab.
Most browser games pause politely and wait for the player. For anything turn-based that is the wrong choice: it turns a simulation into a spreadsheet with a theme. I wanted to come back after lunch and find that something had happened without me.
Hammurabi is a small kingdom game in the tradition of the Sumer game. You rule a kingdom with population, grain, land, rats and mercenaries, and every year you decide how much land to buy or sell, how much grain to plant, how much to feed the people, and how many soldiers to hire.
The rules, as they are actually implemented
- Harvest is random between one and five bushels per planted acre, so a plan that assumes three is a plan that sometimes starves.
- Rats take a percentage of the granary, up to thirty percent, computed after the harvest rather than before it. The order matters and nobody notices until a good year goes missing.
- Land has a price that moves, and buying at the wrong moment is how a kingdom with a granary ends up with no seed grain.
- A starvation counter tracks consecutive bad years, because a kingdom that starves twice should be in trouble and the model has to remember that rather than recompute it from the last screen.
- Prestige is a separate number, so the game has a way to record that things went well even when the granary disagrees.
What makes it engineering
Kingdom state lives on the server; there is no authoritative client and nothing to tamper with. A turn resolver advances the world by rules, and a scheduler ticks it whether or not anyone is watching, so three days away is three years of harvests and starvation records. A load guard stops a resolver with no ceiling from running up a hosting bill. LiveView draws the interface, so what a player sees is what the server holds.
What it works against
The assumption that a side project must be either trivial or a startup. This one is a testbed for durable state, scheduled work, concurrency and a UI that tells the truth — the same problems an operational system has, with the advantage that a wrong decision costs a fictional harvest instead of a customer.
Where it stands
The mechanics work and the world persists. The fun is still under construction, which is the honest status of most side projects and the only reason this one is allowed to stay one.