Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Thanks for submitting.Great plugin ,worked wonders on my scene

    Leave a comment:


  • replied
    Originally posted by k3nny View Post
    Hi

    Any idea when the 4.23 version of the plugin is going to be released ?
    I am doing this today.
    Marketplace team's review process I can't tell you how long they take, it's random.

    Leave a comment:


  • replied
    Bumping this- How long before we get the updated version of the plugin for the newly released 4.23 ?

    Leave a comment:


  • replied
    Hi

    Any idea when the 4.23 version of the plugin is going to be released ?

    Leave a comment:


  • replied
    ha, that's what I figured. Will avoid pooling actors into pooled actors. Or breaking eggs ;-)

    Thanks for the clarification on shared pools, seems like I'm on the right track. Appreciate all the help so far!

    Leave a comment:


  • replied
    I do not recommend adding pool components to pooled actors, it's like stepping on eggs.

    A Shared Pool Component exists simply to pack groups of memory together where it makes sense.
    For each class in a shared pool is one less Pool Component you have to attach somewhere else.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    If you want to return a random LevelPart you should make a "switch on int" node with a random int node attached, then call "spawn from shared pool" node using a different class for each node depending of value given by your random int node.

    If random returns <= 1 spawn LevelPart_Base, If random == 2 spawn LevelPart_XX, etc.
    You can do that in blueprint graph.

    That seems to have done the trick, thank you. (my preliminary version of spaghetti BP attached for anyone following along).
    Follow up question: Is there a performance gain to be had using a shared pool and randomizing the class it spawns versus having multiple pools each holding one type of class? Maybe I'm not entirely sure what the main objective of a shared pool would be?

    Unrelated but curious: Can each level part that is part of the shared level parts pool have it's own child pool of actors that are not shared with the parent pool? Put another way can a pooled actor have it's own child pool? (not sharing any pooled actors btw them of course, don't want an infinite loop situation)

    Attached Files

    Leave a comment:


  • replied
    If you want to return a random LevelPart you should make a "switch on int" node with a random int node attached, then call "spawn from shared pool" node using a different class for each node depending of value given by your random int node.

    If random returns <= 1 spawn LevelPart_Base, If random == 2 spawn LevelPart_XX, etc.
    You can do that in blueprint graph.

    Leave a comment:


  • replied
    Hi Bruno,

    Sorry for yet another question, your patience while I sort this out as a BP newbie is really appreciated so far! (hopefully all this helps other people as well)

    I am using a shared pool to hold different level parts for my endless runner (see attached) as each part has different enemies, things to avoid etc.
    Right now the shared pool uses all available actors in a class then moves to the next class in the list and repeats itself.
    I would like it to pick an actor from a template class in the shared pool list at random, is that possible? Am I using/thinking about shared pools completely wrong? Should I just create multiple pools, one for each level part BP and then do a randomization before the spawn nodes?

    Click image for larger version

Name:	sharedpool.png
Views:	8
Size:	11.3 KB
ID:	1645174

    I should also mention, just in case, that I have a level part base class (parent is your pool actor) and all my other level parts extend from that base class. Not sure if that makes things better or worse in this case. Hierarchy looks something like this:

    Pool Actor
    -- BP_Level_Part_base
    ---- BP_level_Part_variation1
    ---- BP_level_Part_variation2
    ...etc

    Leave a comment:


  • replied
    Not always, you just make it possible to happen, so it's good practice to just not make it possible to happen

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post

    They should function normally, just don't add pool components to the child actors that are the same type of pool they are spawned from.
    Right, otherwise we get an infinite loop situation, correct?

    Leave a comment:


  • replied
    Originally posted by rustbucket1971 View Post
    if I have a pool of 10 blueprints and each one includes a child actor does that break the pooling system?
    They should function normally, just don't add pool components to the child actors that are the same type of pool they are spawned from.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    All you need is a proper collision channel setup.
    Make your collision channel ignore itself and set your classes to use that channel by default.
    For example bullets should be in a bullet channel where it's impossible for bullets to collide with each other.

    You can also change a Blueprint's collision channel on pool's begin/end play events.
    Egg on my face, I had my custom collision channel overlapping itself by accident.

    Another question: Let's say I have a blueprint that is part of a pool. If I have a child actor attached to that pooled BP (inside the components tab, not scripted) does that effect performance in any way? In other words if I have a pool of 10 blueprints and each one includes a child actor does that break the pooling system?

    Last edited by rustbucket1971; 07-21-2019, 02:26 PM.

    Leave a comment:


  • replied
    All you need is a proper collision channel setup.
    Make your collision channel ignore itself and set your classes to use that channel by default.
    For example bullets should be in a bullet channel where it's impossible for bullets to collide with each other.

    You can also change a Blueprint's collision channel on pool's begin/end play events.

    Leave a comment:


  • replied
    Originally posted by skydashstudio View Post
    I got a problem. Sometimes, my enemy is destroyed immediately when I start level.
    After trials and errors, I realized event begin overlap of my bullets are fired when a pool is initialized. Their location are 0,0,0

    https://youtu.be/BAmKjlgZQ3k
    (More info in this video.)

    To fix this glitch. I add "event begin play. -> set actor location = player pawn location." to my pooled bullets.
    I had the same issue with my overlaps all triggering at once. I use begin play and moved them to a coordinate (z = -1000) where I knew they wouldn't trigger. Worked like a charm, thanks for figuring that out!

    Given everything in a pool seems to spawn at 0,0,0 this is the only workaround I have found, is there a way to delay events or something? I tried unchecking start on tick and auto initialize but that didn't work.

    Leave a comment:

Working...
X