[crossfire] World generator (land.c) questions
Mark Wedel
mwedel at sonic.net
Wed Feb 12 00:17:50 CST 2014
On 02/11/14 12:56 PM, Rick Tanner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
<snip>
> seed (-s) = ??
>
> Random number used to generate the fractal? Is there a min and max
> value that can be used? Does higher numbers provide more land or more
> water or neither? Higher or lower numbers for more jagged coastline or
> more rounded coastline and islands?
This is just used as the seed for the random number generator. It does not
directly affect the output of the maps in any predictable way.
The main purpose of the seed is that if you use the same seed, you will get
the same map (presuming size and other parameters are the same)
>
> land (-l) = ??
>
> Is there a min and max value that can be used? Does higher numbers
> provide more land or more water or neither? Higher or lower numbers
> for more jagged coastline or more rounded coastline and islands?
There is a min value (11) which is enforced at run time. Not sure if there is
an actual max value that makes sense. Basically, based on the size of the map
(overall spaces), this randomly makes land number of spaces randomly lower or
higher. The default is 300000. Note that this is run also based on passes (-n).
Note that each additional pass of land (-l), the the altitude amount will
likely be less. So if you do something like -l 20 and -n 4000, it will make
make steep cliffs and the like. Conversely, something like -l 200000000 -n 10
will still have a lot of variation, but in general should be smoother (more
rolling hills than cliffs)
>
> passes (-n) = Make lakes and ocean trenches. General note - it works
> better to have more passes, but each pass doing less work - this
> results in more consistent lakes and ocean trenching. Found this
> summary in either the write or source code. No questions here.
Note that passes and land (-l) play with each other. The default (npasses =
40, land=300000) means ~12 million spaces will be modified. However, 1500x1500
is 2.25 million, so it means that on average, each spaces will have its altitude
modified 6 times - sometimes positive, sometimes negative.
But the thing to keep in mind here is that the total number of spaces modified
is -l * -n. Note that the comment above is directly from the source, but
applies to wpasses (-p)
>
> wpasses (-p) = ??
>
> What is this?
>
> Is there a min and max value that can be used? Does higher numbers
> provide more land or more water or neither?
>
> water (-w) = ??
>
> Is there a min and max value that can be used? Does higher numbers
> provide more land or more water or neither? Higher or lower numbers
> for more jagged coastline or more rounded coastline and islands?
-p & -w work the same way as -n & -l, but instead of increasing altitude, it
decreases it.
On a simple bases, if land total (-l * -n) is a lot bigger than water total
(-p * -w), you should get more land, and a lot more mountain peaks and so forth.
If the opposite is true, the land should be flatter and you will have more water.
Note that the land program is very simple and not realistic. For example, if
the finished altitude of a space is <0, then it is water, otherwise land. And
the type of land is based on the altitude of the space. Which means you won't
get high mountain lakes (quite common on earth), high prairies (low altitude in
land.c is grassland), etc.
More information about the crossfire
mailing list