Trying to design some object pooling
I've done some reading and it seems like using object pooling for creation of many objects is ideal in many ways.
I am trying to design object pooling for creating the different types of projectiles in my game and am having some trouble deciding how to do it.
1. I've never created any kind of pooling before...
2. I'm trying to decide how to design the actual projectile class. Obviously there will be diff types like: Missle, Plasma, Laser etc...
Everything can derive from "AProjectile" which extends my "MovingEntity" class...however something im struggling with is:
Should I create multiple pools for different types of projectiles? (obviously a Missle can't be a Laser) or is there some way I could design an object that can mold to fit any type of projectile thus allowing me to derive all from the base projectile class and therefore have one pool of projectiles...
Also thought I'd see if anyone has some thoughts / examples of how to actually create some object pooling, as I am new to the concept.
Hopefully that all made sense! Love to see what you guys can come up with. Thanks :P