<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15947 >

On Sun, Dec 14, 2008 at 7:09 PM, Madeline Book <madeline.b...@gmail.com> wrote:

> - What is the point of the variable 'k'? And what exactly
>  does the 'i == k' test mean?

Makes sure the code puts a river mouth at the first suitable location
it finds, and ignores the 1% 'coast' chance of making a new river
Rename k to firstriver(+mouth?) or stick the above comment in somewhere I guess.

> - Why do you multiply failsafe by 5?

My checks for placing river tiles and mouths are a lot more stringent
than the previous code (and increased the amount by 75%) so the
failsafe kept running out before it had placed all the river tiles.
I'd say it was intended to stop infinite loops on small thin islands
rather than stop the code before it was finished.

> - What is the point of 'myrand(100) < coast', since 'coast'
>  is always equal to 1 hence the expression only ever has
>  a 1% chance of being true.

It's the probability of making a new river mouth, it's set that low so
it'll keep extending the rivers it already has instead of making lots
of little single tile rivers every time it randomly chooses a coastal

> I'm not sure that adding a hard-coded 75% increase is
> the best solution. Anyway it is fine for now; it would
> not be hard at all to implement a 'rivers' setting that
> controls the amount of rivers the generator places. I'll
> submit this in another ticket after this one.
A percentage from 0 - 500% would be best. Some players don't like any
rivers and think they just get in the way before bridges.

> I tried a hex topology and the hex2t tileset with gen3,
> rivers were generated alright. Perhaps the bug causing
> whatever you found wrong before has since been fixed.

I think the problem is I was using topology 13 with it, never realized
you needed a different tileset for flat and isometric topologies.


Freeciv-dev mailing list

Reply via email to