Do I need to consider delta-time in a dash?

0 favourites
  • 5 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hello!

    I am currently working on an online platformer, and many players are giving me feedback about inconsistent dash distances, both for them and for their enemy.

    For movement, I just use the integrated Platform behavior and not using any DT at all in that event.

    It works like:

    On Button pressed:

    Set dash to 1

    If dash == 1

    Simulate pressing right/left

    Add 10000 to acceleration and deceleration

    Add 200 to speed

    Wait 0.1

    Subtract 10000 from acceleration and deceleration

    Subtract 200 from speed

    Do I need to consider adding dt somewhere?

    Might it be that acceleration in Construct doesn't consider delta time?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dt should be built in if you are using just the behavior.

    Speaking of, I would use the timer behavior instead of wait.

  • newt

    Is there a reason why I should use timer instead of wait?

    Do the 2 differ in any way?

  • I don't think wait is confined to dt.

    There's other reasons like you can't interrupt it, and won't work with loops, etc.

  • The wait register the next event to play and can cause problem in your case plus as newt said you don't have as much control on it compared to a timer, now the inconsistencies in the dashs might be caused by the multiplayer itself, probably a lag or slowdown issue

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