Days have never been so great that now the performance optimization is millimeter-near to completion, and most importantly – it works.
Honestly speaking, I knew that it will work (uh-huh), but I didn’t expect it will work so good, that we are able to squeeze memory down to <100 on the first completion. We can still squeeze down the number even more, but it’s already a huge achievement for us.
This is also thanks to an extra layer of performance optimization that we implemented last week: Asset Bundle Loading.
Previously we load the windows from Resources folder, a magical folder in Unity that allows us to dynamically load the windows into game scene.
Though, this way of loading has 2 major issues:
1. It is hard to unload the window loaded from Resources folder, and release memory for WebGL client to reuse it. Worse, we absolutely have no control over the unload process, because we have no access to the unload logic. It can only be accessed and improved by Unity staffs.
Also, Unity staffs are just not focusing on memory optimization for Resources folder, because by nature Unity only expects us to use Resources folder for development, but not for production.
2. All windows have to be downloaded into Resources folder at once before players can start the WebGL client. This is not flexible especially with the fact that most players will only access ~50% of windows during their play, so it’s unnecessary to download all windows at once.
With Asset bundle loading, we can split windows into many bundles, then request the game to download necessary ones at necessary situation.
Now that we are mostly done with memory optimization, we will proceed to the final stage, that is to push more fixes, both visual and functional, and ready the build for public release.
And of course, adding new stuffs in-between! I am in the process of adding new cool Challenge window, in the meantime, I think we can enjoy the look and animation of the new Party panel: