playMaker

Author Topic: Pooler - Simple Pooling System.  (Read 8402 times)

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 997
    • View Profile
    • Fat Pug Studio
Re: Pooler - Simple Pooling System.
« Reply #15 on: July 13, 2018, 12:19:37 AM »
Hi guys, are these the actions that will be included as a native pooling due for 1.9.1 or you're making in-house actions? If so (i know there's another topic for that, but it doesn't hurt to mention it again) is there a chance of putting in an option to reset local variables on newly pooled items?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: Pooler - Simple Pooling System.
« Reply #16 on: July 13, 2018, 06:25:23 AM »
Hi.
No these will be different actions.
I believe jean is working on these, i will forward the suggestion.
This would be very useful indeed and also good if it is optional.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #17 on: July 18, 2018, 01:48:16 AM »
Hi,

 yep, this is all coming, reset is being studied and is part of the beta, so I expect this to be available when the internal pool system will be out too.

 Bye,

 Jean

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #18 on: April 25, 2019, 12:59:17 PM »
Where can we keep up to date on the status of the pooling system? I didnt see it on the trello board.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #19 on: May 16, 2019, 10:15:28 PM »
Hi,

 Updates on the pooling system will come thru the regular beta cycles.

 Bye,

 Jean

nuFF3

  • Playmaker Newbie
  • *
  • Posts: 15
  • Are we even real?
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #20 on: July 21, 2019, 09:17:28 AM »
EDIT2
Seems this pooler is really REALLY broken.
I've got it to function properly, kinda, by having it execute the 'Pooler Pool' a fraction of a second later than start. Now it works pretty much every time.
It's enough to use a 'Next Frame Event'.

But if it's within the first state during start, its like rolling a dice to see if it works or not.

Why is its like this?

END OF EDIT2



EDIT1
I just tried it, and it seems rather temperamental. Actually, the pooler seems really broken in general.
Sometimes it works just fine, other times it doesn't work at all.

I've got no clue...

END OF EDIT1

I've got a question.

I work with several prefabs that use the 'Pooler Pool', and if the name of the pool has the same name, it tells me to set a unique name for each pool.

So my question is:
Is it possible to create the pool and activating its pooled objects by another 'Pooler Spawn'?
You know, like:
Object 1 creates pool using 'Pooler Pool', names pool "pool 1".
Object 2 uses 'Pooler Spawn' with the name "pool 1".

Or does both actions have to be within the same object? Same FSM?

Otherwise I have to set up a random naming scheme for each prefab copy. That seems rather tedious imo.
« Last Edit: July 21, 2019, 10:02:25 AM by nuFF3 »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: Pooler - Simple Pooling System.
« Reply #21 on: July 21, 2019, 12:28:06 PM »
Hi.
Pooler is a basic pool system made by someone from the community.

If you pre-load several objects in pooler you might indeed need to wait till its ready.

'Pooler spawn' should be able to spawn from a different object/fsm (after its loaded)

For 1 pool you can only use 1 name as it needs to reference from which pool it needs to spawn something.

nuFF3

  • Playmaker Newbie
  • *
  • Posts: 15
  • Are we even real?
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #22 on: July 21, 2019, 12:51:59 PM »
Hi.
Pooler is a basic pool system made by someone from the community.

If you pre-load several objects in pooler you might indeed need to wait till its ready.

'Pooler spawn' should be able to spawn from a different object/fsm (after its loaded)

For 1 pool you can only use 1 name as it needs to reference from which pool it needs to spawn something.

Yes, I've been toying with it for a while, but I've never had this issue of it not working before.
Basically it started to spit out errors/warnings whenever I tried to spawn anything from the pool.
Errors like:
"Pooler: No Such Pool, try using variables for pools names to avoid mistyping."
and
"Pooler: Can't Spawn, max. instances reached?"
even when the pool is created.
BUT, not if I wait one frame or so with the pooling, not spawning from the pool.

This is the sequence that doesn't work:
Scene starts -> 'Pooler Pool' is in the 'start' state -> several seconds later I need to spawn something from the pool -> it spits out errors/warnings.
But if I do the same sequence, but wait one frame before I start the 'Pooler Pool', then it's all hunky dory.
This doesn't make sense to me.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: Pooler - Simple Pooling System.
« Reply #23 on: July 21, 2019, 03:43:22 PM »
Hi.
I tried to repo on a clean project, but i can't seems to repo here.

tested on Unity 2810.4.2f1 and playmaker 1.9.0p17

Does Creating a pool in @start always gives this error on your end?

Is it a large project? do you have many pooler pool action at start?

Are you initially pool object and if so how many?

So far i only get an error if i set 'Initially Pooled Objects to 0 and Max Pooled Objects to any value greater than 0 + Can Grow set to false

In my recent projects i am not using pooler anymore so i can't really test on a larger project.

nuFF3

  • Playmaker Newbie
  • *
  • Posts: 15
  • Are we even real?
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #24 on: July 22, 2019, 01:42:35 AM »
Does Creating a pool in @start always gives this error on your end?

Only when the pool is created in one object's fsm, to then be used by another object.

Is it a large project? do you have many pooler pool action at start?
Currently its not a very large project no, as for how many? Three in total I think.

Are you initially pool object and if so how many?
The one in question is 20.

BTW, I've never had this issue if the pool and spawner is in the same fsm or object. By having both in the same fsm and object I've managed to pull off thousands of instanced objects with no problem.

This seems to be entirely something to do with having the pool created outside the fsm where the spawner is.

nuFF3

  • Playmaker Newbie
  • *
  • Posts: 15
  • Are we even real?
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #25 on: July 22, 2019, 02:33:49 AM »
Got it to work again... no idea why, but it works properly now.
And I'm ready to pull my hair out.

Might have been because I started cleaning up my project, removing redundancies etc.

I should probably stop thinking about it, because it's going to give me an aneurysm.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: Pooler - Simple Pooling System.
« Reply #26 on: July 22, 2019, 04:36:51 AM »
Hi.
I'm happy it works now.

For the  Playmaker pool system there is not Eta yet.

It's been a while since i used Pooler, as now i am using Lean Pool.

It does not have playmaker actions included, But i have a action bundle for it on my TPA asset.

But for basic stuff pooler should be fine :)
« Last Edit: July 22, 2019, 07:35:22 AM by djaydino »

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #27 on: July 22, 2019, 07:14:52 AM »
Quote
It's been a while since i used Pooler, as now i am using Lean Tween.

Pretty sure you meant to say, you are using Lean Pool with playmaker actions for your pooling needs.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: Pooler - Simple Pooling System.
« Reply #28 on: July 22, 2019, 07:34:36 AM »
Hi.
@PlaymakerNOOB :
Ah yes, corrected it, thanks for noticing and mentioning :)

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Pooler - Simple Pooling System.
« Reply #29 on: September 24, 2019, 05:42:15 PM »
Was this updated? I'm getting a nullreference error on PoolerSpawn.