Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

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

    This is quite funny - and i don't know the answer !!!
    I worked it back, changing your demo class to the same, just letting out the PooledProjectile.
    Then i added the PooledProjectile to the blueprint, and worked in the setup with the construction script and added the functionality to the two events Shoot and Break.
    Somehow this works, and no longer breaks everything.
    And i am fine with that - really.
    Projectiles fly around, i did not want more from that !

    Comment


      Hmm... Sometimes when you recompile component code, Unreal will bug delegates; then you have to remove and attach again the Component you've changed source or delegates will remain broken for that Blueprint.

      ___

      I'm moving delegates setup to PostInitProperties() on next update, that should help making sure this weirdness won't happen again.
      Last edited by BrUnO XaVIeR; 11-11-2018, 12:07 PM.
      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        Nono,
        This is originated on your demo project for 4.20.

        It works fine, and doesn't have problems.
        And you put in there C++ classes for an Actor Pool and a Pooled Actor with Pooled Project, which also looks quite good.
        But you aren't using it !
        Your blueprint examples work fine, but they don't use your C++ demo sources.

        Whenever you try to make Blueprints out of them, the Projectile will break after a while, at least, when restarting the project, but somehow this happens after a time, so you don't really know in the beginning, that there is something going on.
        What you see very fast, that you cannot build the project any longer, if there is a c++ based blueprint in there.

        You can try yourself with your demo, maybe you find out what really is going on.

        It's not, that i am doing fancy stuff, nor change too much.
        If i am missing, calling Super somewhere, it is missing from the beginning, and i don't see it yet.

        Comment


          The change mentioned above is published on Marketplace now, for both UE4.20 and UE4.21.
          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

          Comment


            Sorry for being so unclear for you and thank you !

            Comment


              Just to give a Show...
              Your pool is awesome !
              https://youtu.be/Gu9hXCiEtdc?t=135
              Any projectile in here (5000) and Explosion, like HitExplosion or Muzzleshot is Pooled by your Object Pool with the C++ implementation, that you have given me/us.
              And i don't own the ultimate PC, i "just" own a 4 years old i5 with a GTX 970

              Comment


                I got the same glitch mentioned on comment #149. (https://forums.unrealengine.com/unre...ool-Component= ) The editor crash when I delete "Spawn Actor From Pool" node.

                https://youtu.be/tu--CKPIZbc

                I deleted all other nodes which are connected to Spawn Actor From Pool node. But the editor still crashes.
                I create another nodes of "Spawn Actor From Pool". When I connect a pool component to this node, the editor crashes.

                Comment


                  Originally posted by skydashstudio View Post
                  I deleted all other nodes which are connected to Spawn Actor From Pool node. But the editor still crashes.
                  I create another nodes of "Spawn Actor From Pool". When I connect a pool component to this node, the editor crashes.
                  Can you launch the Editor from within Visual Studio, and see if the crash gives a trace?
                  Also, collapse the node to a sub graph and delete the graph, see if that helps.

                  _____

                  There are too many reports of Editor crashing when deleting (any type of) nodes.
                  So I have to make sure this is caused by me and not some random Editor bug; so far I have never managed to crash UEditor when I delete any nodes.
                  Last edited by BrUnO XaVIeR; 11-19-2018, 02:32 AM.
                  | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                  Comment


                    skydashstudio Watching the video again... I see that you did "Split Struct Pin" on the "Spawn Options" struct pin.
                    However, the plugin expects that struct pin to exist on the node, it must find that struct pin in order to work properly... this might be related to the crash you got there with that node.
                    Last edited by BrUnO XaVIeR; 11-19-2018, 09:09 AM.
                    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                    Comment


                      I have submitted an update for UE4.20 and 4.21, trying to prevent that from happening.
                      Still, I'm in the dark about that crash, I need a way to reproduce it here, up to now I simply can't see that crash happening anywhere.
                      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                      Comment


                        Wow! I collapse it in to sub graph. Then I can delete entire sub graph without crashing! Thank you for advise.

                        Comment


                          @BrUnO XaVIeR
                          Do you have any best of practices for data driven pooled projectile spawning? My game will have around 100 weapons with projectiles of varying speeds, hit boxes and damage values, and I would like to spawn all of them from your Synaptech Object Pool component attached to my Player_Character, but I'm having difficulty. Should I cast back to the Player_Character on each Pooled_Projectile's Event Pool Begin Play and grab the variables or is there a better way to accomplish this without casting from each and every projectile's pool begin play?

                          Thanks!
                          Last edited by Ghoztt; 01-21-2019, 10:13 PM. Reason: Edit: wrote "PooledProjectile", but meant "Synaptech Object Pool"

                          Comment


                            Why are you attaching PooledProjectile to a Character?

                            They should be used on bullet actors only.

                            Also, for multiple bullet classes, there's a "Shared Pool" system which you can use to manage multiple different bullet types within the same Pool Component.
                            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              I'm terribly sorry. I meant to say "spawn all of them from your Synaptech Object Pool component attached to my Player_Characater" - previous post has been edited so it may be easily re-read.

                              I just read through your "Shared Pool" component update in this thread and I'm a little confused about how it works:
                              In your attached example image, is it basically saying that there are 170 objects loaded into memory? (25 + 100 + 45) If I have 100 weapons each with their own projectile and I have to add each one into this "Shared Pool" isn't it going to end up with me having THOUSANDS of objects loaded into memory with only about 1% of them being used at any point in the game? Or can I set the first parent projectile to 100 (the most active bullets possible from any weapon in the game) then just add Template classes that are all children of the first parent projectile and thus there will only be 100 objects loaded into memory?
                              Attached Files

                              Comment


                                If each of your weapons use a different bullet class for projectiles, then yes that would result in thousands of bullet actors.

                                What I would do instead is just make those weapons use the same set of limited bullet classes.
                                Maybe changing properties such as base velocity of bullet class when character switch to another weapon. Many games do that, a different sprite/shape, different Particle effect activated, but the bullet actors are still the same.

                                If you make 1 weapon = 1 bullet class then your game will become a mess even if you use shared pools.

                                The idea is make bullets modular actors you manipulate properties on when Pool Begin/End Play is called..
                                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X