View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Creating rivers and roads in a nearly infinite world

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

3 replies to this topic

### #1Magogan  Members

Posted 09 July 2014 - 03:47 AM

Hi,

I have created a "game" with a nearly infinite (2^17 x 2^17 meters) world based on Perlin noise. I also managed to create different regions (taiga, desert, jungle etc.) with Perlin noise. But I really have no idea how I can create rivers or roads. It has to be a function f which only depends on x and z coordinates and a seed for the random number generator. It must not depend on what is at point (x-1, z) or (x-3, z+2) and so on.

The rivers width should not vary too much and f should be lower (or higher) in the middle of the river than on the riverside.

I don't know how to achieve this with Perlin noise or other functions that I know.

Does anyone has an idea about how to do this?

Greetings,

Magogan

### #2Erik Rufelt  Members

Posted 09 July 2014 - 07:15 AM

Some of the mandelbrot branches look kinda like rivers with a proper zoom-level.. try something like that, with some smoothing.

### #3SeanMiddleditch  Members

Posted 09 July 2014 - 11:16 AM

You can use the noise layers (and maybe some new ones) to generate water sheds. The boundaries of watersheds form rivers. River run downhill from watersheds towards the ocean.

For roads, you might consider noise layers to define political or geographical regions. This combined with waterways defines where cities and settlements are usually placed in the real world. Towns would usually be along a river or stream or next to a freshwater lake (people need water to survive) and then often near some other natural resource or at the intersections of major roadways and such.

This doesn't deal with roads, but see http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/

Game Developer, C++ Geek, Dragon Slayer - http://seanmiddleditch.com

C++ SG14 "Games & Low Latency" - Co-chair - public forums

Wargaming Seattle - Lead Server Engineer - We're hiring!

### #4xbattlestation  Members

Posted 09 July 2014 - 09:03 PM

You will have a hard time making good-looking rivers without being able to judge the height of the landscape at the x & y coord.  Rivers always take the lowest route downhill.  You'd have a odd landscape with rivers flowing up hill if you ignore what is at the x & y coord.

Storm Clouds over the Western Front - 2D aerial combat WIP | DarklightXNA on Twitter | 2DFlightSim on Youtube

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.