Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

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

    This is in my do list, I didn't go into networking yet.
    The game I built this for have no networking so probably I have refactoring ahead to deal with.
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      Hello, It seem the demo project is not compatible with Unreal Engine 4.20.2. I could not opened a project.
      Could you update a demo project ? Or I did something wrong ?

      Comment


        On demo project '.uproject' file you can right click and select "Switch Engine Version..."

        I upload 4.20 tonight at home, but really all I do to update a project is simply like explained above.
        Also, I do NOT include binaries on demo projects; I expect Unreal Engine developers to have Visual Studio C++ compiler installed on developer machine:

        https://docs.unrealengine.com/en-us/...ualStudioSetup
        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

        Comment


          Too fix error when I open .uproject in a newer version of engine. I found a solution in this thread.
          https://forums.unrealengine.com/deve...ansition-guide

          But my knowledge about c++ is almost zero. I can use only blueprint. So, I do not know how to modify POOL.Target.cs.

          Comment


            Oh, lucky. I have UE version 4.18. in my machine. And I found a demo for this version. I can open it eventually.
            https://www.dropbox.com/s/xyc86584xt...E4.18.zip?dl=0

            Then, I realized. The Pool projectile works if I set a mesh or sprite as a root component. If I use "DefaultSceneRoot" as a root component, Pool Projectile does not work.

            Comment


              skydashstudio I uploaded 4.20 project with windows binaries (for editor only) here:

              https://www.dropbox.com/s/7ybp8f0x3l...E4.20.zip?dl=0
              | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

              Comment


                I began today experimenting with a new node (+new component) that allows allocation of multiple classes within the same pool, with varying pool size we can determine for each class.
                Classes don't have to obey a hierarchy, they only have to be children of PooledActor class, but they all can be unrelated to each other while sharing the same memory pool.

                I didn't battle tested this yet... I will implement into my personal unpublished project first. When it's stable I add to the public released plugin.



                (each colored bullet is a different Blueprint Class with different pool sizes, stored in the same Pool Component, same spawn node):

                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                Comment


                  I've done experiments with networking today.
                  Conclusion I got is: I will not include built-in replication.

                  This is something devs should implement in a by-project basis to fit particular design;
                  The reason for that is simply due to Pools consuming absurd bandwidth and causing latency spikes.

                  I really don't want devs blaming me for out of control lag in their game, so I'm leaving that out of my hands.
                  ​​​​

                  Btw, the "Shared Pool" Component is still under tests, in my game seems 100% stable so far.
                  | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                  Comment


                    New "Shared Pool" Component and custom Spawn node for that type of Pool are now included on latest plugin update (Unreal 4.20)

                    The workflow is pretty much the same, so I'm not including any new documentation on it for now;
                    The only difference is you can add to the Shared Pool a list of "Template Classes" children of Pooled Actor and how big a memory pool is for each of those classes.

                    Once done that from Details Panel (on a Shared Pool Blueprint Asset's default Details), you can call a "Spawn Actor from Shared Pool" node and specify the target class for that particular node:





                    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                    Comment


                      I love your plug-in, its super helpful.
                      I just have a question for you, I'm using 4.17 and I'm trying to get AI enemies to be used from a pool.
                      I have been able to successfully spawn from pool, return to pool and spawn again. The problem I'm facing is that when they are spawned from the pool for a second time their AI controllers don't seem to work anymore.
                      Any advice you can give me would be a great help.
                      Thanks in advance :-)

                      Comment


                        Jason Ivens did you try to make AIController possess / unpossess on "Pool Begin/End Play" events?
                        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                        Comment


                          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.

                          Comment


                            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
                            You can create a new collision channel for "bullets" and set its default channel to ignore any Actors member of that same channel (bullets).
                            Otherwise yeah, them bullets will collide with each other as soon the Actors are created for the first time.

                            _____

                            This is very important for any game.
                            Epic has some info about these channels here:

                            https://www.unrealengine.com/en-US/b...sion-filtering
                            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              Originally posted by BrUnO XaVIeR View Post
                              New "Shared Pool" Component and custom Spawn node for that type of Pool are now included on latest plugin update (Unreal 4.20)
                              Cheers. I wasn't able to add network support to yours cleanly or in any way that made sense. I made one from scratch and I think if you wanted to add network support (again, cleanly) you'd need to do the same as it's simply not structured for it. It's certainly not a project specific thing, though. I'll use the solution for shared pools based on what you've done (don't worry, for internal use on our single project only).

                              Comment


                                Originally posted by Vaei View Post
                                I wasn't able to add network support to yours cleanly or in any way that made sense. I made one from scratch and I think if you wanted to add network support (again, cleanly) you'd need to do the same as it's simply not structured for it. It's certainly not a project specific thing, though.
                                A key factor is both the Pool Component and Spawned Actors must be members of the chain of Actors owned by a Network Connection to make it work online; but that, from my tests, resulted on a lot of bandwidth traffic so I'd rather not include "built-in code" to do that.
                                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X