Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

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

    #46
    BrUnO XaVIeR when are those will be available to download? cant seem to find those updates

    Comment


      #47
      Originally posted by GRADgr View Post
      BrUnO XaVIeR when are those will be available to download? cant seem to find those updates
      The new node and the projectile custom component are work in progress.

      They are done for Unreal 4.15, but there's still 1 small issue remaining: I don't know yet how to add a second execution output to the custom K2 spawn node, due to engine's internal blueprint compiler stuff...
      I'm reading engine source code to plan the best route I'll use to make conditional output between two result exec pins.

      This custom Spawn node isn't published yet.
      | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

      Comment


        #48
        So we need this Pool Projectile Comp to solve the issue when, some projectiles are "Stuck" [like they have no speed at all] ?
        - also when for example i have a pool of 60 , and i fire all those quick i get the Pool Spawner stuck and keeps Failing to spawn... i need to raise the pool accordingly to fire rate i suppose?
        - and .. those actors are spawned into level [ex.60] will this behave like it spawns 60 actors the moment its created? [ like it will stuck for a bit ]
        -and are those actors counted+ each one for draw calls?

        Comment


          #49
          Yes, right now you'd have to code your own projectile logic; I have made this custom wrapper for the engine's projectile movement component so then you won't have to code the component yourself anymore;
          But keep in mind that it's still the default engine's projectile component been used and that component generates garbage collection (if you code your own you could make it in such way that avoids firing the GC).

          If you don't want to increase the pool size, you can either enable instantiate on demand options (will create new bullets) or you can use GetSpawnedObject() and reuse one of the bullets that are still travelling * didn't hit anything *.

          I'm doing this, I store a pool of 20 bullets in player, if all 20 are shot and there's no deativated actor available then I either let enabled Instantiate on Demand to create new bullets on the fly or I take back one of the bullets that are still travelling and re-shoot that one.
          This way I avoid GC calls 100% of the time.

          Drawcalls only count for actors that are active and visible (rendered); if there's no mesh rendered then there's no drawcall.
          | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

          Comment


            #50
            I've got the custom nodes working on all supported engine versions, and the custom projectile movement component is also finally complete:



            Note:
            This projectile component will not work properly with 'Instantiate on Demand' enabled; with this component involved, is better just not use IoD due to the way the engine registers components internally.
            To compensate that, I have added an option to load the Pool's actors only when needed as this process correctly registers the dynamic events needed to make the projectile components work:

            Click image for larger version

Name:	PoolInit_zpspmdfftkt.png
Views:	1
Size:	87.3 KB
ID:	1125174

            I'm submitting this to Marketplace team pretty soon, I've cleaned up all possible bugs I can think of, feels like a pretty solid solution now.
            | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

            Comment


              #51
              Updated demo project and demo windows exe can be found here:

              [DEMO PROJECT 4.15]
              [PLAYABLE DEMO]


              AWSD move
              Keyboard Arrows shoot


              Edit:

              The plugin version with this new K2_ node and the pooled projectile component are now live on Marketplace =]

              | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

              Comment


                #52
                - Removed my message. Had issues with character pooling but seem like there is something wrong in my end. Will report back after doing more testing, if finding something plugin related. Sorry for hassle.
                Last edited by SaOk; 03-28-2017, 03:49 PM.

                Comment


                  #53
                  Originally posted by SaOk View Post
                  - Removed my message. Had issues with character pooling but seem like there is something wrong in my end. Will report back after doing more testing, if finding something plugin related. Sorry for hassle.
                  The new functions doesn't freeze ragdolls anymore. You may be having an issue with your physics assets going active by default.


                  Edit:

                  "On Pool Begin Play" of your Characters, disable "Simulate Physics" on the character and your ragdolls will turn off.
                  I will expose all these options as a checkbox, next update.
                  Last edited by BrUnO XaVIeR; 03-28-2017, 09:43 PM.
                  | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

                  Comment


                    #54
                    [MENTION=50574]SaOk[/MENTION] So, the final blueprints will look like this:




                    With that in place, you will be able to configure and control absolutely everything that happens on the C++ component behind the scenes.
                    For your characters, just leave off the "Simulate Physics" checkbox and you won't have the behavior you see currently.
                    That "Spawn Options" struct is now a permanent requirement though just like the Transform node attachment, because well I have exposed it all, so the Blueprint node is a now little bigger.
                    | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

                    Comment


                      #55
                      Thanks for details. That new spawn actor node will come very handy. I seem to have some unknown collision sphere appearing in character blueprints that lifts character to air from ground. Cant click it in blueprint to find where it comes from. I deleted all component and reverted to make it hide. But it still seem to appear while playtesting. Could be something wrong in my side, but mentioning just in case.

                      Comment


                        #56
                        The spawn nodes doesn't create any component, so I don't think it's related.
                        | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

                        Comment


                          #57
                          [MENTION=50574]SaOk[/MENTION] The latest changes with the bool check output pin are now published to the Marketplace, UE4.12 up to 4.15:






                          Note, the old spawn function have being deprecated in favor of this new K2 node; you still can have it in Blueprints, but Unreal will warn you that that node is deprecated when found it being used.
                          | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

                          Comment


                            #58
                            On some versions of Unreal this Plugin got a problem with float points imprecision;
                            The "Pool Lifespan" value sometimes is being interpreted as greated than zero and that is causing lifespan to trigger and Pooled Actors get deleted, some machines do not do that and some does;
                            I have fixed it and won’t happen anymore on update 1.3.5+.
                            | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

                            Comment


                              #59
                              Originally posted by BrUnO XaVIeR View Post
                              On some versions of Unreal this Plugin got a problem with float points imprecision;
                              The "Pool Lifespan" value sometimes is being interpreted as greated than zero and that is causing lifespan to trigger and Pooled Actors get deleted, some machines do not do that and some does;
                              I have fixed it and won’t happen anymore on update 1.3.5+.
                              Thank you for update!

                              I was looking at your Save/Load plugin. Got through 6 pages out of 8 but haven't found an answer yet - does it integrate out of the box with Object Pool Component?
                              Youtube Channel

                              Comment


                                #60
                                Originally posted by BoredEngineer View Post
                                Thank you for update!

                                I was looking at your Save/Load plugin. Got through 6 pages out of 8 but haven't found an answer yet - does it integrate out of the box with Object Pool Component?
                                Yes they work well together because they are very unrelated, one won't interfere on other one's work.
                                All of them I'm currently using together on my projects (windows games that I don't know yet if I gonna publish)


                                -----

                                I've also improved compatibility with particles system components attached to APooledActors, they will also now be restored correctly on 1.3.5.
                                | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool | Sound-Occlusion | Anti-Cheat Plugin | Property Transfer Tool | Magic Nodes |

                                Comment

                                Working...
                                X