I've recently become fascinated by the things that can be done with procedurally terrain and have started experimenting with world building a bit. I'd like to be able to make worlds something like Dwarf fortress with biomes created from meshing together various maps.

So first step has been done. Using the diamond-square algorithm I've created some nice hieghtmaps. Next step is I would like to add some water features and have them somewhat realistically generated with rainfall. I've read about a few different approaches such as starting at the high points of the map, and "stepping" down to the lowest neighboring point, pooling/eroding as it works its way down to sea level.

Are there any documented algorithms with this or are they more off the cuff?

Would love any advice/thoughts.

  • \$\begingroup\$ I've implemented bits and pieces from the algorithm described in this paper. \$\endgroup\$ Commented Dec 12, 2012 at 7:14

3 Answers 3


Amit Patel, a user of this site, has created a wonderful resource of information about random world generation that will certainly be of use to you.

Further there are some great questions/answers about procedural generation on this site.

Road / river generation on 2d grid map

Procedural world generation oriented on gameplay features

How can I generate random lakes and rivers in my game?

Random map generation


Back when I experimented with this type of thing (late 1990s), I read some papers and books to learn about water flow, but I didn't keep a record of which ones I looked at. I ended up doing my own thing because I wanted to handle erosion. I wanted rivers to produce canyons and floodplains. I wanted dam reservoirs to fill up with sediment. I wanted rivers to produce effects like meandering and oxbow lakes. I wanted canals for irrigation and water diversion. I wanted floods to damage farms and houses in floodplains.

I kept some notes (links) in the Geography section of this page. There's a Jos Stam paper that is a must-read. Unfortunately I never organized the notes. Also unfortunately, the game was for OS/2 so I can't easily give you a runnable executable to play with. And also unfortunately, my code is terrible, but if you want to take a look, see water.cpp in the source code (zip).

Things I played with in my simulation (not all realistic):

  • Areas near rivers have moist soil; areas far from rivers have dry soil. Moisture affected vegetation. Vegetation slows water flow.
  • Rain creates water in all places, some of the time. It then flows downhill. Then it evaporates and is absorbed by the ground. The rain carves out river channels.
  • Springs create water all the time, but only in a few locations. The springs keep the river channels filled. I didn't simulate rock layers or groundwater flow; I just placed springs randomly on mountains.
  • Flowing water has momentum. If I remember right, this was important for making rivers meander.
  • Fast moving water picks up sediment; slow moving water deposits sediment ahead of it. This carves out river valleys.
  • During initial map creation I accelerated the water flow and erosion; during gameplay it ran at normal speed.

Overall, my experience was that all of this was quite fun to play with, but it took lots of heuristics and tweaking to make it work. I never got to a point where I could say that river creation felt natural and inevitable without tweaking. It was so much fun (both as a programmer and as a player) that I spent years on it, and never finished the rest of the game. :)

  • 12
    \$\begingroup\$ Simply speak his name and he shall arrive. \$\endgroup\$
    – House
    Commented Dec 12, 2012 at 4:35
  • 3
    \$\begingroup\$ @Byte56 He's like the Candlejack of stackexcha.... \$\endgroup\$
    – DampeS8N
    Commented Dec 12, 2012 at 13:28
  • 2
    \$\begingroup\$ You inspired me to write an imlementation based on your hexagon grid article and now you inspire me again! \$\endgroup\$
    – Adam Arold
    Commented Aug 20, 2016 at 9:10

Most of the implementations I've seen have either been combining a "river map" (using a narrow band from Perlin noise or some similar approach) or the "raindrop" method you mention.

Here are a few jump-off points:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .