Floodline is a California flood-defense simulation built on real water-system physics — levees, weirs, pump stations, and reservoir releases. Six historical scenarios span the 1986 Yuba flood to the 2017 Oroville spillway crisis. $2 indie release on itch.io and Steam.
Each scenario starts with an inflow forecast and current system state. Choose levee inspections, pump activation, gate operations, and (in some scenarios) controlled-flooding releases. Score points for protected area, lose for inundation. Real CA water hydrology.
Yes — the six scenarios reproduce real events: 1986 Yuba, 1997 New Year's, 2006 Sacramento, 2017 Oroville spillway, plus two synthetic ARkStorm scenarios from the USGS multi-hazard project.
First-order accurate for routing and storage; simplified for pump and gate response curves. Scenarios are calibrated against published post-event reports from DWR and USACE.
2017 Oroville. Three independent failure modes (auxiliary spillway erosion, main spillway erosion, downstream evacuation logistics) all in 72 hours of game time.
itch.io and Steam — search "Floodline". Single $2 purchase; free in-browser demo at boardgaminghub.com/Floodline.html.
Floodline routes water with an explicit, mass-conserving shallow-water cellular scheme on the terrain grid, not a full 2D Saint-Venant / HEC-RAS solver. It is a first-order diffusive-wave approximation: fast, stable, and directionally honest, but it does not resolve momentum, backwater dynamics, or supercritical shocks the way a professional engineering model would. Everything below is exactly what the code does.
Each cell tracks a water depth. Its hydraulic head is the sum of terrain, any structure height, and the standing water: h = elevation + structure + depth. Every step, water is pushed to each of the 8 neighbours in proportion to the positive head difference:
Mass balance is enforced by construction: each step subtracts the total outgoing flux from the source cell and adds it to the receiving cells (waterNext[i] −= total; neighbours += flux). Nothing is created or destroyed except through the explicit source/sink terms below. A small wind-shear term (≈0.045% of wind speed, capped at 25% of cell depth, active only when depth > 5 cm) nudges shallow sheet-flow but never overrides gravity.
The outlet row is held at a tailwater stage set by a rating curve, not a fixed wall. The measured incremental outflow q is low-pass filtered, then the stage is H = 3.2 + min(1.5, 6.0 · q^0.6) metres. The exponent ≈ 0.6 and offset come from collapsing a wide-rectangular Manning solve (n ≈ 0.035 vegetated channel, slope S₀ ≈ 0.001, breadth ≈ 30 m) into the form H = H₀ + a·q^b; the 1.5 m cap represents the backwater rise before the channel leaves the frame.
Levees do not fail on a simple height check — they accumulate stress while overtopped. When any neighbour's water surface exceeds the levee crest (maxHead > 0), stress builds as stress += dt · rate · (1 + 3·maxHead), where rate = 1.0 (0.5 if reinforced), so deeper overtopping fails a levee faster. A breach fires when stress crosses the threshold of 5 (10 if reinforced), times the scenario difficulty multiplier; the crest then drops and the cell becomes a breach. When not overtopped, stress relaxes at −0.5·dt. Sandbags erode separately under sustained flow shear (flow > 0.15), not under static head.
The solver runs on a fixed timestep of PHYS_DT = 1/60 game-second using an accumulator, capped at 120 sub-steps per frame. Because the flux, inflow, pump and siphon terms move a fixed amount of water per step() call, the fixed sub-step count decouples total throughput from frame rate and game speed — the same volume is routed per game-second whether you run at 1× or 8×. Scenarios are calibrated against published DWR and USACE post-event reports, but the model stays first-order: treat it as an intuition-builder for routing, storage and levee risk, not as a certified flood forecast.
Built by a practicing water-resources engineer. For the professional versions of this math, see the free open-channel & hydrology calculators at pe-calc.com, or HydroComplete for stormwater design software.
Sign in with GitHub to share strategies, ask questions, or report a bug.