code vs lua and custom worldgen
on this fourm there have been a few and i'm 1 that have been trouble with block gen in lua mainly the speed of script. I think there should be few different forms of block gen that are implement in the minetest code that lua can acess.
The lua api that should be added to minetest
1. chunk gen ( a function that has basic position limits, block limits , replaces , etc )
2. remove nodes from block
3. place nodes in block
4. replace nodes in block
2-4 are allready in the lua script but i only work for one node at a time. There should be a way of doing it in a space so that we could remove the for next loops in lua that are very slow.
my idear for a way of customizable worldgen that is flexible design is to break up the worldgen / chunk code in to a work order list that can be edit. The items in the list range from gen perln noise to placing trees. there are 3 main types of items in the list that are gen 2d 3d perlin noise , gen nodes that do not need to know the nodes next to it and nodes that do ( torches / tree are a good examples ). with a bit of management you can stop problems of tree leaves missing by only gen them when all block around have been gen/loaded.
if the custom worldgen list is used with a bit of work you could have a normal map with floating islands at the same height or even a dozen of different styles of map gen.
The lua api that should be added to minetest
1. chunk gen ( a function that has basic position limits, block limits , replaces , etc )
2. remove nodes from block
3. place nodes in block
4. replace nodes in block
2-4 are allready in the lua script but i only work for one node at a time. There should be a way of doing it in a space so that we could remove the for next loops in lua that are very slow.
my idear for a way of customizable worldgen that is flexible design is to break up the worldgen / chunk code in to a work order list that can be edit. The items in the list range from gen perln noise to placing trees. there are 3 main types of items in the list that are gen 2d 3d perlin noise , gen nodes that do not need to know the nodes next to it and nodes that do ( torches / tree are a good examples ). with a bit of management you can stop problems of tree leaves missing by only gen them when all block around have been gen/loaded.
if the custom worldgen list is used with a bit of work you could have a normal map with floating islands at the same height or even a dozen of different styles of map gen.