Some semi-random thoughts on terrain generation - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Some semi-random thoughts on terrain generation (/thread-409.html) |
RE: Some semi-random thoughts on terrain generation - NiLSPACE - 06-22-2013 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. RE: Some semi-random thoughts on terrain generation - tonibm19 - 06-22-2013 (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. RE: Some semi-random thoughts on terrain generation - NiLSPACE - 06-22-2013 (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. RE: Some semi-random thoughts on terrain generation - xoft - 06-22-2013 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? 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. RE: Some semi-random thoughts on terrain generation - xoft - 06-22-2013 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. RE: Some semi-random thoughts on terrain generation - NiLSPACE - 06-22-2013 (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. RE: Some semi-random thoughts on terrain generation - xoft - 06-23-2013 Made a first version, it doesn't look much like the vanilla, but the principle is there. RE: Some semi-random thoughts on terrain generation - NiLSPACE - 06-24-2013 I just keep finding those awsome places RE: Some semi-random thoughts on terrain generation - NiLSPACE - 06-25-2013 I think the world needs more structures, so I went in my vanilla world and got some schematics: schematics.zip (Size: 3.69 KB / Downloads: 196) RE: Some semi-random thoughts on terrain generation - xoft - 06-25-2013 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? |