Mobile devices: Fix for crash on entering a stage / arena (Patreon)
Content
I've seen a few reports here and there of the game being unstable on certain mobile devices and crashing when entering a stage / arena, especially after going through multiple characters in the character list when having dirt and fluid effects enabled.
I'm happy to say I've managed to fix this after reproducing it on my tablet.
The fix will be available with the release happening this weekend.
And since we're here - REMINDER: If you encounter further instability or low performance, please try switching back to the legacy renderer (available under Options). While this disables the sweat, dirt and fluid effects, it will be faster and potentially even more stable.
More in depth details, if you're interested:
While this was not a bug in the game per se, it had to to with the default value Godot sets for the maximum number of descriptors per pool. If you have no idea what this is, it's ok, I had no idea either until earlier today :) It has to do with keeping track of the allocation and deallocation / garbage collection of resources during rendering. Set it too small, and you could run into a limit when trying to allocate more - which resulted in a crash. The default value is 64.
Some devices can apparently manage this in a good way, and weren't affected by this issue. This was actually the case with my phone. Some manage things differently, and run into the limit if the game tries to allocate a lot of resources in a short amount of time (which is the case with dirt / fluid accumulation enabled).
I bumped the value to 1024. This should cover things nicely. The cost is several more kilobytes of memory use, so completely negligible, and the crash is gone.