Work on this is going tremendously, but we’re still waist-deep in it at the moment.
The exciting possibility is that 2 of the biggest bottlenecks in the game’s performance may not only be reduced, but may more or less disappear completely.
We've converted the map to use ‘static vertex buffers’. Before the game was forced to composite each and every frame of the game from scratch, forming a frame-by-frame list of polygons to draw for both world and characters alike. It would then ditching them, and starting anew for the next frame.
Now, since we’re not confined to draw order and characters can all be drawn after the world, we can construct a set of one-time vertex buffers that'll hold all the composited geometry of the world for as long as you're stood in the same chunk.
Then, as soon as you run onto a neighbouring chunk and trigger the map streaming, a new vertex buffer is composed to represent the geometry around you - which can then be reused and reused again until something changes.
This means something rather costly that used to happen every frame now only happens every ten tiles, when transitioning between rooms or when someone opens a door. (Or when something breaks down a door.)
Another big bottleneck of the game was the smooth lighting, not only for the actual iso order drawing that we described in detail last week, but the calculations of the lighting across the loaded world’s tile grid.
Now we’re using OpenGL 3D for our rendering, it means we can easily transfer responsibility for lighting to the graphics card. As such, Binky has been working on a new lighting system that'll not only speed the game up massively, but will also look a lot prettier and more accurate:
It goes without saying these are WIP and are tests, and we're not changing the name of the game to Project Disco-oid.
This all means that we're taking the slow lighting calculations out of the PZ java code, and putting it into super fast native (and probably hardware accelerated) OpenGL code.
If this process takes much longer to finish off, we may consider doing a beta build with our former badly compressed textures - just to get a version out there.
It’s not something we’d want in an official version, but would give us an opportunity to test Romain’s fixes that have been in development during the overhaul. This would be to make sure that we're on track with the rest of the game once these changes are complete, as well as tide over those waiting for new stuff!
We’ll come up with a good compromise that scrapes under the memory budget if we can, and will see where we are in a couple of days.
Until then! Love yus!