Author
Topic: Perlin-Free world generation (Read 2363 times)

I was somehow interested in world generation, while playing Dune 2000(its free now) and wasting time. Then I had a bunch of thoughts that eventually led me to world generation.

I'll save you from the chain-like tangent that brought me to this....

Anyway I first started looking it, checking out perlin noise. Now I kind of get it, but then not enough to feel comfortable using. So I started looking for, then found a nice alternative. Unfortunatly I can't recall the link, but it had a nice few sentences that described how you can generate semi-realistic worlds with a simple alogorithm.

You start out with a world array and a stack array for storing positions.

Fill in a few random places with land and water tiles, saving those locations in the stack.

Then scan through the stack, checking 8 direction around of tile and then setting them up either land or water. If the home tile is water, all adjacent tiles turn to water.

Download GK.zipCode attached at the bottom, references to images in the demo above.

Its not perfect perfect, but I'm sure with a little toying around you can get it to do what you want.

What would be interesting is to use a Perlin-like algorithm with a very low noise level as a first pass, then have this algorithm clean it all up. Looking at your screen shot there are obvious patterns so it currently isn't really as random as it should be -- assuming that's due to the random number generator and not a fault in the algorithm.