Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Generating rivers....
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  20 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
spag  
View profile  
(1 user)  More options Aug 22 2008, 1:26 am
Newsgroups: rec.games.roguelike.development
From: spag <spagtho...@gmail.com>
Date: Thu, 21 Aug 2008 22:26:30 -0700
Local: Fri, Aug 22 2008 1:26 am
Subject: Generating rivers....
I've been having issues with rivers.  Actually all out door scenery,
but I'm at least just trying to come up with a basic terrain with
water on it.  

So, I want to come up with some procedural way to generate a river on
my terrain.  Just wiggling a 2D fractal line across the screen isn't
going to cut it.  I'd like for it to branch sometimes, maybe have two
river sometimes (splitting the land mass into thirds), possibly even a
circular deal with an island in the middle.

I've played with fractal terrain height maps and setting arbitrary
water levels, but it's not really the look I want.  Ultimately it all
gets mapped to characters and all, but I still end up with bits of
land where I don't want them and all.  

Ideas?  I've seen people talk about using automata to generate
terrain, but I can't think how that would be done.  

Is there even a procedural way to do this?   I'm tempted to cheat and
just use some kind of templates, but I know I'll never be happy doing
it that way.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dominikmarc...@gmail.com  
View profile  
 More options Aug 22 2008, 2:29 am
Newsgroups: rec.games.roguelike.development
From: dominikmarc...@gmail.com
Date: Thu, 21 Aug 2008 23:29:54 -0700 (PDT)
Local: Fri, Aug 22 2008 2:29 am
Subject: Re: Generating rivers....
On 22 Sie, 07:26, spag <spagtho...@gmail.com> wrote:

Maybe my developer's article will be of some help:
http://umbrarumregnum.110mb.com/art5.html
You can modify it and use more than one starting point for the river.
Since the endpoint is the same, the river will naturally join the main
flow.
Hope that helps somehow.

Mingos.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xecutor  
View profile  
 More options Aug 22 2008, 3:48 am
Newsgroups: rec.games.roguelike.development
From: Xecutor <konstantin.stup...@gmail.com>
Date: Fri, 22 Aug 2008 00:48:08 -0700 (PDT)
Local: Fri, Aug 22 2008 3:48 am
Subject: Re: Generating rivers....
Many years ago, when I tried to create remake of 'Master of Magic' and
was working
on terrain generator, following algorithm worked pretty well:

random point inside continent was choosen as source,
as well as random direction - general river flow direction.
With each step in flow direction there
is chance to turn or branch.
Splitting chance is significally lower.
If turn rolled, river change direction for 1-3 steps,
than return direction to normal.
If branch rolled - both childs shouldn't turn to each other side for
several turns.
There was several cells lookahead, so that when ocean is close
enough intensive branching was forced.
In my case every continent was surrounded by water,
so 'end of algorithm' condition was - another water piece reached.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Donnelly  
View profile  
 More options Aug 22 2008, 3:56 am
Newsgroups: rec.games.roguelike.development
From: Paul Donnelly <paul-donne...@sbcglobal.net>
Date: Fri, 22 Aug 2008 02:56:06 -0500
Local: Fri, Aug 22 2008 3:56 am
Subject: Re: Generating rivers....

spag <spagtho...@gmail.com> writes:
> I've been having issues with rivers.  Actually all out door scenery,
> but I'm at least just trying to come up with a basic terrain with
> water on it.  

> So, I want to come up with some procedural way to generate a river on
> my terrain.  Just wiggling a 2D fractal line across the screen isn't
> going to cut it.  I'd like for it to branch sometimes, maybe have two
> river sometimes (splitting the land mass into thirds), possibly even a
> circular deal with an island in the middle.

I don't think rivers generally branch (although I won't say it never
happened). Mostly they do the opposite. How about starting several
rivers heading toward roughly the same point, and joining them
together when they meet?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jota...@hotmail.com  
View profile  
 More options Aug 22 2008, 9:10 am
Newsgroups: rec.games.roguelike.development
From: jota...@hotmail.com
Date: Fri, 22 Aug 2008 06:10:38 -0700 (PDT)
Local: Fri, Aug 22 2008 9:10 am
Subject: Re: Generating rivers....
On 22 Ago, 08:56, Paul Donnelly <paul-donne...@sbcglobal.net> wrote:

> I don't think rivers generally branch (although I won't say it never
> happened). Mostly they do the opposite. How about starting several
> rivers heading toward roughly the same point, and joining them
> together when they meet?

Start them in the ocean and then branch them as they move uphill :)

Jotaf


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ido Yehieli  
View profile  
 More options Aug 22 2008, 9:56 am
Newsgroups: rec.games.roguelike.development
From: Ido Yehieli <Ido.Yehi...@gmail.com>
Date: Fri, 22 Aug 2008 06:56:52 -0700 (PDT)
Local: Fri, Aug 22 2008 9:56 am
Subject: Re: Generating rivers....
On Aug 22, 3:10 pm, jota...@hotmail.com wrote:

> On 22 Ago, 08:56, Paul Donnelly <paul-donne...@sbcglobal.net> wrote:

> > I don't think rivers generally branch (although I won't say it never
> > happened). Mostly they do the opposite. How about starting several
> > rivers heading toward roughly the same point, and joining them
> > together when they meet?

> Start them in the ocean and then branch them as they move uphill :)

> Jotaf

Rivers move uphill?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Slash  
View profile  
 More options Aug 22 2008, 10:16 am
Newsgroups: rec.games.roguelike.development
From: Slash <java.ko...@gmail.com>
Date: Fri, 22 Aug 2008 07:16:23 -0700 (PDT)
Local: Fri, Aug 22 2008 10:16 am
Subject: Re: Generating rivers....
On Aug 22, 8:56 am, Ido Yehieli <Ido.Yehi...@gmail.com> wrote:

> On Aug 22, 3:10 pm, jota...@hotmail.com wrote:

> > On 22 Ago, 08:56, Paul Donnelly <paul-donne...@sbcglobal.net> wrote:

> > > I don't think rivers generally branch (although I won't say it never
> > > happened). Mostly they do the opposite. How about starting several
> > > rivers heading toward roughly the same point, and joining them
> > > together when they meet?

> > Start them in the ocean and then branch them as they move uphill :)

> > Jotaf

> Rivers move uphill?

Of course not, but naive players will never notice!

--
Slashie


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Soyweiser  
View profile  
 More options Aug 22 2008, 10:45 am
Newsgroups: rec.games.roguelike.development
From: Soyweiser <soywei...@gmail.com>
Date: Fri, 22 Aug 2008 07:45:52 -0700 (PDT)
Local: Fri, Aug 22 2008 10:45 am
Subject: Re: Generating rivers....
On Aug 22, 4:16 pm, Slash <java.ko...@gmail.com> wrote:

> On Aug 22, 8:56 am, Ido Yehieli <Ido.Yehi...@gmail.com> wrote:
> > Rivers move uphill?

> Of course not, but naive players will never notice!

The flow of the river sweeps you into the mountain. You drown in the
mountain. DYWYPI?

--
Soyweiser


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Slash  
View profile  
 More options Aug 22 2008, 12:00 pm
Newsgroups: rec.games.roguelike.development
From: Slash <java.ko...@gmail.com>
Date: Fri, 22 Aug 2008 09:00:54 -0700 (PDT)
Local: Fri, Aug 22 2008 12:00 pm
Subject: Re: Generating rivers....
On 22 ago, 09:45, Soyweiser <soywei...@gmail.com> wrote:

> On Aug 22, 4:16 pm, Slash <java.ko...@gmail.com> wrote:

> > On Aug 22, 8:56 am, Ido Yehieli <Ido.Yehi...@gmail.com> wrote:
> > > Rivers move uphill?

> > Of course not, but naive players will never notice!

> The flow of the river sweeps you into the mountain. You drown in the
> mountain. DYWYPI?

Well, the river direction would be contrary to the used while
generating it, player just wont notice you generated it backward :P

--
Slash


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spag  
View profile  
 More options Aug 22 2008, 11:03 pm
Newsgroups: rec.games.roguelike.development
From: spag <spagtho...@gmail.com>
Date: Fri, 22 Aug 2008 20:03:48 -0700
Local: Fri, Aug 22 2008 11:03 pm
Subject: Re: Generating rivers....
On Thu, 21 Aug 2008 23:29:54 -0700 (PDT), dominikmarc...@gmail.com
wrote:

>Maybe my developer's article will be of some help:
>http://umbrarumregnum.110mb.com/art5.html
>You can modify it and use more than one starting point for the river.
>Since the endpoint is the same, the river will naturally join the main
>flow.
>Hope that helps somehow.

>Mingos.

I'll probably give something close to that a try.  A* through a height
map might work, I'll have to play around with it some.  Might look
better through noise like you talk about, but I don't have any current
code for generating that.  I tried doing some stuff with Perlin noise
a while back, and could never get the combination of variables right
so that it gave me the look I was going for.  

Thanks.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spag  
View profile  
 More options Aug 22 2008, 11:08 pm
Newsgroups: rec.games.roguelike.development
From: spag <spagtho...@gmail.com>
Date: Fri, 22 Aug 2008 20:08:47 -0700
Local: Fri, Aug 22 2008 11:08 pm
Subject: Re: Generating rivers....
On Fri, 22 Aug 2008 00:48:08 -0700 (PDT), Xecutor

This is kind of what I ended up with, at least picking the starting
poing and wandering from there, but the way I did it doesn't look
right to me.  

Combining that with the path finding might though.  Starting in the
middle, and working to two (or more) edges from there.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spag  
View profile  
 More options Aug 23 2008, 6:08 am
Newsgroups: rec.games.roguelike.development
From: spag <spagtho...@gmail.com>
Date: Sat, 23 Aug 2008 03:08:24 -0700
Local: Sat, Aug 23 2008 6:08 am
Subject: Re: Generating rivers....
That actually worked.  I think my A* routine is a little shakey since
I had to convert it over from a hexagon based RL I was playing with,
but works reasonably well.  I just get a little more hunting than I
ever seemed to get with the hexes.  Probably won't matter once I make
the stream wider.

At first I was having a rough time getting the height map data to be
meaningful enough to actually change the course since the values I was
using were too large.  I used your idea of multiplying the facing
value (5 or 7 for diags) with a normalized map (0..1), and it follows
the terrain pretty well.

I haven't gotten ambtious with splitting it or anything, but it looks
pretty good for single streams.  Thanks again.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malorzean  
View profile  
 More options Aug 24 2008, 4:44 am
Newsgroups: rec.games.roguelike.development
From: Malorzean <malorz...@gmail.com>
Date: Sun, 24 Aug 2008 01:44:03 -0700 (PDT)
Local: Sun, Aug 24 2008 4:44 am
Subject: Re: Generating rivers....

> Maybe my developer's article will be of some help:http://umbrarumregnum.110mb.com/art5.html

Could you possibly add these articles to roguebasin? They're certainly
interesting new ways of looking at old problems and it would be good
to have them there. If its too much trouble, do we have your
permission to upload them to roguebasin?

Thanks
Malorzean


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malorzean  
View profile  
 More options Aug 24 2008, 4:56 am
Newsgroups: rec.games.roguelike.development
From: Malorzean <malorz...@gmail.com>
Date: Sun, 24 Aug 2008 01:56:07 -0700 (PDT)
Local: Sun, Aug 24 2008 4:56 am
Subject: Re: Generating rivers....
On Aug 22, 4:29 pm, dominikmarc...@gmail.com wrote:

Also, When you talk about 2D fractional brownian motion, is that just
a random walk in 2D, or what is it exactly?

Thanks again,
Malorzean


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
spag  
View profile  
 More options Aug 24 2008, 2:58 pm
Newsgroups: rec.games.roguelike.development
From: spag <spagtho...@gmail.com>
Date: Sun, 24 Aug 2008 11:58:08 -0700
Local: Sun, Aug 24 2008 2:58 pm
Subject: Re: Generating rivers....
On Sun, 24 Aug 2008 01:56:07 -0700 (PDT), Malorzean

<malorz...@gmail.com> wrote:
>Also, When you talk about 2D fractional brownian motion, is that just
>a random walk in 2D, or what is it exactly?

>Thanks again,
>Malorzean

The random walk in 2D of course wouldn't look right for a river, it
just meanders all over the place.  I've done 2D fractal lines before
for a side profile of terrain, and while that simulates a more natural
looking line, still wasn't doing it for me.

You can use brownian motion to create 2D height maps, which you can
use to create cool 3D terrain models, planet surfaces, etc.  Not a
really in depth article, but a good starting point here:

http://www.gamasutra.com/features/20010302/oneil_02.htm

Once you have a height map, letting the river "flow" using a shortest
route algorithm between two points works pretty well.  It's not going
to be technically accurate, as it's possible that the shortest route
could end up having to take the water up hill to make it happen, but
it looks good.  

I suppose to be technically accurate, you could do a two pass thing
over the height map.  Generate it first, get the path of the river,
and then go through an lower the map along the path over the river
below some threashold.  I don't think it would matter much if
converting it all to ascii, but I don't know, someone might want to
make movement costs associated with moving through terrain like that
cost more, and moving along the shores of a river would tend to cost
the least because they are often flat.

-spag


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dominikmarc...@gmail.com  
View profile  
 More options Aug 27 2008, 2:27 am
Newsgroups: rec.games.roguelike.development
From: dominikmarc...@gmail.com
Date: Tue, 26 Aug 2008 23:27:01 -0700 (PDT)
Local: Wed, Aug 27 2008 2:27 am
Subject: Re: Generating rivers....
On 24 ago, 10:44, Malorzean <malorz...@gmail.com> wrote:

> > Maybe my developer's article will be of some help:http://umbrarumregnum.110mb.com/art5.html

> Could you possibly add these articles to roguebasin? They're certainly
> interesting new ways of looking at old problems and it would be good
> to have them there. If its too much trouble, do we have your
> permission to upload them to roguebasin?

> Thanks
> Malorzean

I can't recall whether I actually gave my permission on Roguebasin or
not to wikify my articles... If not, I'll add myself to the permission
list tonight. You can wikify my articles if you feel they're useful,
of course, I have no problem with that.

When I speak of any kind of noise, be it Perlin noise or fBm, I mean
the algorithms included in Jice's tcodlib, since they're exactly what
I use. They're usually just 2d noises, not random walk, Brownian
island generation nor anything similar.

Mingos.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dominikmarc...@gmail.com  
View profile  
 More options Aug 27 2008, 2:30 am
Newsgroups: rec.games.roguelike.development
From: dominikmarc...@gmail.com
Date: Tue, 26 Aug 2008 23:30:25 -0700 (PDT)
Local: Wed, Aug 27 2008 2:30 am
Subject: Re: Generating rivers....
On 24 ago, 10:56, Malorzean <malorz...@gmail.com> wrote:

> Also, When you talk about 2D fractional brownian motion, is that just
> a random walk in 2D, or what is it exactly?

Like I said in the above post, noise, not random walk. I don't really
know how it works, since the algorithm isn't mine. fBm, from what I
understand, is a sum or interpolation of several Perlin noises with
different zoom values or something like that. You'd need to ask Jice
about how he implemented it and what information sources he used...

Mingos.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aave  
View profile  
 More options Aug 27 2008, 4:02 am
Newsgroups: rec.games.roguelike.development
From: aave <tapiovier...@gmail.com>
Date: Wed, 27 Aug 2008 01:02:56 -0700 (PDT)
Local: Wed, Aug 27 2008 4:02 am
Subject: Re: Generating rivers....
Gamedev.net has an article about rivers:
http://www.gamedev.net/reference/programming/features/randomriver/
It is quite similar to what have been discussed here already, but
features some code too. I remember that there was an other one too,
that was more tile orientated, but I can't find right now.

On the topic of Perlin noise and fBm, wikipedia is always helpful:
http://en.wikipedia.org/wiki/Perlin_noise (looka ta the images for
example)
The article has links you can follow further and google finds more. :)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jice  
View profile  
 More options Aug 27 2008, 4:55 am
Newsgroups: rec.games.roguelike.development
From: jice <jice.nos...@gmail.com>
Date: Wed, 27 Aug 2008 01:55:38 -0700 (PDT)
Local: Wed, Aug 27 2008 4:55 am
Subject: Re: Generating rivers....
On 27 août, 08:30, dominikmarc...@gmail.com wrote:

> On 24 ago, 10:56, Malorzean <malorz...@gmail.com> wrote:

> > Also, When you talk about 2D fractional brownian motion, is that just
> > a random walk in 2D, or what is it exactly?

> Like I said in the above post, noise, not random walk. I don't really
> know how it works, since the algorithm isn't mine. fBm, from what I
> understand, is a sum or interpolation of several Perlin noises with
> different zoom values or something like that. You'd need to ask Jice
> about how he implemented it and what information sources he used...

> Mingos.

Indeed, libtcod's fbm is a fractal sum of 2D perlin noises. You take a
perlin noise, it gives you big flat hills. You add a scaled down
version, it results in smaller hills on top of the big hills. You
repeat the process until the details are small enough. The number of
steps is called octave.

A good resource on Perlin noise is (surprisingly!) Ken Perlin's
website :
http://www.noisemachine.com/talk1/

--
jice


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dominikmarc...@gmail.com  
View profile  
 More options Aug 27 2008, 4:57 am
Newsgroups: rec.games.roguelike.development
From: dominikmarc...@gmail.com
Date: Wed, 27 Aug 2008 01:57:23 -0700 (PDT)
Local: Wed, Aug 27 2008 4:57 am
Subject: Re: Generating rivers....
On 27 ago, 10:02, aave <tapiovier...@gmail.com> wrote:

> Gamedev.net has an article about rivers:http://www.gamedev.net/reference/programming/features/randomriver/
> It is quite similar to what have been discussed here already, but
> features some code too. I remember that there was an other one too,
> that was more tile orientated, but I can't find right now.

> On the topic of Perlin noise and fBm, wikipedia is always helpful:http://en.wikipedia.org/wiki/Perlin_noise(looka ta the images for
> example)
> The article has links you can follow further and google finds more. :)

Thank you for the link, aave. This is exactly what I mean when talking
about noises, either Perlin or fBm.

By the way, the idea about making rivers sprung to my mind after
reading one of the pages the wiki links to: the one about creating a
random universe, which uses the noise's absolute values as well :). It
might be interesting to read even if one's not interested in creating
rivers since it might be potentially useful for many things, not only
in procedural random world generation.

Mingos.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google