Upcoming Events
Unite 2010
11/10 - 11/12 @ Montréal, Canada

GDC China
12/5 - 12/7 @ Shanghai, China

Asia Game Show 2010
12/24 - 12/27  

GDC 2011
2/28 - 3/4 @ San Francisco, CA

More events...
Quick Stats
109 people currently visiting GDNet.
2406 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!
Link to us Events 4 Gamers
Intel sponsors gamedev.net search:

Introduction

In open landscape games, rivers can add a realistic touch to the look of the terrain. I am going to discuss a method for adding rivers to randomly generated terrain that adds this realistic touch we are looking for.  Unfortunately, when we are dealing with random terrain this is not always a menial task. In real life the terrain is usually formed by water carving away at the land and forming valleys and other such terrain features. When generating terrains in a decent load time, however, we don't have this luxury. My final project at Full Sail was a real time tactical game called Liege on random generated terrain with rivers. Throughout this article I am going to discuss the methods I took to create rivers for Liege.

The plan of attack

First we need to formulate a plan of attack. The method that I discuss here is the one that I decided to implement as it best suited my targeted river idea. The goal of my river implementation was to create a single non branching river that passes through a territory in a realistic looking fashion. Using this goal we know that the river will begin and end on an edge of the map as it is only passing through the territory not beginning in it. Another thing we know is that water likes to flow downwards as it would be defying gravity to flow upwards. This implementation brings simplicity to the process while still adding key detail to the map.

What do we need?

To pull this off we are going to need a couple key algorithms:

  • A path finding algorithm to determine the path of the river.
  • An algorithm to cleanup the terrain around the river.
  • A riverbed carving algorithm.

Many of these may vary depending on the overall look you are trying to achieve with your river but I will step through the basics and what I have done to accomplish the look I have been going for.





The Path

Contents
  Introduction
  The Path
  Level of detail

  Printable version
  Discuss this article