Some semi-random thoughts on terrain generation
So i've been wondering for a long time if The End is hard to implent or not. I think it is rather easy to implent since it is just a clump of End stone, but on the other hand I think it is hard since it has to stop generating blocks after a while.
Reply
Thanks given by:
(06-22-2013, 03:29 AM)STR_Warrior Wrote: So i've been wondering for a long time if The End is hard to implent or not. I think it is rather easy to implent since it is just a clump of End stone, but on the other hand I think it is hard since it has to stop generating blocks after a while.
There is LimitWorld, you can take code from it.
Reply
Thanks given by:
(06-22-2013, 03:47 AM)tonibm19 Wrote: There is LimitWorld, you can take code from it.

I know I wrote it myself. but thats not what I ment. You can see The End as a sphere. Its not endless like the Nether or the Overworld. Its a floating sphere of End Stone.
Reply
Thanks given by:
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:
Alright, I'll try writing that. It's been some time since I've written something for the world generation.

After seeing a few pictures of the End island, I have to completely change the algorithm. It seems that the island is not related to a sphere in any way; instead, it is made of two modified random heightmaps, the top one with low frequencies and the bottom one with higher, and an additional offset to height based on the distance from the center. The end stone is then placed in between those heightmaps. A distortion is added to the lower heightmap, so that there are small crevices.

It is even possible that instead of the lower heightmap, a 3D noise is used, but definitely the top surface is made by a heightmap.
Reply
Thanks given by:
(06-22-2013, 05:02 PM)xoft Wrote: It seems that the island is not related to a sphere in any way;

I know but it was just an example to make clear that it is not unlimited like the Nether/Overworld.
Reply
Thanks given by:
Made a first version, it doesn't look much like the vanilla, but the principle is there.
Reply
Thanks given by:
I just keep finding those awsome placesBig Grin


Attached Files Thumbnail(s)
   
Reply
Thanks given by:
I think the world needs more structures, so I went in my vanilla world and got some schematics:
.zip   schematics.zip (Size: 3.69 KB / Downloads: 196)
Reply
Thanks given by:
Are those "stolen" from vanilla? We cannot do that. We need to build our own; even if they look the same, they need to be traceable back to our work. We don't want Mojang to come after us because of stolen stuff, do we?
Reply
Thanks given by:




Users browsing this thread: 14 Guest(s)