Today I achieved more than 2x speedup of terrain mesh generation through some trickery with height values. The visible terrain was taking about 2.6 seconds to regenerate, now it’s a mere 1.25. This is really good news. This will very visibly reduce these:
- the delay when you dig a block
- slowdowns when water/magma is propagating
- slowdowns due to light changes at dusk/dawn
- slowdowns when moving quickly through the world
Even better, I have some more optimizations to do there, basically Survivalcraft is very eager to regenerate geometry around player as soon as possible. This is not always necessary, so there might be savings to be had there as well.
An unexpected side effect of that optimization is that bounding boxes of chunks are a bit smaller now, giving drawn geometry saving of about 5%. You can expect FPS to go up by about that much, although this is well below of what you can perceive without a FPS counter.
I also fixed the two bugs I mentioned in the earlier post. And of course immediately noticed one more: an ugly visible line on chunk boundaries on water/magma. This is due to my dirty tricks with texture coords to save memory. It’s not very noticeable, so not too bad.
All in all a good day!
Microsoft still says nothing about 1.9.