hello to all, i want to ask those who have experienced on what do you suggest in handling lots of projectile…
i’m thinking that making alot of actor projectiles would really be slow…
let’s say, in a space battle scene… there would be alot of projectiles flying around here and there.
i wonder what would be a faster and more efficient way in handling all the projectile rather than using actor blueprint with projectile movement…
correct me if im wrong, but im thinking maybe using particles with collision?
can particles trigger some events when particle collides with something?
It really depends on how fast those projectiles you want. With small target actors (below 200-300 units thick) you cannot go much faster than 2000-3000 units, else some projectiles just teleport through target.
Also another problem is will this be multiplayer game or purely singleplayer.
For multiplayer i suggest doing all battle logic on line trace, hitscan and delays that depend on distance (if this is space battle).
For singleplayer you can spawn up to 1000 physics projectiles easily, each with some simple particle effect and invisible mesh for physics and collision.
Do not use particles with collision for it, you get multiple problems when trying to get information back from them to your game logic, it is easier to do that other way around: make all game logic based on physics actors, and use particles just for visuals. For eg you do not need to shoot 100 physical actors, instead shoot 10 that do game mechanic stuff and then swarm of GPU particles for visual effect.
In AIPD we had some weapons that fired a lot of projectiles, like 60 bullets per second per player (4 max local = 240 bullets per second).
We did several things to still hit 1080p / 60 fps on Xbox One.
Object Pooling
We wrote our own collision system which was much simpler but also roughly 100x faster
We rewrote the projectile movement component and removed parts which weren’t necessary for our purposes
It would be just pure single player…
I see, particles are really for eyecandy… :o
Hmm, What do you mean by physics projectile, are they just actor blueprints with projectile movement (is this what you mean)?
any example i can look up about physics projectiles?
unfortunately… i am not good enough to do those other than using blueprints… :o
Hello if possible can you explain the methods in more details. I am struggling for quite some time on this issue for my turret plugin and due to many (400+) projectiles my fps is dropping to 50. Can you explain what do you mean by custom collision and what were the limitations of the existing one? What part of the projectile movement did you wrote which helped you a lot?I have implemented object pooling,aggregated tick,significance Manager for projectile movement component but the performance has not been improved so much.It will be very helpful if you could share some more details.