Rivers

Overview

Rivers tie a landscape together. They start high in the hills, wind downhill through the valleys, and end in a lake or the sea. In Quorum Studio, you draw a river as a path: a line of points across the ground. Quorum Studio then works out the rest. It makes the water's surface run downhill, cuts a bed into the ground so the banks hold the water, and makes the ripples flow downstream. In this tutorial, you will draw a river with the mouse or the keyboard, change it, and learn how a few simple rules about real rivers become steps a computer can follow.

Goals

By the end of this lesson, you can

  • Draw a river with the River tool, with the mouse or the keyboard
  • Explain how a river is stored as a path of points, and what Quorum Studio works out from it
  • Describe the rules that keep a river's water running downhill, and what happens where the path climbs
  • Change a river's points, width, depth and speed, and remove it

Warm up

Think of a real river, one near you or one you know from a map or a story. Where does it start, and where does it end? Does it ever flow uphill? What do you think happens to the land when a river has to get through a hill that is in its way?

Vocabulary

You will be learning about the following vocabulary words:

Vocabulary
TermDefinition
RiverWater that flows downhill along a path, from where it starts to where it ends.
PathThe line a river follows, made of points you place on the ground.
PointOne place on a river's path. The river runs from its first point to its last.
BedThe ground under a river's water, cut lower than the ground around it.
BankThe ground at the side of a river, which holds the water in.
CarvingLowering the ground under a river to make its bed and banks.
DownstreamThe direction a river's water flows: from its first point toward its last.
AbstractionKeeping only the details that matter for a problem. A river's few points stand in for every drop of its water.

CSTA Standards

For teachers · 2026 CSTA K–12 Computer Science Standards

S1-SWD-DD-02

Specialty I · Software Development

Design software that accounts for complexity through abstraction.

Also in 1 other lesson

S1-XCS-XC-02

Specialty I · X+CS

Formulate a computational solution to a problem in a non-CS discipline (X) using computational thinking.

Only this lesson so far

Every standard, and the lessons that cover it

Explore

This tutorial needs a terrain with hills and valleys, and it helps to have a lake from Lakes or a sea from The Sea for the river to flow into. Rivers share the water's look with the sea and the lakes.

A river is a path

A real river is billions of drops of water, each pushed by gravity. A computer can't follow every drop, so Quorum Studio keeps only what matters: the river's path, a short list of points from its start to its end, and its width, depth and speed. From those few numbers, it works out everything else:

  • A smooth line. Quorum Studio draws a smooth curve through the points, so the river bends gently instead of turning sharp corners at each one.
  • The water's surface. Along the curve, the water's height starts at the ground's height and is smoothed. Its one firm rule is that it never rises going downstream. Water can't flow uphill.
  • The bed and banks. Under the water, the ground is lowered to make a bed, deepest in the middle and rising to the banks at the sides. This is called carving. Because of it, the banks always hold the water, and the river never floats above the ground.
  • The flow. The ripples on a river move along it, downstream, instead of drifting all one way as they do on a lake. They move faster where the river is narrow or steep.

Keeping only the path is an example of abstraction: a few points stand in for the whole river, and the rules fill in the details.

Drawing a river

The River tool is the terrain's sixteenth tool. Select the terrain, then choose the tool.

Keys for the River tool
ActionWindowsMac
Choose the River toolShift+Alt+7Shift+Option+7
Move the terrain cursorArrow keysArrow keys
Add a point at the cursorSpaceSpace
Finish the riverEnterReturn
Cancel the river being drawnEscapeEscape
Take back the last point while drawingDelete or BackspaceDelete
Remove the chosen point of a riverDelete or BackspaceDelete

With the mouse:

  1. Choose the River tool: press Shift+Alt+7 (Shift+Option+7 on Mac), or choose River in the Brush section's Tool group.
  2. Click where the river starts, usually high up in the hills.
  3. Click again at each bend, working downhill. A faint ghost of the next stretch follows the mouse, showing where the river would go.
  4. Press Enter (Return on Mac) to finish the river.

With the keyboard:

  1. Choose the River tool with Shift+Alt+7 (Shift+Option+7 on Mac).
  2. Move the terrain's cursor with the arrow keys to where the river starts, and press Space to add the first point.
  3. Move to each bend and press Space again. Quorum Studio reports how long the stretch since the last point is and how much the ground drops, which a screen reader may announce as "Point 2, 12.5 units from the last; the ground drops 1.2. Press Enter to finish the river." Where the ground rises instead, the report says "the ground rises 0.8, so the river will cut into it there".
  4. Press Enter to finish the river. Quorum Studio reports it, for example "Drew River 1: 3 points, 45.2 units long, water from height 20.1 down to 15.3."

If you add a point by mistake, press Delete or Backspace to take back the last point.

To give up on a river while drawing it, press Escape. The points you placed so far are taken away, and Quorum Studio reports "Stopped drawing the river. Nothing was added."

When you finish the river, Quorum Studio carves its bed into the ground right away. Finishing the river, with its carving, is one step for Undo.

When the path climbs

Sometimes the path goes over a rise: the ground between two points is higher than the point before it. Real rivers don't flow uphill. Over a long time, they cut down through the rise, which is how canyons form. Quorum Studio does the same thing at once. The water's surface stays level through the rise, and the bed is carved deeper there, so the river cuts through the hill. Quorum Studio reports where this happens and how deep the cut is, for example "The river cuts 3.2 units into the ground between points 4 and 5, where the ground rises." A very deep cut is a hint that the path might go around the hill instead.

Where a river starts and ends

A river can start from a lake, and it can end in a lake or in the sea. If its last point is in a lake or the sea, the river ends at that water's level, so the two meet smoothly. For now, each river is one line from its start to its end: rivers can't split into branches or join each other yet.

Changing a river

To change a river after it is drawn, choose the River tool again, or press Edit path in the river's part of the Water section. Every river's path then shows as a light blue line over the ground, with a small square at each point, and Quorum Studio reports which rivers there are, such as "1 river: River 1, 7 points. Its path is shown; click a point to choose it, then drag it, or press Delete."

With the River tool chosen:

  • Choosing a point. Click or select one of a river's points. The chosen point's square is larger than the others. Quorum Studio reports which point it is, for example "Point 2 of 3 of River 1. Drag it to move it, or press Delete to remove it."
  • Moving a point. Hold the mouse button on a point and drag it. When you let go, the river and its bed follow.
  • Adding a point. Click on the river's water, between two points, to add a point there, for a new bend.
  • Letting go. Click empty ground to let go of the chosen river. Quorum Studio reports "No river chosen. Click empty ground again to start a new river." A new river only starts when no river is chosen, so a stray click while editing doesn't start one.
  • Removing a point. Choose a point and press Delete or Backspace. A river left with fewer than two points is removed.

With the keyboard, move the terrain cursor onto a river's point and press Space to choose it, then Delete to remove it. Moving a point needs the mouse for now.

Each change carves the bed again, as one step for Undo. Quorum Studio keeps the ground's heights from before the river was carved, so when you move or remove a river, it puts the old ground back. If you shaped the ground under the river after carving it, Quorum Studio leaves that ground as it is. Removing a river is reported as "Removed River 1. Its bed was filled back in where the ground wasn't changed since."

Rivers in the Water section

The Water section's Rivers part lists each river as a part of its own, which opens with its chevron. Its title sums the river up, such as "River 1, 241.6 long, water 30.1 down to 10". Opened, it has:

  • Name, such as Mill river;
  • Width, how wide the water is;
  • Depth, how deep the bed is cut below the water;
  • Speed, how fast the water flows;
  • Edit path, which chooses the River tool and the river's first point, so you can go straight to changing its points in the scene;
  • Remove river, which takes the river away.

The New rivers part sets the width and depth the River tool draws new rivers with.

Saving the scene saves the rivers in the terrain's water.json file, beside the lakes. A game that loads the scene gets its rivers with no extra code, and the water questions from the Lakes tutorial, such as GetWaterDepthAt, count river water too.

Engage

The goal of this activity is to turn what you know about real rivers into steps a computer could follow, and then to test those steps against what Quorum Studio does. Work with a partner.

Part 1: Rules on paper. Make a map of a small landscape with height numbers on it: the tops of the hills, the bottoms of the valleys, and a lake or the sea at one edge. Decide together where a river should start and end, and choose four to six points on its path, each with its height. Then write rules a computer could use to make the river from those points alone. What does it need to know at each point? How does it decide the water's height between points? What should it do where the path goes over higher ground? Write your rules as a numbered list.

Part 2: Predict, then test. Use your rules to predict, for each stretch between points, the water's height at each end, and whether the river will cut into the ground there and by how much. Write your predictions in a table. Then shape a terrain like your map in Quorum Studio, and draw the river through the same points. Record what Quorum Studio reports for each stretch and for the finished river, and add it to your table beside your predictions.

Part 3: Change one thing. Find the stretch with the deepest cut. Move one point so the path goes around the rise instead of through it, and record the new report.

Discuss:

  • Where did your predictions and Quorum Studio's results differ? Which rule was different, and which is closer to a real river?
  • Which details of a real river did your rules leave out? Which would matter to a player, and which only to someone studying rivers?
  • When you moved the point, what changed about the cut? Would a real river go through the rise or around it?
  • What would you want Quorum Studio to report while drawing a river that it doesn't report today?

Wrap up

A river in Quorum Studio is a short list of points and a few rules: water runs downhill, the surface never rises downstream, and where the land is in the way, the river cuts through it. That is how computer scientists often model the natural world: keep the few details that matter, and let rules fill in the rest. In the last tutorial of this series, Changing the Palette, you will add your own 2D images to the scene editor.