Timedelta question.

This forum is currently in read-only mode.
  • Do I need to use timedelta on everything?

    If I'm going to do something like: always:add 1 to angle. To save having to put timedelta all over the place, can I just use the timer instead? Like: every millisecond: add 1 to angle. Would save a lot of timedelta placings...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do I need to use timedelta on everything?

    If I'm going to do something like: always:add 1 to angle. To save having to put timedelta all over the place, can I just use the timer instead? Like: every millisecond: add 1 to angle. Would save a lot of timedelta placings...

    You can't do the exact example "every millisecond". Reasons can be read here and in other threads.

    You need timedelta where you want to make sure, that something is changed independently of the framerate. It doesn't make much sense here, but for more complex code that you use repeatingly you can always set up a function call, e.g.

    +on function "convert"

    ->Function: Set return value to Function.Param(1) * TimeDelta

    you would then call always: add Function.convert(1) to angle

  • You want to use timedelta on anything that changes over time. Don't use 'every' for that, because every isn't accurate past the frame rate, i.e. if your frame rate is 10fps, "every 1 ms" will trigger 10 times per second.

  • Also remember that timescale is based on timedelta.

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