Posted October 19, 2024 by forloopcowboy
#performance #pooling #vfx
There is not much to talk about for this release, but there was a lot of work involved in it. In summary, I looked at the core elements of the cannons and decided to implement some visual effects to highlight them. They are:
As for performance improvements, I will inform you: Behind the scenes the situation was very crude. Lots of `Instantiate` and not enough `Destroy`s or kill planes. This resulted in the scene being littered with active Rigidbodies falling eternally or rolling around the bottom of the ocean. Not to mention the unnecessary amount of duplicate visual effects. So I build around Unity's ObjectPool and reduced the amount of active "expensive game objects" from 200-300 at any given time (mind you, before any effects were being instantiated...) to a absolute total of 170 game objects instantiated throughout an entire level, and only 30-50 active during the peak of activity.
I am pretty happy with the resulting game architecture. It will allow me to continue adding content in the form of cannons and levels without having performance concerns brewing in the back of my head.
Let me know if you enjoy the upgraded visuals! And if you notice performance improvements, don't hesitate to let me know as well.
Thank you for trying Recolonizer!