“Wait, is this vaudoo magic ? A half-weekly update ? And 15 to 45 ? What the hell are you talking about ?”
Don’t lie, I hear that voice in your head. But no, I am totally serious.
The reason I’m posting a weekly update so soon after the last one is because I’m actually planning on patching the game tomorrow, before the next community event ( hint, hint: I-Novae Community Events )
This patch will contain no new feature and no particular fix. Instead, I’ve been focusing on the past days on performance.
The main idea here was to profile ( benchmark ) the game in heavy stress conditions ( a 400 ships battle ) and see what kind of framerate I got. As expected, it wasn’t all that good ( around 15 fps on a 6700K + 1070 GTX ). The result of the profiling gave all sorts of… interesting… results. Including a lot of dumb mistakes causing performance issues.
Here are a couple ones:
- Changing the emissive values on the hull of a ship was done every frame, even when the emissive value didn’t change
- For similar reasons, collecting the lights on the hull of the ship was similarly done every frame, for every ship. Even when the light intensity didn’t change. Oh, and caused a lot of memory reallocations for no good reason.
- Gathering statistics for the graph screen ( you know, the one in the F10 debug menu ). Even when the graph screen isn’t opened.
That last one alone gave a stable +22% performance increase.
But this is only breakfast. The meal is coming.
Thrusters, lights and turrets were all attached statically to the ship mesh. So even if the ship was tens of kilometers away, they still added a ton of overhead to the scene-graph. They weren’t rendered, however they were still processed in the scene-graph. A capital ship could easily have hundreds of nodes, each causing matrix updates every frame, each being frustum-culled independently.
Instead, I am now doing a rougher view-cone vs actor test, and attaching / dettaching the lights, thrusters or weapons dynamically on demand. This helped to reduce drastically the stress over the scene-graph and relieved CPU usage.
Doing this for thrusters brought a +20% perf increase.
Then doing this for lights brought another +30%.
And doing it for turrets brought yet another +20%.
The net result of all these optimizations is that it tripled the framerate in this huge 400-ships battle, bringing it to a playable 45 fps, hence the title. This is in extreme mode in 1440p. I’m sure you could easily reach 60+ fps in high on the same system, or 60+ in extreme+4K if you had a 2XXX card.
The stress test was performed in isolation, and that’s an important point. There was no planet in the background, no nearby space station, nothing else going on. You’re not going to see a 300% performance increase in game no matter what. Where it should make a lot of difference is during huge battles ( the 100+ ships at Glimmerfall / Hebellos ) where I often noticed the framerate dipping below 40 fps. It should now have become rock solid 60-70+ even with a lot of close-by ships and action going on.
The reason I’m posting this weekly update a bit in advance is to ask the community to play the current patch ( 0.4.4.0 ), and check their framerate in huge battles, so that it can be compared this week-end after the performance patch is out. The tests I did are only valid for my own system, but overall everybody should notice a significant performance improvement in heavy battles, and a small fps improvement in space / in calm scenes.
More assets preloading
I also finished my investigations about micro-freezes / slowdowns when approaching an objective. As expected, there was still a bunch of assets which were not preloaded, and which caused disk access. This wasn’t much of an issue on an SSD, but on a mechanical drive it could explain the micro freezes when entering the display range of a station or ground base.
The following are now properly cached / pre-loaded:
- Damaged materials ( destroyed modules have extra materials and textures )
- The new ships skins ( cruiser, interceptor )
- Some files were accessed to cache sockets ( attachment points for weapons and lights ); it happened only once, but was also causing micro freezes
I would also ask the people who have been experiencing these micro-freezes to pay attention in the next patch and see if the micro-freezes have disappeared, or at least been reduced. Please let me know, thank you.