Need a bit of help debugging an FPS issue

Hey, so I’m a very beginner coder, I know some HTML and could read bits and bobs of script. I’ve managed to piece together this Arena Game (mobs constantly spawn and you have to shoot em down) from bits of different tutorials and everything works fine apart from the massive fps drops.

I’m fairly certain it’s got something to do with the AI/AI spawning because the game seems to lag after they spawn. Everything will start off fine at around 30-60fps, then once maybe the 3rd or 4th wave come in i’m at <=20 fps, even if they aren’t on screen. Sometimes this can dive to ~5fps whilst shooting.

I’ve got 12 AIs spawning every 15 seconds and 8 AIs spawning every 30. Before I go mad with the BP screenies, is there any way I could figure out what’s wrong myself? My friend told me about the BP debugger and said it was hard to explain, and the only other think i could dig up was this: Blueprint Debugging | Unreal Engine Documentation Which told me nothing. Any other resources I could use or anyone got any idea what might be going on here?

Thanks. Appriciated,
Jack.

Hi,
So your problem is performance?
I dont see bp but are you destroying actors? (Not only hiding)
Also if you have big arena then you can set actors to be visible only if they are near to you…

  • is there cap of actors?
    Need more info for help :slight_smile:

Thanks for the help! Yeah, performance.

Yeah, destroying them. No cap. The arena isn’t that big, but it is set on the moon so it’s very dark… Either way, I’d have thought I could get way more than 40 ai in the game at a time… Specially since the only other things on the map is a small section of light, a small player flashlight and some ground.

Here’s the AI spawn…


Id get a few more of the AI’s BP up for you but it takes the p*ss to start it all up :stuck_out_tongue: if you need any more i’ll get back soon enough :slight_smile:

Again, appreciate the reply.

Whats doing that spawn default controller?
So i think you probably have somewhere function with performance consumption and its not stopped when actor is destroyed. Maybe “get all actors of clas” or cycling dead function…? Im too high now for better answer but i probably get idea tomorow.

Event Begin play -> Spawn Actor -> Spawn Controller -> Delay -> restart. So there’s an endless amount of enemy waves spawning.

No idea what you said there or how i’d implement then either :>