Uneven CPU load on each game session.

0 favourites
  • 7 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • Usually when I run my game it runs at approx 15-20% cpu, but sometimes hovering around 30-35 with even when idle (nothing moving) on my surface, and the only way to get it down to normal rate is by restarting the game a few times. This is especially critical on mobile where those values are at 25-40 normal rate, but every now and then 40-60% cpu usage.

    This is especially noticeable since touch starts to fail/lag above 50% cpu usage on mobile.

    Has anyone experienced anything similar or know what might be causing the game to run at varying performance every time? Plugins, Behaviours, etc etc not loading correctly on start of game? Any help appreciated.

    This seem to happen on both pc and mobile.

  • Does running in debug mode show anything different or abnormal? I had some similar issues when one of my loops would get stuck on for some reason - and it was causing a lot of collision checks that it shouldn't have been doing. Maybe you have something similar happening?

    ~Sol

  • Does running in debug mode show anything different or abnormal? I had some similar issues when one of my loops would get stuck on for some reason - and it was causing a lot of collision checks that it shouldn't have been doing. Maybe you have something similar happening?

    ~Sol

    In the debugger the only things abnormally high in those cases are engine and draw calls. I've tried to disable groups of events one by one to try to identify if it's any event causing it, but no luck. Draw calls should go down to 0% if nothing is moving, changing, it does so in older versions of my game.

    I opened an older capx of my game and it doesn't have this issue. I'm starting to think it's some behaviour causing it.

  • Yeah that sounds kinda strange... I have issues in the debugger itself. In preview mode the game uses about 20% CPU with a few things going on (weather effects and a few characters on screen) - but in the debugger with the exact same scenario happening it's using 85% CPU. It makes any actual useful debugging pretty much, not useful.

    I don't really know what to suggest since yeah, it isn't a consistent problem you're experiencing. I hope you find the reason though.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • These measurements are surprisingly difficult to interpret correctly. See my blog on understanding CPU and memory measurements. Here's a relevant passage:

    [quote:2gx0cnl0]Javascript does not provide direct access to the CPU usage. Instead Construct 2 estimates it using timers. The key word here is estimates: it is not a real CPU usage measurement.

  • SoldjahBoy I managed to identify that the problem. Theres is something causing a very high spike in Draw Calls. Sometimes it goes away by itself but sometimes i have to quit and restart the game, for it to go away. But i don't know what is causing the spike. This spike can happen at anytime. Even when idle, nothing moving, no scrolling, nothing changing zOrder, no animations running.

    Ashley Thanks for the link. Do you know anything that could cause high unusual spikes in drawcalls? These idle spikes seem to be higher than normal, even higher than during gameplay when objects are moving, animations playing etc etc. Or is there any way to test it, so i can identify what is causing the spike.

  • The point of the blog I linked to is these numbers don't necessarily mean anything.

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