# Creating rivers and roads in a nearly infinite world

This topic is 1592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites

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

##### Share on other sites
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/

##### Share on other sites

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.

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 12
• 18
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633360
• Total Posts
3011514
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!