Open gaelysam opened 4 years ago
It appears that attempting to generate a 1000x1000 voronoi map crashes. It is a heavy process, and the map it creates saves out to a 120-130 MB file, deserialized from MT. I would like to do away with the map altogether, replacing it with a more efficient test to determine distance to the center of the voronoi cell from the generated chunk center.
The generated voronoi map saves the index of the cell, and the distance to the cell center pos. Rather than rely on this memory heavy data struct, I should only test the distance once, during on_gen, and only for the center pos of the generated chunk. The voronoi map is also an issue because it is tied to a scale factor, and so areas outside of -10000 -10000 x 10000 10000 will have issues if not crash.
The current dev branch should provide a less memory intensive alternative, as it doesn't use registered biomes or lib_materials/lib_ecology biomes. I need to update this dev branch code to accurately point to default nodes instead of lib_mat/lib_eco nodes.
I updated the dev branch code. Please test that branch.
I have updated the code significantly.
Recursive voronoi cells. Also included two data files, so that you don't crash when trying to generate the files.
nice! will test this weekend
I systematically get crashes, with memory saturating after several minutes of calculation. I'm using LuaJIT. Here are the logs: