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, and in VR on a Meta Quest.

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, ?size=small or large to change how big it is, and ?lang=en, es, de or fr to pick its language.

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. On a Meta Quest it runs in VR.

In VR

Put the catchment on a table

On a Meta Quest, Downstream becomes the diorama it’s drawn to look like. Open the game in the headset’s browser and press Tabletop under Enter VR: the catchment shrinks onto a table in front of you, your character stands on it, and you look around by moving your head. Or press First person to walk it at life size, through your character’s eyes.

In a VR headset: the player's character stands on a tabletop landscape beside a stream and a tree, with a readout over its head. A panel at the left edge of the table shows wood, stone, the tools and catchment health, and a ray from the controller points at its Storm button.

At the table

Look down on your own catchment

Your character is about the size of a chess piece. As they walk, the landscape glides along beneath you, and it turns in snaps rather than swinging round, so the horizon stays level. The readout floats over their head, telling you what drains through a spot before you build.

Everything else is on the panel at the edge of the table: point the right controller at it and pull the trigger.

Zoomed out in VR: the whole catchment as a model on a wooden plinth, with the source-risk map over it and the river network converging on the outlet notch at the front. The panel beside it shows the risk-map legend.

Zoomed out

The whole model, within reach

Push the right stick and the catchment comes to rest on the table as a model about 1.4 m across, on its own plinth, with the risk map laid over it. Lean in to follow a stream from the ridge to the outlet, or crouch to see the valley’s profile in the side of the board.

First person

Or stand in the valley

Press First person instead and the catchment is life-size: you see it through your character’s eyes, at their height whether you sit or stand. Look down and the build spot is a few steps ahead, with the readout floating over it; the panel waits low on your left.

Walking moves your view, so it asks more of your stomach than the table does. Turning stays in snaps, and the horizon never tilts.

Touch controllersDoes
Left stickWalk (left trigger to run)
Right stickLeft and right turn the table; up and down zoom
Right stick clickJump between close up, halfway and the whole catchment
A or right triggerBuild where you’re facing
BGather wood, stone or the spade
X / YNext risk layer / overlay off
GripsPrevious and next tool
Point at the panelStorm, undo, save, pick a tool or layer, and leave VR

What you need

A Meta Quest and its own browser: no app and no install, and the same link as everywhere else. The Enter VR button only appears in a browser that can start a VR session, so you won’t see it on a laptop. Other headsets that support WebXR may work too.

Sitting or standing

The table is set from your eye height when you start, so either works. If it ends up in the wrong place, hold the Meta button on the right controller to recentre.

Lighter on a headset

A headset draws every frame twice, once for each eye, so it gets a lighter scene than a desktop does: fewer trees, and shadows updated less often. The model underneath is exactly the same.

The river’s waiting

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