When I go to text my game it slows down to a crawl but not immediatly

When I go to play test my game it will start with the game running at around 45-60 fps but as I let it run it goes down to under 15 in the matter of seconds. I’m not talking about lag and then it going back up to 45-60 I mean the frame rate is periodically going down and I have no clue why it is doing this. I have even tested it with task manager open and I noticed that as it runs my GPU, CPU, RAM and hard drive usages don’t change too much if I’m just standing there (GPU around 17%, CPU 64%, Ram 58%, Hard drive 20% but the game still slows down. If anyone knows how to fix this please let me know. I am concerned that it is an irreversible error and I might have to restart my project on a newer UE4.

That’s an incredibily vague question :wink:

What I’d recommend is progressively narrowing down what is causing the problem.

Start with one level. Then remove almost everything from the level, does it still happen?

Then begin to re-introduce things until the problem happens.

I’d say from the stats you’re reporting it looks like a coding problem, otherwise your GPU would be through the roof.

If it’s CPU, the main thing I’d start to suspect is everything you have on tick…

To give you a comparison, a typical level in my game will consistenly hammer the GPU at 95%, whereas CPU is typically under 20.

I’d second ClockworkOcean with this. Sounds like something is in your project causing this.

In instances like this (if i have no immediate idea where the issue is coming from) i normally just delete half the actors wholesale. If it’s still doing it you know the issues is with the remaining actors left. if not you know it’s in the batch you deleted. if so, put everything back and delete the other half. repeat this deleting half of the ‘halves’ until you get down to a manageable amount to run a fine comb over. It’s time consuming but fairly foolproof.

I went through my programming and I can’t seem to find anything in any actors that would cause this problem. Is there a chance that when I click “play” and it spawns me into the level is is loading some of the stuff in as I go (I have a fairly low end pc so things may not load immediatly) is there a chance that it is loading the level as I play and that is why it is slowing down? maybe as more of the level is loaded the less my PC can handle it. IDK if this is the actual problem but do you think there is a chance that this is why this is happening?

You also have to try the removal method we both mentioned above…