Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

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

    #61
    Originally posted by BrUnO XaVIeR View Post
    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.
    Super! Thank you. Going to get Auto-Save now.

    I have some ideas for alternative usage of this system. What would be the best way, for you, to discuss it? I don't want to post it in public, but neither DM you directly without your consent
    Youtube Channel

    Comment


      #62
      Originally posted by BoredEngineer View Post
      Super! Thank you. Going to get Auto-Save now.

      I have some ideas for alternative usage of this system. What would be the best way, for you, to discuss it? I don't want to post it in public, but neither DM you directly without your consent
      You can DM me no problem, I get PM all the time.
      | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        #63
        Haven't tried it, but sounds like a great idea. Simple / generic concept applied where needed, well done mate!

        PS - Saudações Tugas
        [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

        Looking for fellow programmers to develop a project.

        Comment


          #64
          can you please ADD : LIFE SPAN ? so when it ends it will auto POOL IT BACK?
          thnx

          Comment


            #65
            Originally posted by GRADgr View Post
            can you please ADD : LIFE SPAN ? so when it ends it will auto POOL IT BACK?
            thnx
            This already exists on latest plugin versions. On details panel of your APooledActor you will find a pool lifespan property.
            | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

            Comment


              #66
              Update 1.3.5 with compatibility to Particle Components attached to Pooled Actors have been published to Marketplace.
              | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

              Comment


                #67
                Originally posted by BrUnO XaVIeR View Post
                Update 1.3.5 with compatibility to Particle Components attached to Pooled Actors have been published to Marketplace.
                Is there any way to wrap any actor to pooled actor on the fly, without making separate class/blueprint for that? I have spawner, where I can select any actor class to spawn. Now I want to add object pool support for it and found that I need a proxy class (pooled actor) for each object to spawn, which is not perfect in terms of flexibility. I guess you need to make another one Spawn Actor from Pool node, which could take any actor as input parameter, then in C++ dynamically make pre-defined Pool Actor, which has ChildActorComponent variable and populate it with defined actor (it's just rough assumption, because I didn't dig into your code yet, so maybe there are some caveats).
                Marketplace content: - Modular Sci Fi Office - Projectiles Pack - Research Center - Quest System - All Content

                Free content: Etherlinker


                Website | Youtube

                Comment


                  #68
                  Originally posted by Kelheor View Post
                  Is there any way to wrap any actor to pooled actor on the fly, without making separate class/blueprint for that? I have spawner, where I can select any actor class to spawn. Now I want to add object pool support for it and found that I need a proxy class (pooled actor) for each object to spawn, which is not perfect in terms of flexibility. I guess you need to make another one Spawn Actor from Pool node, which could take any actor as input parameter, then in C++ dynamically make pre-defined Pool Actor, which has ChildActorComponent variable and populate it with defined actor (it's just rough assumption, because I didn't dig into your code yet, so maybe there are some caveats).
                  I have remade this plugin for around 10x; the reason I endup with this architecture is because the way Unreal works. Pooling ordinary AActors wasn't giving any noticeable performance boosts, I had to introduce intermediate C++ Classes to make performance work the way I was expecting it to be...
                  By the way, you lose absolutely zero workflow when re-parenting your base class to APooledActor instead of AActor, there's no drawbacks in doing so; the plugin provides a custom Spawner node and C++ functions exactly to cover such a case, you can spawn any actor that is a child of APooledActor there.
                  | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                  Comment


                    #69
                    Originally posted by BrUnO XaVIeR View Post
                    I have remade this plugin for around 10x; the reason I endup with this architecture is because the way Unreal works. Pooling ordinary AActors wasn't giving any noticeable performance boosts, I had to introduce intermediate C++ Classes to make performance work the way I was expecting it to be...
                    By the way, you lose absolutely zero workflow when re-parenting your base class to APooledActor instead of AActor, there's no drawbacks in doing so; the plugin provides a custom Spawner node and C++ functions exactly to cover such a case, you can spawn any actor that is a child of APooledActor there.
                    There are some reasons against re-parenting. What if in future I'll decide to not use this plugin for some reasons? What if I have hundreds of actors, which I need to re-parent? What if I decide to re-use these actors in another project, where I can't use your plugin? etc.. Of course, all of these issues can be solved, but it will require additional time and efforts. Your PooledActor derived from AActor anyway, so I wonder did you tried to add ChildActorComponent to it and test performance? I assume it shouldn't affect performance, because otherwise even if you reparent existing actor to pooled actor if it has heavy components (like ChildActorComponent, because it's also possible) in it, these components will remove all benefits of pool in case if they won't stored within an actor in the pool.
                    Marketplace content: - Modular Sci Fi Office - Projectiles Pack - Research Center - Quest System - All Content

                    Free content: Etherlinker


                    Website | Youtube

                    Comment


                      #70
                      As far as my personal experience goes... Every single project I worked on everybody had a base Actor class derived from AActor for the game in question; nobody went creating multiple different instances of AActor creating multiple different base game classes.
                      This is why I see no issue with this. All they had to do was reparent from AActor to APooledActor and the game development is flowing smoothly.
                      Reparenting is an issue when the base class is a Blueprint, which is not the case here.

                      If you decide to not use the plugin after building on top of it... a quick reparent back from APooledActor to AActor is enough as long you have a base class for your game which is a child of AActor instead of using AActor as the base class itself.
                      | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                      Comment


                        #71
                        Originally posted by BrUnO XaVIeR View Post
                        As far as my personal experience goes... Every single project I worked on everybody had a base Actor class derived from AActor for the game in question; nobody went creating multiple different instances of AActor creating multiple different base game classes.
                        This is why I see no issue with this. All they had to do was reparent from AActor to APooledActor and the game development is flowing smoothly.
                        Reparenting is an issue when the base class is a Blueprint, which is not the case here.

                        If you decide to not use the plugin after building on top of it... a quick reparent back from APooledActor to AActor is enough as long you have a base class for your game which is a child of AActor instead of using AActor as the base class itself.
                        Why you need the same base class for trap and for the main character, for example? They even have different parents (that's why, I guess, you have a separate pools for characters, pawns, etc). It's better to have classes with loose coupling, otherwise, later it might be hard to separate trap from main character by removing base class, in case if you want to re-use trap in a product, which you can only sell without your plugin(and probably you will need refactoring, because there can be a properties in base class, which some of the derived actors, like trap, are not using). Moreover, if you're using content from third-party sources, like UE Marketplace or Gumroad (here you can find those hundreds of actors, which you need to reparent), then in your case, you need also to re-parent everything to the base actor class, which is equivalent to reparenting to pooled actor class and is not needed in most times, especially if third-party content is regularly updated (so you need to do this action multiple times).
                        But I see now that there are no chances for such change, so will try to do this by myself.
                        Marketplace content: - Modular Sci Fi Office - Projectiles Pack - Research Center - Quest System - All Content

                        Free content: Etherlinker


                        Website | Youtube

                        Comment


                          #72
                          Yes; I am not willing to support third-party Marketplace products with this plugin; that is a decision the project developers might do and make the changes they need themselves.
                          | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                          Comment


                            #73
                            Originally posted by BrUnO XaVIeR View Post
                            Yes; I am not willing to support third-party Marketplace products with this plugin; that is a decision the project developers might do and make the changes they need themselves.
                            Am I told about supporting third-party Marketplace products? I even can't imagine how you can do this, even if you wanted. I told that many of your users(including me), which you should support, use third-party marketplace products or community projects or already have a lot of actors in their projects and games and it might be a trouble to re-parent all content from them, especially each new update. I told that current architecture is not flexible enough (even if you re-made it 10 times) and it would be great to fix that in future updates. But if it's not possible, then ok. Don't be angry because of that.
                            Last edited by Kelheor; 05-25-2017, 04:13 PM.
                            Marketplace content: - Modular Sci Fi Office - Projectiles Pack - Research Center - Quest System - All Content

                            Free content: Etherlinker


                            Website | Youtube

                            Comment


                              #74
                              I'm not "angry"; I'm just saying that the focus for this tool is performance, not flexibility.
                              | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                              Comment


                                #75
                                sent you a pm, but decided to send it here in case anyone else had same problem..

                                Hello Bruno,


                                I would greatly appreciate some help implementing your object pool.

                                I read through your instructions but I am not sure I am using it correctly.


                                1. Create an object pool by clicking in asset browser, selecting synaptech and then object pool and named it BP_Projectile_Pool. OK

                                2. Go into (in my case) redtrooperbullet.blueprint and reparent it to (S)Pool Actor. OK

                                This is where I got lost:
                                3. Create a new blank actor? and insert the BP_Projectile_Pool component into it? Do I have to place this actor into the level? In this new blank actor, I should select my redtrooperbullet.blueprint and select "200" as the pool size... Am I doing this correctly?

                                4. How can I get reference from the pool inside the character that is shooting this bullet (before I just had to spawn a bullet actor without any references...).

                                Are there any other steps I missed?


                                Thank you!
                                Reinaldo

                                Comment

                                Working...
                                X