-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix sliders not always being the correct length #24739
Conversation
This is another similar case where stable floating point precision comes into play due to use of `hitObjectManager.Beatmap.BpmMultiplierAt` (see https://github.com/peppy/osu-stable-reference/blob/1531237b63392e82c003c712faa028406073aa8f/osu!/GameplayElements/HitObjects/Osu/SliderOsu.cs#L680) Closes ppy#24708.
Looking into the point raised on discord about stable mappings outputting slider ticks non-chronologically, that tracks with stable code: https://github.com/peppy/osu-stable-reference/blob/1531237b63392e82c003c712faa028406073aa8f/osu!/GameplayElements/HitObjects/Osu/SliderOsu.cs#L980-L984 The last I haven't checked if the lack of re-sort has any adverse effect on stable, but in my view, if it did, it'd be a pretty horrible stable bug anyways, and should be fixed in lazer by all costs, so I kinda don't care about that (...unless proven otherwise I guess) |
The test added in 64baa4d was previously failing despite applying a fix. This was caused by the fact that in stable, the last `sliderScoreTimingPoint` (i.e. the `LegacyLastTick` is pulled back by 36ms, but the list of all of them is not re-sorted afterwards, causing objects to be exported in non-chronological order to the resultant conversion mapping. lazer correctly sorts the objects, causing a false positive.
Code originally read Velocity = scoringDistance / beatLength = BASE_SCORING_DISTANCE * SliderMultiplier * GetPrecisionAdjustedSliderVelocityMultiplier() / beatLength Given (mathematically, floats are not generally as forgiving): GetPrecisionAdjustedBeatLength() = beatLength / GetPrecisionAdjustedSliderVelocityMultiplier() it follows that (inverting both sides): 1 / GetPrecisionAdjustedBeatLength() = GetPrecisionAdjustedSliderVelocityMultiplier() / beatLength and therefore Velocity = BASE_SCORING_DISTANCE * SliderMultiplier * GetPrecisionAdjustedSliderVelocityMultiplier() / beatLength = BASE_SCORING_DISTANCE * SliderMultiplier / GetPrecisionAdjustedBeatLength() and to recover `scoringDistance` scoringDistance = Velocity * beatLength
I've pushed changes to fix the test failures and to adapt this to the changes in #24738. Note that I'm not saying 5c6cd87 is correct in the "matches stable" sense, but it should be correct in the "rearranged terms" sense. @peppy would appreciate a double check whenever able. I'll do a diffcalc on this and see what comes out (because something inevitably will), and I'll double check ground truth with stable after that. |
I think the updated code looks correct, but the diffcalc will be the true test of that. |
Diffcalc sheet came out... empty? https://docs.google.com/spreadsheets/d/1Bw4uf8Ixwr6T0Y96kdXcqEr_slx7fC5UgExry7aEN_g/edit#gid=400707347 I find that a little hard to believe, but not sure how I could have screwed that up... |
On checking in game, even on the map / slider directly affected, SR does not change, tick or no tick. Well I'm not really sure what to do with this change now... The way I see it, either we just merge it and see what happens, or I guess I try to somehow rig stable to extract conversion mappings for all ranked maps / all maps period and try to cross-test that against this branch? I'm not sure how else to validate this... @peppy @smoogipoo thoughts, ideas? |
I think it's fine to go ahead with merge. As far as I know, ticks do not factor into diffcalc so I would assume this doesn't result in a change. |
Guess we do it live and see if this goes wrong... |
They are factored in: osu/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs Lines 212 to 269 in 0985bb0
But it's likely that the difference is too small to matter. I agree with this change regardless.
I think this would be interesting to do but I wouldn't hold it as a blocker for this PR. |
This is another similar case where stable floating point precision comes into play due to use of
hitObjectManager.Beatmap.BpmMultiplierAt
(see https://github.com/peppy/osu-stable-reference/blob/1531237b63392e82c003c712faa028406073aa8f/osu!/GameplayElements/HitObjects/Osu/SliderOsu.cs#L680)Closes #24708.
LegacyDifficultyControlPoint
/LegacyBpmMultiplier
#24738