So...I just got finished typing what should have been this blog post when the page decided to refresh itself, causing me to lose all of my precious typing work. Great.
Anyway, with the collision detection rewrite being (mostly) out of the way, I decided to spice up the otherwise quite boring and predictable terrain generation. Originally, the terrain was generated via a 2D simplex noise map with 2 octaves. This had the advantage of being fast, but the disadvantage of being boring. After reading
this post from Notch's old blog, I switched the terrain generation to a 3D noise-based system. This was the immediate result:
A basic 3D simplex noise map generates a world of intricate caves as you can see here. I'll likely use this for the underground world's terrain generation. When I tweaked and added this to a flat and uninspiring 2D noisemap generation, I got some interesting results:
Adding another octave to the 3D octave generation results in more "realistic looking" stone structures:
This system has one fatal flaw: I have no idea how to remove the floating structures that are disconnected from the ground. I found that overhangs and interesting structures and mountains are often generated via a 3D noisemap that is
carving a 2D noise-generated landscape. Here's an example of that happening with a 1D noise base and a 2D noise map.
The main issue with this is that the carvings that create the overhangs often look jarring and unnatural, however apparently linear interpolation helps to solve this problem. I'm going to be implementing a system where the base is 2D and the carvings are 3D.
Overall, world generation is fun.