Posted September 29, 2019 by Cheeseness
Hi, friends!
Small update today with a bunch of misc fixes as well as some optimisations.
Late game performance is something that I'm concerned about, and as the game gets closer to release, I'll likely spend more time focusing on that. I spent today chasing a better understanding of the automatic sorting that Godot apparently does to reduce the number of draw calls while rendering by grouping together objects that use the same material. Unfortunately, I didn't gain any better understanding or performance increases from the various things I tried to demonstrate that with.
At first, I thought it might be that meshes that use multiple materials might be preventing that sorting from having any positive effect. Splitting meshes so that every individual mesh in an object had one material didn't provide any change in draw calls, even when many thousands of objects were being rendered, so that didn't get me anywhere. While doing this, I did realise that joining all of an object's meshes that used the same material into one mesh would probably allow me to do the kind of grouping I was after manually (albeit at a per-object level, rather than in a way that might allow that gain across all meshes using the same materials. The results are pretty good so far.
Between that and hiding some particle effects that were chewing up resources when not emitting, I've dropped from 67k draw calls to 24k draw calls on the hive from the last dev stream when zoomed all the way out. Still would like to make more improvements, but for now, it's a nice gain to have :)
Enjoy!
Full changelog: