Cuberite Forum
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 - xoft - 12-29-2012

Now with 256 blocks high level it is possible Smile


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 03-05-2013

are these [Image: viewimage.php?img=9163_1291671129.png] mountains still avalible? if not maybe its nice for the extreme hills biome. i found the picture here: http://www.minecraftforum.net/topic/95155-mcserver-a-c-server-by-one-man/


RE: Some semi-random thoughts on terrain generation - xoft - 03-05-2013

Maybe if FakeTruth can resurrect some of his old terrain generation code. Oh wait, it might be in the svn repository. Makes me curious Smile

But I set out to code IPv6 compatibility today so that's my immediate task now.


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 03-05-2013

i hope these mountains can be put into the generator. they are the perfect extreme hills biome mountains.


RE: Some semi-random thoughts on terrain generation - FakeTruth - 03-05-2013

I think that used a 3D texture made of fractal noise. MCServer then came with an 8mb file containing that noise xD it's basically just using 3D noise as a density map, very simple but looks cool


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 03-05-2013

yea its awsome


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 03-06-2013

do you think its possible to put it in the generator or should a complete new Heightgen be created?


RE: Some semi-random thoughts on terrain generation - xoft - 03-06-2013

Problem is, this is not exactly height generator. Because height generator cannot make overhangs.

There are two ways of achieving overhangs - either modify the composable generator architecture so that instead of height generator and composition generator, we get a 3D composition generator.
*or* (probably preferably)
keep the height generator and modify the composition generator so that it sometimes generates overhangs in a layer from the generated height to some depth (~sealevel?).


RE: Some semi-random thoughts on terrain generation - NiLSPACE - 03-07-2013

and i gues its pretty difficult to implent into the composable generator.


RE: Some semi-random thoughts on terrain generation - xoft - 03-18-2013

I'm gonna try my luck with the lake generator.

What I'm thinking is, make a cBlockArea object to hold the lake, fill it with "no action" blocktype, then hollow out a random number of round "bubbles"; fill those with the liquid, if it's lava, make the boundary stone. Then merge the blockarea into the generated chunk using a special merge strategy:
- "no action" blocktype doesn't modify the generated chunk
- liquid blocktype overwrites only stone, dirt, grass, gravel, netherrack or mycelium in the generated chunk
- stone overwrites only dirt or grass in the generated chunk (but not air!)
- air overwrites anything but liquids in the generated chunk
This way, even if a lake is generated inside ocean, it shouldn't be much of a trouble - it wouldn't disturb the ocean, maybe just hollow out its bottom a bit. If a lava lake generates on the surface, its boundary will be stone; at the same time if there is a block on its boundary missing, it will allow the lava to flow out of the lake (good).

The lake's XZ position will be based on a random displacement of the chunk's center coords by a capped amount of blocks, so that only a few lakes can actually intersect any given chunk. The Y position will be capped at the max height in the chunk for which the lake is generated. Thanks to HeightGenCache, that should add only a minimal overhead.