Timer and fps

  • I'm going mad with this.

    I made a simple counter that increases every 1.0 seconds.

    If I run it at ~60 fps it updates every 1 second. If I slow down the pc the counter is slower.

    Here's the capx: https://www.dropbox.com/s/ntukwq2wqro56 ... .capx?dl=0

    Here's a video (slowing down from 2 to 30 secs):

    Subscribe to Construct videos now

    Shouldn't 1 second be always 1 second (not depending on the framerate)?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ciao121

    There is a system action 'Set minimum framerate'. Manual says about that action ....

    Set the maximum delta-time (dt) value based on a framerate. The default minimum framerate is 30 FPS, meaning the maximum dt is 1 / 30 (= 33ms). If the framerate drops below 30 FPS, dt will still not exceed 1/30. This has the effect of the game going in to slow motion as it drops below the minimum framerate, rather than objects stepping further every frame to keep up the same real-world speed. This helps avoid skipped collisions due to stepping a very large distance every frame.

    Additional info: All of Construct 2's behaviors use dt in their internal movement calculations. (exept physics i think).

    Linking one to the other: Timer behavior is using dt. That makes a timer frame independent till the minimum framerate is reached. Lowering the minimum framerate with the system action will make collision defection on very low frames rates virtual impossible.

    Whatever you do with it, just dont allow your game to drop fps below 30 fps.

  • Burvey

    Thanks for the link. But IMHO 1 second should always be 1 second. Using or not using dt.

    99Instances2Go

    That's was the problem (again!!!). I added set minimum framerate to 5 and the problem is no more here. I knew about the default minimum framerate. I had the problem also at 40 fps. Maybe the showed fps does not reflect the real fps... don't know...

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