Announcement

Collapse
No announcement yet.

Plugin Object Pool Component

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

  • replied
    Hey Bruno, just have a quick little bug that I came across a while ago. Not sure if its 4.21 or the plugin but thought I'd run it past you.

    Basically, any actor you attach a Rotating Component too, if Auto Activate is enabled, when you hit play, all of those actors will begin ticking (rotating) regardless of whether they have been spawned into the level or not.

    To replicate, just add a rotating component to a pooled actor, auto activate on, set the desired copies (say 50) in either an object or shared object pool and hit play in editor. 'stat game' should indicate the increased (50) ticks queued. This happen's regardless of whether any of those actors are spawned into the level, they are ticking (rotating) in the pool regardless.

    In 4.19 it works as it should, the rotating component would only add the tick when the actor is spawned into the level, and if 'update only if rendered' is on would only rotate if that actor is in the cameras view/ max draw distance. Any thoughts? Cheers a
    Last edited by amartis111; 02-06-2019, 07:24 AM.

    Leave a comment:


  • replied
    There's a 4.20 project link on plugin description in Marketplace

    Leave a comment:


  • replied
    I'm really hoping that I can use your plugin, however I'm having some issues with pooled projectiles not spawning at the transform I feed into the spawn node....

    To help with this, I was just hoping that you would consider updating the demo to 4.20 or 4.21
    don't know why, but when I try to update the demo, I can't get visual studio to do the build for either....

    Leave a comment:


  • replied
    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..

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    @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"

    Leave a comment:


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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    Sorry for being so unclear for you and thank you !

    Leave a comment:


  • replied
    The change mentioned above is published on Marketplace now, for both UE4.20 and UE4.21.

    Leave a comment:

Working...
X