-
Notifications
You must be signed in to change notification settings - Fork 162
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
Count perfect lines instead of line perfection score #903
Conversation
This should reduce floating point arithmetic errors. Fixes UltraStar-Deluxe#844
This should resolve the issue. I've tested it on two songs that had the issue, and both of them got resolved. I am not entirely sure the issue can't occur in other ways as well though. Here is a minimal example for a file where it occurs:
Apparently the floating point inaccuracy leads to rounding errors for the "line perfection" part of the score. Here are the line-by-line scores for the above txt on a perfect playthrough, which I've printed out after every single line (beat) of the file
These are the values of |
Sorry, but I don't think we should change the score calculation if avoidable in order to not make it easy to replace older highscores with what effectively was not a better result than before. |
Alternatively, check if the line bonus is above or equal to 995 but below 1000 before the /10*10 and if yes, add 10 at the end |
Isn't this code simply... plain wrong in the first place? As far as I understand it, ScoreLineInt can (well, should) be anywhere from 0 to 1000 (both inclusive). But due to the My only question is: at what point a score is "good enough" to be a 1000? Basically it's going to be either:
I don't know which if the two is the correct one, but I'm pretty sure one of them is. EDIT: naturally whatever is chosen will also affect lower scores, but we're talking a maximum of +10 in the final number -- a correction to the number it should have always been. |
@basisbit I understand your concern, but this change should only affect rounding errors, making a difference of at most 10 points. Do you think this is enough of an issue to not go through with this? @barbeque-squared well that's a bit of a different problem: the bug I'm trying to resolve here is that you sometimes can't get 1000 line bonus even when you hit everything perfectly (I checked by setting all notes to hit in the code) due to floating point accuracy errors which computes e.g. 166.666... * 6 = 999.999...
|
@DeinAlptraum I agree with you. My only concern was the slightly different calculation for anything that is not close to full points. I am okay with any of the solutions, but I would personally prefer if we limit the change to only very high scores to not cause any issues (which we might not yet see) regarding online highscores. |
superseded by #910 |
This should reduce floating point arithmetic errors.
Fixes #844