Palim
feature · liveAlpha v0.1.19

Floods, and what the town does about them

A flood is what happens when the valley delivers more water than the channel holds. The water fills the low ground and gets into houses through their doors; daub and thatch wash out, what they held up comes down, people caught in it drown or get out, and the town refuses to build below the flood line, ditches its wet streets, banks the river, and grows uphill.

Live 3D · drag to orbit
The 3D renderer loads in your browser. JavaScript, WebGPU and hardware acceleration are required. It founds a valley of 128 paces.

A preset with a low bank and a river quick to flood, so it happens within the demo. Watch the chronicle for "The river rose", and the sky tab for the flood line and the drained streets.

A flood is not a dice roll. Every month the water model reports the river’s stage; when it runs over bank-full by more than the town’s defence, the town rolls against how far over it is, and the river rises one to four courses into the low ground.

The water is voxels. It fills the low ground from the river outward, and it gets into a building only where there is a way in, a door or a hole in the wall; a house with its door on the high side stays dry longer than its neighbour. Where it stands against a wall it works on what the wall is made of: daub and thatch wash out most, timber a little, stone and brick hardly at all, and faster in running water near the channel. What the washed-out courses held up comes down under its own weight, and a building that loses enough of its ground floor collapses outright. A house that stands is repaired when the water goes down: its builders put back the courses the water took, from stock, one voxel at a time. People caught in water more than two courses deep may drown; the rest get out to dry ground, and remember it: for a generation they would rather live off the flood plain, and give up a house by the water for a dry one when there is one. A share of the stored grain and the standing crop is lost, and the chronicle records how many paces and buildings went under and how many people drowned.

The defence is one number the tuning page can turn: the natural bank, plus what an embankment adds, plus what the flood works policy adds. After a flood the town will not build below the flood line, which is how a flooded town grows uphill. It ditches and culverts its wet streets to win that ground back, a parish budget of columns a year; after a flood, once the treasury and the age allow, its builders raise an embankment along both banks a column at a time out of the store’s stone, and it holds nothing back until the last column stands; it loses a working to the water table and stops driving the next one that deep; from the industrial era it pumps the drowned ones out for a fee. None of it is free and all of it stays in the ground.

What to look for. The water lens during the flood, then era a few decades on: the houses that came down and were rebuilt higher are a different colour from their neighbours, and the ground between them has been made up.


In the code: crates/sim/src/city/water.rs crates/sim/src/events.rs