Howdy all;
So I’m working on my game and its enemies run on physics. Right now they are just cubes. They spawn and force is applied to them and they are pushed along towards the player to attack when in range.
I am hitting a wall with enemy counts at around 500. Any more than that and the frame rate starts to take a nose dive. Its seem weird to me though that even if I add in more complicated lighting or textures the frame rate stays the same. I guess its not to weird since physics is most likely computed in one place and rendering of those things in another. So I guess my main question is:
Does anyone know what I could do to reduce the lag in physics computations so I can get more enemies on screen?
Thank you all so very much for the information. Yeah, its a lot of enemies, I am asking a lot of the physics engine, but that’s the fun heheh.
So first up I shall go run a Stat UNIT and take a screen shot to see if that will hopefully lead to some more clues to a solution.
ALSO! Perhaps… does anyone know if a slick way of cheating in some more enemies? Maybe having and additional enemy be located between existing physics enemy actors to add a third more?
Dynamic objects that will block the physics actor need to have “CheckAsyncSceneOnMove” turned on. Otherwise static geometry will block them by default.
Well Async did get my frame rate up by about 4 fps wich is a nice big jump, but sadly all my physics characters are now flying around as if they are in zero G. Any idears there?
My apologies, I guess my image prolly didn’t load right I shall type it in
Without Async
Frame:24.12
Game:24.15
Draw:14.28
GPU:24.15
With Async
Frame: 23.03
Game: 23.06
Draw: 14.45
GPU: 23.15
So it was a very noticeable improvement. Especially while wearing the VR headset, there were no sudden stutter steps or hang ups in frame rate. Where as without Async there are a couple here and there that were pretty jarring. I tried only self illumination too and that changed nothing so its defiantly a physics wall. BUT, I may just have to call it good at 500. Which is a veritable **** ton lol. I can add a second character following just behind each of the physics character with a random offset of some kind and that should do the trick . If I can get the physics to behave itself while Async is on though that would be awesome.
Do I need to change anything else besides turning Async on in the project settings then turning it on inside the actual physics actors physics object?
Thanks again so very much for any help, Its all very very appreciated .