Game performance DROPS after 1 minute

0 favourites
  • 5 posts
From the Asset Store
12 looping retro style music tracks for your indie games and projects
  • Hey everyone,

    My game - since yesterday (as far as I know) performance immediately drops and lags to heaven and hell. Nothing changes from 10 seconds in to a minute in where it starts lagging. The only difference is it's been running for a longer time. My only guess is that there are too many entities (from the constant amount of clocks spawning) but this is dismissed as I have tried spawning 200 entities (clocks) and it would not lagg until a considerable amount of time.

    From assessing the debugger I see the CPU performance goes from 30% to near 100%, I just don't understand what is causing this as all the entities are *roughly* the same from 10 seconds in (no lagg) to 60 seconds in (lagg).

    Note: In my code I realized I didn't destroy the text (changed the opacity so it was invisible), I have since fixed this, no changes at all.

    The debugger makes it lag even more so I have two links, of the game with and without the debugger on. - without debugger - with debugger

    I wouldn't say this is a performance issue as I have a pretty decent computer - This may have been lagging before the first couple of days, but I wouldn't know as I don't normally run it for long.

    Note: I will give capX but only if you ask for it and i'll message you the link - It's for a competition and I don't want the whole world having access to it.

  • The most interesting part for you in this case is the profile tab in the debugger. It shows CPU usage for the particular group, so you can track the problem.

  • Hey, thanks for the reply man. The profile tab is restricted to the full version - which I don't have. I found the problem through going line by line in my code and disabling each on individually and testing it for a minute to find the problem. The destroy action did not dstroy the clocks fully like the debugger showed. So as I suspected their were clocks running in the background using system resources, to fix this I limited the code to only affect the clocks on screen.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ah.. right. Well that's a good catch then! There's a behaviour "Destroy outside layout", you might find it useful.

  • Oh nice, will give that a go.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)