Downstream

A diffuse pollution game

Walk a procedurally generated river catchment and repair it: plant riparian trees, dig ponds and build leaky wooden dams. The risk map you work from isn’t decoration. It’s SCIMAP, a real diffuse-pollution model, re-solving on the terrain every time you build.

Free, in the browser, nothing to install. Works with a keyboard and mouse or any game controller.

Trailer

See it in motion

A walk down to a tributary: the risk map, a leaky dam, a riparian buffer and an offline pond, then a 1-in-30 design storm through a catchment that’s partway through repair. Recorded from the browser build, no sound.

How it plays

Read the land, then change it

Each catchment is generated from a seed: ridges, valleys, a river network, fields, woods, a village and a fishery downstream. It’s losing soil to its river, and you have three tools to fix that.

The village and its streams under the source-risk overlay: purple where risk is low, bright yellow and orange where erodible ground is connected to the water.

1 · The map

Find where the sediment comes from

Press M for the risk map. Bright ground is both erodible and connected to a watercourse, and that’s where sediment reaches the river. Cycle through source risk, connectivity, erosion and in-channel risk to see why.

The player standing in a small stream, lining up a leaky dam. The readout above says how much land drains through the spot.

2 · Build

Put each fix where it counts

Leaky dams go in small headwater streams, ponds in hollows off the channel, and trees on the bright ground beside the water. Before you commit, the readout tells you how much land drains through the spot. If the answer is “almost nothing”, it says so.

Gather wood and stone as you go, and find the spade before you can dig.

Young trees planted on a stream bank, with the next planting spot highlighted.

3 · Watch it respond

Upstream work shows up downstream

Every tree, pond and dam re-runs the model, so the map and the colour of the river change the moment you build. It doesn’t flatter you, either: under the model’s land-cover weights, planting trees on rough grazing makes erosion slightly worse. The game lets you do it, and tells you.

After a storm: a hydrograph comparing river flow with and without the player's work, and a message reporting the cut in peak flow.

4 · Test it

Send a storm through

Press R to run a 1-in-30 design storm. The hydrograph plots the flood peak with your work against the same storm without it, and the village and the fishery respond to the difference. Smaller storms arrive on their own, too.

The catchment overview map: a shaded relief of the whole landscape with the stream network, the village, the fishery and resource markers.

5 · Plan

See the whole catchment

Tab opens the overview: the drainage network from the ridges to the outlet, the village and the fishery, and where to find wood, stone and the spade. The risk layers show here too.

The model

A real risk map, not a decorative one

SCIMAP maps where diffuse pollution is likely to come from by combining two things: how erodible the land is, and how well each point is connected to the river when the ground is wet. Downstream runs it live, in a Web Worker, on the terrain you’re walking over.

Faithful where it’s specified

The wetness index, the Network Index, FD8 flow routing and the percentile stretch are transcribed from the reference implementation, with the formulas kept verbatim.

Honest where it departs

There are three deliberate changes: a single-sweep Network Index, in-channel risk accumulated along the flow path, and stretch bounds frozen at the start so that improvement shows as improvement. Each one is argued in the code.

A save is a link

Generation is exactly reproducible, so a save is just a seed and a list of what you built. That’s a few hundred bytes. Press K to copy a link that rebuilds your catchment for anyone.

The reasoning, and the bugs that looked plausible while being wrong, are written up in DESIGN.md. More on SCIMAP itself is on the SCIMAP project page.

Controls

Keyboard or gamepad

KeysGamepadDoes
WASDLeft stickWalk (Shift to run); drag or right stick to look
1 2 3D-padPlant, leaky dam, pond
FABuild where you’re facing
EBGather wood, stone or the spade
M / NX / BackNext risk layer / overlay off
TabYCatchment overview map
RRTRun a 1-in-30 design storm
ZD-pad leftUndo the last feature
KStartSave, and copy a share link

Any controller works

Bluetooth or USB, Xbox or PlayStation: the browser maps them all onto the same layout. Connect it and press a button once to wake it up.

For teaching

The same seed always builds the same catchment, so a class can all work on one landscape. Add ?seed=132 to the play link, and ?size=small or large to change how big it is.

Open catchment 132, the one in the trailer.

What it runs on

Any recent desktop browser with WebGL. It’s built for a laptop or desktop: on a phone you can look around, but you’ll need a controller to walk.

The river’s waiting

No install and no account. Your catchment is generated in a second or two.