World-gen Experiments
World-gen Experiments
Posted by Jeff Disher
World-gen Experiments
The work on world generation for the next OctoberProject pre-release seems to be going well.

I didn't go for the traditional noise approach (Perlin noise, for example), mostly just because I thought this would be more interesting to play with but I also worry that traditional noise algorithms are starting to "feel too familiar" and also the OctoberPlains interface would make complicated terrain too hard to navigate (given its top-down perspective).

So, I came up with something which basically just averages random numbers in a 2-dimensional "cuboid column" overlay. Each cuboid column has a "biome" which is the average of the 5x5 column "biome votes" around it. Each also has a "peak height", which is the average of the 3x3 "peak votes" around it (which are random + a skew based on biome). Then, each is assigned a random peak location and the height map for every block is then calculated by averaging the 3 nearest "peaks" of the 3x3 cuboid columns around its cuboid.

In the end, this creates a terrain shape which has random slopes and variations around high and low points but feels not too "busy" while also having a somewhat organic feel. In short, I am pretty happy with how it turned out.

So far, this is just using the height map to place the dirt layer with everything below being stone and everything above being air or water. Ores will likely be generated based on depth and some basic random generation (not sure if I will bother clustering these or leaving them as truly random - clustering makes cuboid boundaries require consideration) and the flora/fauna is something I want to base on both the biome value but also some kind of "soil heuristic" (like only spawning vegetation in small valleys while trees could spawn in a few more places, depending on the biome).

Details still to be determined but so far it is going reasonably well,
Jeff.