playMaker

Author Topic: Game Object Pool with ArrayMaker?  (Read 3400 times)

polygon

  • Playmaker Newbie
  • *
  • Posts: 18
Game Object Pool with ArrayMaker?
« on: September 21, 2014, 08:23:38 AM »
Hi :)

I'm trying to create a pool of objects with playmaker and arraymaker but can't figure out how to do this properly.
To be more precisely I'd like to spawn a prefab 100 times while the level is loading and store them in an array of game objects but I have unfortunately no idea how to do this :(

Best regards,
Daniel

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Game Object Pool with ArrayMaker?
« Reply #1 on: September 21, 2014, 05:19:53 PM »
ArrayMaker can store the objects, but for actual pooling, you'd want to look into something like PoolManager (http://poolmanager.path-o-logical.com/). There isn't tons of tutorials on doing that, but the Playmaker Actions are pretty easy to understand.

app_advisory

  • Junior Playmaker
  • **
  • Posts: 80
    • App Advisory
Re: Game Object Pool with ArrayMaker?
« Reply #2 on: September 21, 2014, 07:59:38 PM »
Hi,

poolManager is a really cool stuff.

You re right.


But I have a big question :


How can I ise it with Photon multiplayer?

If I want to spwawn with poolManager and instant irate this spawn with a network-photon instantiate ?

Can I do that ?



Thanks a lot for your help.


Best regards,

Anthony

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Game Object Pool with ArrayMaker?
« Reply #3 on: September 22, 2014, 12:43:26 AM »
I haven't a lot of experience with Photon yet, but I'd imagine you're just telling it to spawn a pre-fab which seems pretty basic. Maybe someone else would like to chime in?

app_advisory

  • Junior Playmaker
  • **
  • Posts: 80
    • App Advisory
Re: Game Object Pool with ArrayMaker?
« Reply #4 on: September 22, 2014, 03:19:19 AM »
On fact toi have to instantiate the prefab with photon. It's a special method.

And when there is a lot of instantiate to do, with the same object, it's better to use poolManager...

But poolManager + photon ...?!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Game Object Pool with ArrayMaker?
« Reply #5 on: September 23, 2014, 04:19:02 AM »
Hi,

 I don't think there is a pool system for Photon since photon use resources to get its prefabs to instantiate.

I'll ask the team to see if they have something.

 Bye,

 Jean

app_advisory

  • Junior Playmaker
  • **
  • Posts: 80
    • App Advisory
Re: Game Object Pool with ArrayMaker?
« Reply #6 on: September 23, 2014, 04:19:43 AM »
Thanks Jean you're the best !