FLOODLINE
Wallet$0
Budget$0
Time0:00
Stage0.0 m
Rain0 mm/hr
Tailwater2.8 m
Wind
0 m/s
Vol0 m³
Damage0%
Cost$0

Construction

Objectives

Legend

Town Hospital School Water Levee

Briefing

Infrastructure Status

Tips

Levees fail when overtopped for too long. Channels drain 2× faster. Pumps need dry grid to run. Watch the hydrograph — pre-position for the peak.
FLOODLINE
A flood engineering simulator
Physics you can trust. Decisions that count.
Based on real hydrology, historical floods, and SCS Type II methods.

About Floodline

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.

How to play

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.

Frequently asked questions

Is this based on real California floods?

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.

How accurate is the hydrology?

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.

What's the hardest scenario?

2017 Oroville. Three independent failure modes (auxiliary spillway erosion, main spillway erosion, downstream evacuation logistics) all in 72 hours of game time.

Where can I buy it?

itch.io and Steam — search "Floodline". Single $2 purchase; free in-browser demo at boardgaminghub.com/Floodline.html.

How the model works — the real hydrology

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.

Per-cell flux & mass balance

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.

Sources & sinks

Downstream boundary (stage-discharge)

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.

Levee stress & overtopping

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.

Integration

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.

Related games

Discussion

Sign in with GitHub to share strategies, ask questions, or report a bug.