Playmaker Forum

PlayMaker Help & Tips => Android Help => Topic started by: TIGGYsmalls on September 30, 2013, 08:30:04 AM

Title: Create object skipping frames. [SOLVED]
Post by: TIGGYsmalls on September 30, 2013, 08:30:04 AM
I asked this on the Unity forums as I thought it was more of an engine thing but I'll ask here too.

When I create an object my game will skip a few frames so I was told to hide the object and use it when I need it. But what should I do if I need 10 of the same object? Just have 10 of them loaded from the start? Is there an action I've missed that would help me?
Title: Re: Create object skipping frames.
Post by: TIGGYsmalls on September 30, 2013, 11:54:31 AM
Ok, I got told, if want 10 of the objects in the scene, all 10 should be there from the start.

Is this the best way of doing it?
Title: Re: Create object skipping frames.
Post by: Alex Chouls on September 30, 2013, 10:30:28 PM
This is generally called object pooling, where you re-use objects from a pool of pre-created objects instead of creating new objects while the game is running.

Here are some pooling systems compatible with Playmaker:
http://hutonggames.com/playmakerforum/index.php?topic=4608.msg21650#msg21650

Or you could roll your own in Playmaker...
Title: Re: Create object skipping frames.
Post by: TIGGYsmalls on October 01, 2013, 11:11:03 AM
What Actions would I need to use if I was using playmaker?

Or do you mean keep the items off screen till I want them?

I'll get something working with them all loaded from the start and see how the phone handles it.

Thanks for the information.
Title: Re: Create object skipping frames.
Post by: jeanfabre on October 02, 2013, 02:37:29 AM
Hi,

 You can use something like pool manager plugins. I wrote some actions to go with this.

https://hutonggames.fogbugz.com/?W839

bye,

 Jean
Title: Re: Create object skipping frames.
Post by: TIGGYsmalls on October 02, 2013, 11:30:32 AM
Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtCheckIfPrefabPoolExists.cs(36,25): error CS0246: The type or namespace name `SpawnPool' could not be found. Are you missing a using directive or an assembly reference?

I understand this means the script is in the wrong location but I'm not sure what goes where?
Title: Re: Create object skipping frames.
Post by: jeanfabre on October 03, 2013, 02:41:39 AM
Hi,

 Can you redownload the package? I think I had not updated to the latest pool manager ( 5)

https://hutonggames.fogbugz.com/default.asp?W839

bye,

 Jean
Title: Re: Create object skipping frames.
Post by: TIGGYsmalls on October 04, 2013, 05:45:20 AM
One or two hiccups with my FSMs but apart from that it works perfectly. Thank you.