Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Improved marble timing #294

Open
Qaomen opened this issue Dec 16, 2020 · 0 comments
Open

Improved marble timing #294

Qaomen opened this issue Dec 16, 2020 · 0 comments
Assignees
Labels
improvement refactors and the such server affects the server

Comments

@Qaomen
Copy link
Collaborator

Qaomen commented Dec 16, 2020

Description
Currently, the final time of a marble is calculated by using Date.now() at the race start and at crossing the finish line. Lag(spikes) and/or small accumulated inaccuracies during the physics updates could affect the end result. It's definitely negligible for the vast majority of races, but for accuracy's sake and in case of lag spikes, using a frame counter would keep the timing consistent.

Minimum Acceptance Criteria

  • Physics should use frame counting in combination with the tickrate to determine the finish time of marbles, where counting starts when the gates are opened.
  • Physics' onMarbleFinished event should return the finish time of the marble, using the same time format that's currently used.
@Qaomen Qaomen added server affects the server improvement refactors and the such labels Dec 16, 2020
@Qaomen Qaomen self-assigned this Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
improvement refactors and the such server affects the server
Projects
None yet
Development

No branches or pull requests

1 participant