How do I increase the frame rate ?

0 favourites
  • 10 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • So I have something beautifully coded (which I have removed in the attached CAPX), but it is just ridiculously slow.

    As it stands, it shows it uses 75-95% of the CPU (according to the debug window)

    Any idea where I have stuffed this up ?

    Slow CAPX File

  • Don't use the inspect tab to measure your cpu usage. Use the profile tab or use cpuutilisation as expression in a textfield. The inspect-tab has a high cpu usage if there are many objects by itself.

  • Remember that the debug window is artifically high due to the work it is doing. Use the Profile tab.

    Regardless, I'm seeing around 5% in debug and <1% in Profile tab.

  • zenox98 Really ? 'cause here's the full CAPX and it is as slow as a dog on both my PC and mobile.


  • Ah. Well this is a different kettle of fish.

    Check and you will see after several seconds, collisions increases steadily. I stopped it after it got to performing over 10000 collision checks every 60th of a second, which is really bad.

    Look at the profile tab also to see where where most of the time is spent.

  • zenox98 did you miss a zero in the amount of collision checks per second?


    1. the scoring took a huge amount of cpu-time. Try to disable the scoring group and you will see it.

    2. I have up to 6000 collision checks per tick, that would be up to 360.000 collisions checks every second with 60 FPS. There has to be a problem with your collision checks.

  • It starts for me at around 5000/tick but just steadily increases. As I said, I stopped it at over 10000/tick. If a game's collisions steadily increase like that then it has a major problem with the code.

    Edit: Double checked and it is doing what I have posted, for me at least.

  • Ahh, sorry zenox98 I read it wrong. I read every second, not every 60th of a second. That is even higher what I observed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You guys are awesome ! Yep that is indeed the issue. I think it's 'cause I'm calling a function which calls another function, which then calls itself.

  • Infinite recursion is a terrible thing to behold.

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