I ran to a problem with the lake algorithm, as I create it by using a heightmap and the problem with this was that holes in the ground will not be filled, of course I though that just creating a floor under the lake and walls at the border will fix this but there was one special case to which this "fix" did not work very well, here's a picture
As you can see there is a huge hole here and the reason for this is that above there is a cliff which makes it the highest elevation in the heightmap which in turn makes this side of the mountain not being filled, thankfully fixing this was quite simple and effective but it does not follow the wall perfectly as it will convert some blocks to water making the wall a little more linear.
Other than this problem, I've optimized the lake generation as well as the creation of heightmap.
Oh and I did try to do something about the rendering of chunks as the useless garbage allocation is insane, but the mesh creation in unity blows and I can't actually prevent useless garbage allocations, but I did make it a little faster and use less memory
No comments:
Post a Comment