Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer mismatch #100

Open
Vixuzen opened this issue Nov 25, 2024 · 1 comment
Open

Timer mismatch #100

Vixuzen opened this issue Nov 25, 2024 · 1 comment

Comments

@Vixuzen
Copy link

Vixuzen commented Nov 25, 2024

The timer used in-game and the time recorded are sometimes mismatched.
e.g. 0:02 sometimes saves as 0:02 and other times as 0:03.
This is especially apparent when you read the text on the bottom.
e.g. The par time for the level is 0:02. You finish in 0:02 but the game might read it as 0:03, thus the game doesn't tell you about beating the par time and in level select it saves as 0:03.
Is it a rounding issue? I noticed it seems to happen mostly in the latter halves of the seconds (Above 0.5 it rounds up and below it rounds down)

@alochmann
Copy link
Contributor

Hi, I looked into this, because I am currently working at some code nearby. You are right, it's actually a rounding issue. What is shown is rounded down (display.cc, StatusBarImpl::redraw), what is saved is rounded to the nearest integer (client.cc, level_finished). We should not change the latter, it would be unfair to previous record holders. However, we may show times rounded to the nearest second in the status bar. This has the slight disadvantage that the initial time 0'00" is only shown for half a second. But I still think that that's preferable to the status quo.
@raoulb: What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants