Use a stable sort for hitobjects #2563
Merged
Conversation
Let's add a comment explaining what we consider to be stable sorting here. |
On a further look inside mania beatmap conversion, I've come to the conclusion that this ordering doesn't really matter for mania-specific beamtaps since no RNG is done, and non-mania-specific beatmaps generally don't have multiple hitobjects at the same time, so I'm going to hold off on this for now in favour of less memory usage/faster sorting. |
Nope lol this totally matters in mania diff calculation :p |
Hold off on this for a bit, there may be some sorting applied elsewhere that affects objects further in diff calculation. |
aa4bbdc
to
5aadc35
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Would change the order of hitobjects which would change the output of mania beatmap conversion.
A stable sort is intended here, see: https://github.com/peppy/osu-stable/blob/master/osu!/GameplayElements/HitObjectManager.cs#L822-L832
Brings osu!lazer and osu!stable diffcalc within 1 d.p. of each other:
Further accuracy isn't really possible due to osu!stable doing an unstable sort with a different algorithm than what .NET Core does, just before difficulty calculation.