Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on March 27, 2019, 04:34:13 PM

Title: Object Pool Count
Post by: heavygunner on March 27, 2019, 04:34:13 PM
Hello !

I am gonna use this scene for my mobile games. This scene already having 1000+ objects. Now, I like to spawn people all over the city. I have 20 people models now.

I like to have 3 clones on pool for each objects and will spawn random. People will be de-spawn when they die and re spawn again.

Scene already having 1000+ objects. Is it okey to have another 100 objects in Pool ?
I heard having lot of objects in Pool will slowdown the game on mobile.
Title: Re: Object Pool Count
Post by: Fat Pug Studio on March 27, 2019, 04:57:23 PM
No, they won't, they'll only prolong scene loading time a bit. Pooled objects are nothing more than instantiated then immediately deactivated objects that can be activated to avoid instantiation and destroy calls during runtime to avoid memory allocation and garbage collection which cause stuttering.
Title: Re: Object Pool Count
Post by: jeanfabre on March 28, 2019, 05:35:30 AM
Hi,

 some pooling system prefill your pool during compilation ( so will be the built in PlayMaker pooling system coming up), so with this, scene loading time can be just as fast as normal. there will be no penalty for pools to instantiate all its deactivate instances when scene is loading.

 Bye,

 Jean