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

Remove slider velocity from DrumRoll #24537

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Remove slider velocity from DrumRoll #24537

merged 1 commit into from
Aug 16, 2023

Conversation

OliBomby
Copy link
Contributor

@OliBomby OliBomby commented Aug 13, 2023

Removed ISliderVelocity from DrumRoll because it doesnt need it and it created the ability to edit the SV in the editor which shouldn't be possible, because changing it only breaks the drum roll duration.

If you change the SV of a drum roll in the editor, save, and come back. The duration will have changed by a factor equal to how much you changed the SV from the scroll speed.

The SV was being used to calculate the scroll speed of the drum roll and it just happened to always be the same as the ScrollSpeed because of how LegacyBeatmapDecoder works. Removing SV and using scroll speed directly makes the intention of the code a lot clearer.

@smoogipoo
Copy link
Contributor

Something tells me this is going to break elsewhere... For example this usage looks particularly suspect:

IEnumerable<DifficultyControlPoint> collectDifficultyControlPoints(IEnumerable<HitObject> hitObjects)
{
if (scrollSpeedEncodedAsSliderVelocity)
yield break;
foreach (var hitObject in hitObjects)
{
if (hitObject is IHasSliderVelocity hasSliderVelocity)
yield return new DifficultyControlPoint { Time = hitObject.StartTime, SliderVelocity = hasSliderVelocity.SliderVelocity };
}
}

This is probably another manifestation of us over-complicating the beatmap format with control points, to a nigh point of unmaintainability, as I can't remember the reason why this was added in the first place. @peppy probably (hopefully) knows better than me.

@OliBomby
Copy link
Contributor Author

Something tells me this is going to break elsewhere... For example this usage looks particularly suspect:

IEnumerable<DifficultyControlPoint> collectDifficultyControlPoints(IEnumerable<HitObject> hitObjects)
{
if (scrollSpeedEncodedAsSliderVelocity)
yield break;
foreach (var hitObject in hitObjects)
{
if (hitObject is IHasSliderVelocity hasSliderVelocity)
yield return new DifficultyControlPoint { Time = hitObject.StartTime, SliderVelocity = hasSliderVelocity.SliderVelocity };
}
}

This is probably another manifestation of us over-complicating the beatmap format with control points, to a nigh point of unmaintainability, as I can't remember the reason why this was added in the first place. @peppy probably (hopefully) knows better than me.

The code you mentioned doesn't do anything in the flow of encoding taiko beatmaps because scrollSpeedEncodedAsSliderVelocity will be true. That means the slider velocity of hit objects doesn't get added to the legacy beatmap and instead the effect control point scroll speed gets added to the legacy beatmap, as slider velocity.

@bdach bdach changed the title Remove SV from DrumRoll Remove slider velocity from DrumRoll Aug 14, 2023
@bdach
Copy link
Collaborator

bdach commented Aug 14, 2023

I dunno, this change looks correct to me. But at this point we've moved things back and forth so many times that I've lost track how we wanted to play this scroll speed vs slider velocity thing.

Probably gonna have to run like conversion or SR tests locally to confirm in practice.

@smoogipoo
Copy link
Contributor

smoogipoo commented Aug 15, 2023

This change looks fine as far as my automated SR/PP tests observe: https://docs.google.com/spreadsheets/d/1bCKncunrtCtv5shXMPPb-jkpNZqXtKc7FQj7qrUQkgM/edit (sheet empty)

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relatively sure this is right

@peppy peppy self-requested a review August 16, 2023 09:19
@peppy
Copy link
Member

peppy commented Aug 16, 2023

This is probably another manifestation of us over-complicating the beatmap format with control points, to a nigh point of unmaintainability, as I can't remember the reason why this was added in the first place. @peppy probably (hopefully) knows better than me.

To recap so we're on the same page:

  • SliderVelocity is used for cases where an object's velocity is adjusted, and always local to the object
  • ScrollSpeed is used for cases where the playfield's scroll speed is adjusted, causing external effects

As mentioned by @OliBomby in #24537 (comment), the code mentioned is not run for taiko legacy encoding. The intention of the code is to ferry the now local slider velocities in osu (and catch i guess?) to the correct place in the legacy format.

I don't think this is over-complicated. I think we're still moving in the correct direction to reduce complexity (moving away from global control points where possible, and maintaining the mapping only in decode/encode).


Also this change looks correct and was likely an oversight.

@peppy peppy merged commit eed9f83 into ppy:master Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants