Discrepancy with time on layout restart

0 favourites
  • 3 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • I am doing the following : a player runs across the screen and does something, the time is recorded, the layout is restarted and at that recorded time the player repeats that action. When I do this, there is discrepancy where the player X recorded is out by several pixels.

    Does anyone have any tips on how to get an exact time for something to happen, I assume based on dt? I'm using dt but there is still some discrepancy by a number of pixels, I'd like to get it rounded up to the same whole int if possible. Note, the time IS the same, but the player X is out i.e. the action is starting earlier or later than expected by a number of pixels.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would say don't use dt.

  • I thought dt would be the most accurate and it seems to be so far, when I tried simply adding to a variable or using a timer it was quite a bit out. I was looking for an answer where someone might've used some calculations with framerate to ensure it is always exact, it's not something I've looked into until trying out this game idea. I guess there is also the issue that platform stats can be slightly off when trying to recreate the exact movement.

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