Some semi-random thoughts on terrain generation
Take a sphere, with its equation:
x^2 + y^2 + z^2 <= r^2
Evaluate for each block, if it's true, set block to endstone, otherwise set to air.

Now you want to distort the sphere a bit, so add some 3D noise:
(x + NoiseX)^2 + (y + NoiseY)^2 + (z + NoiseZ)^2 <= r^2

You should get a "clump" shape. Done.

For optimization, you can add some initial tests - if the chunk is too far away from the [0, 0], you can be certain that there's nothing to be generated there, so just fill with air without evaluating anything.

Would you like to try writing that? Smile I would recommend writing it in C++ as a separate CompositionGen. The cNoise class has no Lua API, so you'd need to implement your own noise functions, and it would be super-slow in Lua.
Reply
Thanks given by:


Messages In This Thread
RE: Some semi-random thoughts on terrain generation - by xoft - 06-22-2013, 04:23 AM



Users browsing this thread: 9 Guest(s)