Optimization Progress May 18 2024


A lot was made, indeed! As for how...


1. Removing Redundant Game Objects

The biggest removal here: the ocean floor. The one shown in an old version of the Jiaolong Summon anim. It's very unlikely to be used again, and with how big it was... yeah.


2. Giving Singletons Some Love



In terms of Singletons, my code had no Singletons. Now, I know what some of you are thinking... "Tespy, that's a good thing! Don't you know that design pattern is Satan?!" First off, that's a bit harsh. Used well, it can be closer to Jesus. Second, my code had a LOT of FindObjectOfType calls, which (even when used exclusively on init) can add up on performance costs. Applying this design pattern to most of the codebase's manager scripts allowed me to prune a good majority of said calls. As for what made me confident in the decision... It was this rule of thumb:


"Ask yourself 'Would an online multiplayer version of my game probably need multiple instances of this class existing at the same time?' If the answer is 'yes', Singletoning it would be poison. Otherwise, it'd probably be harmless at worst."


smudge-Cat-Online-Multiplayer

It was just a hypothetical ^^; It's not out of the woods yet anyway. The next item on the jungle-escape plan: asynchronously loading and unloading the Summon anims. Been applying that approach already, and things seem good so far.

Get Trigram Islands

Leave a comment

Log in with itch.io to leave a comment.