Jump to content
  • Advertisement
Sign in to follow this  
Magogan

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

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!