Performance and dt at Layout Start

  • I have an event that spawns objects every 180*dt seconds ("Every X Seconds"). However, at the start of the layout on the mobile version, there's usually a lag period when everything is loading up. During this time, it takes ages to hit 180*dt (about 15 seconds total). The event works normally after this 15 seconds.

    Changed the event to every 3 seconds instead of 180*dt, and the event works normally from the start. If I spam all the events using a keyboard input from the start, there's barely any lag, but for some reason dt is really suffering when I use it with the "Every X Seconds" event.

    I want to keep framerate independence, but dt seems to be hindered pretty badly at the start of the layout. Any suggestions?

    Update: Ran the game with tickcount, seems that the tickcount doesn't suffer as badly as I thought, hits 180 ticks in 4-5 seconds at most. However the spawn every dt seconds event still doesn't work till it hits 15 seconds in.

  • I thought time (every X seconds) was framerate independent?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For the "Every X Seconds" event, it says that it's limited by framerate.

    "Specify time, in seconds, between running the actions. Interval is limited by framerate (actions will not run more than once per tick)."

    Does that mean that it can't exceed framerate, or it is not framerate independent?

  • Using "dt" in "Every X seconds" makes no sense at all. "Every X seconds" is already framerate independent, because it measures time in seconds, not frames. As the description says it simply won't run more than once a tick (i.e. never more than "Every tick" would run).

  • Thanks for clearing it up.

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