Questions about Object pooling
I'm working on a tower defense game and have now come to the point where I need to implement object pooling for the different projectiles.
What recommendations do you have? Should I split the pool into several small ones, for example one pool for each tower type? or only have one bullet pool and change everything about it (sprite, damage and so on) every time a tower activate a bullet?
Right now I'm leaning toward example one but since every tower will have several different upgrade paths that can modify the behavior I'm not sure how to proceed. Let's say one upgrade adds a small amount of AOE/splash damage on impact, I would add this effect as a separate script on the projectile which means I either have to break down the pools into really small ones containing all the possible combinations of upgrades, or have one projectile with all scripts and enable/disable them as needed when the bullet is fired.
I'm sorry if the question is not very specific but in short I would like some input on how to think when designing the pools. Specifically with regards on performance when it comes to modifying values / scripts on the pooled objects versus having several minor pools.
Your answer
Follow this Question
Related Questions
Object Pooling Help 0 Answers
Unity Compiler Error not all paths return a value - Object Pooling 1 Answer
How can I fix my object pool to continue after original pool is exhausted? 0 Answers
Can someone post a generic object pool script? 4 Answers
Could I get an explanation of object pooling and how to do it? 2 Answers