July 15 – Everything changed when the tile rendering system attacked

As you’ve heard from metadept and omni, I’ve been working on a *complete* rewrite of the tile rendering engine.  The old code was a nightmare of huge repeated hard coded blocks of logic, had long standing bugs, was *dog* slow, and was actually 3 systems running in parallel (one for regular materials, one for platforms, and one for neighbor based tiles like pipes).  I’m nearly finished now with a brand new system, replacing the old complicated set of systems with one simple(r) rule based system that is about a 10th the size in terms of lines of code.

Even though the new renderer is running the new tile neighbor rules system for every single tile every single frame, the fullscreen cpu usage of starbound has actually gone *down* by about 30%*.  The next step is to add caching of chunks into the system so that the geometry for each chunk is re-used for future frames if the chunk has not changed (the system was designed from the start with this in mind).  This should further reduce the cpu usage *dramatically*.

This isn’t committed quite yet, as there are some small missing graphical features which would freak the artists out like not color shifting the materials properly and messed up preview tiles.  Once those small issues are fixed, and caching is added, it can be committed to master.  I’m hoping I can finish this up by early tomorrow, and I should have some better performance numbers then.

(*) The 30% figure is partially due to the new tile rendering system and partially due to some other related changes which also improve perf, it’s hard to tease out which is which.