This proof-of-concept is a top-down water routing simulator: water spreads across a terrain heightmap, pools in basins, and can be redirected using simple infrastructure tools (digging, berms, gates, drains, and pumps). It’s designed to be readable and “game-stable,” not a full CFD simulation.
What you’re seeing
- Ground (terrain) is a grayscale heightmap: darker = lower, lighter = higher.
- Water is bright blue with a shoreline glow so flow paths and pooling are immediately visible.
- The simulation runs on a grid where each cell has:
- H = ground height
- W = water depth
- Z = H + W = surface height (what actually drives flow)
Water moves from higher Z to lower Z (downhill), forming channels and basins naturally.
Hydro Inspector (top-left)
The Hydro Inspector is the “truth panel.” Hover any cell and it reports:
- Cursor
- Cell coordinates and any flags (Target, Protected, Drain, Spring, Pump In/Out)
- Terrain
- H (ground) and Slope | Aspect (how steep the surface is and the downhill direction)
- Water
- W (depth) and Z (surface height)
- Hydro
- Downhill: the best immediate downhill direction (N/S/E/W) and the local ΔZ
- Flow potential: a quick proxy for “how much water wants to move out of this cell” based on slope + available water + viscosity/flow settings
This is how you diagnose everything: why water is pooling, why it’s escaping, and where to cut a new channel.
Tools (what each one does)
These tools are intentionally strict and predictable:
View
No edits. Use this mode to inspect and understand the system.
Dig
Lowers terrain (reduces H) where you paint.
Use it to carve trenches, connect basins, or create relief channels.
Build
Raises terrain (increases H) where you paint.
Use it to create berms/dams and block or redirect flow.
Gate
Click near an edge to toggle its openness: open → half → closed.
This directly restricts flow across that boundary.
Drain
Click a cell to toggle a sink that removes water continuously.
Use it for controlled drainage or “pump-out” style mechanics.
Pump
Two clicks:
- Set P-in (intake)
- Set P-out (outlet)
The pump transfers water from intake to outlet only if:
- there is enough water at intake, and
- the required head (Zout − Zin) is within Pump Max Head
Controls (what matters)
- Rain / Spring: water sources (global vs localized).
- Terrain Flow: how quickly the simulation equalizes downhill (higher = faster).
- Viscosity: reduces flow (higher = thicker/slower).
- Pump RPM / Pump Max Head: pump rate and uphill capability.
- Water Contrast: purely visual—boosts water visibility and shoreline glow.
- Time Scale: run faster/slower for testing.
What this POC is for
This isn’t “pretty water.” This is water as a system:
- routing under constraints,
- terrain-driven flow behavior,
- controllable infrastructure,
- and inspectable cause → effect.