playMaker

Author Topic: Object Pool Count  (Read 1054 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Object Pool Count
« 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.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Object Pool Count
« Reply #1 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.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Object Pool Count
« Reply #2 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