MirceaKitsune wrote:Traxie21 wrote:Tried, failed epically.
Hmm. From what I imagine, there would mainly be two steps to get a basic implementation of this. First one would be to define slabs for dirt and sand, and make sure they work and render correctly when crafted and placed manually. Second step would then be to then add the nodes to the mapgen. I think one could look at the code for randomly spawning flowers and grass to see how that works, and use a similar pattern for slabs. For starters at least... the final script would need to arrange slabs in a correct pattern, not just spawn them randomly like flowers. And at least group them somehow, like ores tend to come in batches (to achieve different step levels gradually on hills).
Inocudom wrote:If this is ever brought into the main game, it will have to be made certain that it won't cause CPU and RAM to increase too much.
Not something that should normally decrease performance, unless something is very wrong in the engine. Only thing it could slow down would be the time it takes to generate a new chunk by a few milliseconds (the user wouldn't even notice). Rendering slabs should normally not be any slower than rendering full blocks, so no performance impact there.
If you haven't seen this yet, check it out:
http://forum.minetest.net/viewtopic.php?pid=80568#p80568One of the enhancements I was planning was gradient function that would allow slope (amount and direction) to be calculated for any noise algorithm (including composite noise, of course). This would have made it easy to determine whether to use a full block, a stair block, or a slab in any particular location on the surface. It's true this would not have impacted performance much. Counting just the number of noise calls (adding up octaves) necessary to produce the features you see in that terrain I generated (no trees, beaches, biomes, or caves), Mapgen v6 uses 23 2D noise octaves for just those features, while the new Mapgen I created uses 11. The call to determine surface slope would add another 5, which is still only 16 total 2D noise octaves.
Maybe I'll continue the work in a fork, but I'm not sure how long or how often I could maintain one. The immediate negative reception of my code tells me it'll be unlikely any change I ever make will make it into the official repos. It's unfortunate, because there are a lot of features people have mentioned that would be fun to work on.