What could cause the CPU Use to skyrocket?

Discussion and feedback on Construct 2

Post » Sat May 06, 2017 10:24 pm

While testing my game after making a few minor changes, it slowed down to a crawl and eventually stopped. I was wondering what could cause that. It was working fine before the changes.

The only changes I made were just copy and paste of existing events and reapplied to a new object. I made a new level using the new object and that's when it started. Nothing else is new and I've made dozens of levels with nothing like this happening before.

I could keep checking my event sheet, but I wanted to know if there was anything specific that could cause this to help speed up the search for a possible error. I'm just a little confused.

Thanks for the help!!! :mrgreen:
B
24
S
9
Posts: 112
Reputation: 2,010

Post » Sun May 07, 2017 4:32 am

sounds like your object count could be the culprit. Or a particle system who's lifetimes are too long.. etc..

How long does it take to slow and then stop?
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Sun May 07, 2017 11:06 am

@Aquanex2

Run the game in debug mode:

1) Watch the object count and see if it starts to climb - if so you know that you either have a loop somewhere that's churning out objects, or you're not destroying objects.
2) Check the profile tab and look at the percentages for the different systems - is there anything that's using a crazy amount of CPU time? If so that's most likely the culprit.
3) If neither of these tests identify the problem go back to your code and start disabling events one by one of the latest stuff you added in and run it - don't worry if it breaks other things - just see if it fixes the slowdown; this should help you zone in on the offending events.
B
21
S
9
G
4
Posts: 473
Reputation: 4,285

Post » Sun May 07, 2017 3:14 pm

mekonbekon wrote:@Aquanex2

Run the game in debug mode:

1) Watch the object count and see if it starts to climb - if so you know that you either have a loop somewhere that's churning out objects, or you're not destroying objects.
2) Check the profile tab and look at the percentages for the different systems - is there anything that's using a crazy amount of CPU time? If so that's most likely the culprit.
3) If neither of these tests identify the problem go back to your code and start disabling events one by one of the latest stuff you added in and run it - don't worry if it breaks other things - just see if it fixes the slowdown; this should help you zone in on the offending events.


Thanks guys! I've been testing the level over and over again, but I couldn't recreate what was happening on a consistent basis, and after the last 20 times I've tested it, nothing happened. If it ever happens again, these tips will surely help!
B
24
S
9
Posts: 112
Reputation: 2,010


Return to Construct 2 General

Who is online

Users browsing this forum: zenox98 and 8 guests