From leaf at real-time.com Tue Feb 11 14:56:42 2014 From: leaf at real-time.com (Rick Tanner) Date: Tue, 11 Feb 2014 14:56:42 -0600 Subject: [crossfire] World generator (land.c) questions Message-ID: <52FA8E8A.6030304@real-time.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I'm using the world generator (land.c) found in maps/trunk/Info to generate a new continent for the in-progress Pup Land Big World migration. Here's a sample command I ran for a sample map: $ ./lander -m . -m -x 1500 -y 1500 -s 1007623715 -p 300 -n 170 -w 10000 -l 50000 And here is what I have been able to gather along with my questions and comments. Can anyone help clarify or answer my questions for me? - -x = number of 50 tile wide maps on x axis (1500 would be 30 maps that are 50 pixels wide; 150 would be 3 maps 50 pixels wide). No questions here. - -y = number of 50 tile tall maps on y axis (1500 would be 30 maps that are 50 pixels tall; 150 would be 3 maps 50 pixels tall). No questions here. 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? 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? 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. 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? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iD8DBQFS+o6BhHyvgBp+vH4RAllyAJ9wkgc+uFjj7+vIDbt9TyxMS5lsdwCgt2GC eTfUdCFLGUqUA6t6hmIq+90= =7isQ -----END PGP SIGNATURE----- From mwedel at sonic.net Wed Feb 12 00:17:50 2014 From: mwedel at sonic.net (Mark Wedel) Date: Tue, 11 Feb 2014 22:17:50 -0800 Subject: [crossfire] World generator (land.c) questions In-Reply-To: <52FA8E8A.6030304@real-time.com> References: <52FA8E8A.6030304@real-time.com> Message-ID: <52FB120E.2000205@sonic.net> On 02/11/14 12:56 PM, Rick Tanner wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 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.