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

Use a stable sort for hitobjects #2563

Merged
merged 4 commits into from May 16, 2018
Merged

Conversation

smoogipoo
Copy link
Contributor

@smoogipoo smoogipoo commented May 16, 2018

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:

Beatmap Mods Expected (strain) Actual (strain)
1023967 None 7.56702 7.56223
1023967 DT 10.4857 10.4810

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.

@smoogipoo smoogipoo added the area:beatmap-parsing .osu file format parsing label May 16, 2018
@smoogipoo smoogipoo added this to the May 2018 milestone May 16, 2018
@peppy
Copy link
Sponsor Member

peppy commented May 16, 2018

Let's add a comment explaining what we consider to be stable sorting here.

@smoogipoo
Copy link
Contributor Author

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.

@smoogipoo smoogipoo closed this May 16, 2018
@smoogipoo
Copy link
Contributor Author

Nope lol this totally matters in mania diff calculation :p

@smoogipoo smoogipoo reopened this May 16, 2018
@smoogipoo
Copy link
Contributor Author

Hold off on this for a bit, there may be some sorting applied elsewhere that affects objects further in diff calculation.

@peppy peppy merged commit 7765a1a into ppy:master May 16, 2018
@smoogipoo smoogipoo deleted the fix-hitobject-order branch June 15, 2018 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:beatmap-parsing .osu file format parsing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants