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

Fix slider MinimumJumpDistance being calculated too low to be possible #30036

Open
wants to merge 6 commits into
base: pp-dev
Choose a base branch
from

Conversation

stanriders
Copy link
Member

Replaces #29994 since this is a proper fix of the underlying issue

@Givikap120
Copy link
Contributor

This whole LazyJumpDistance and MinimalJumpDistance is very confusing.

In the current system:

  • LazyJumpDistance is the distance between "True end of the object, reached in as little movement as possible" and next object
  • TravelDistance is is the distance you need to travel to reach "True end of the object with as little movement as possible"
  • This means that LazyJumpDistance and TravelDistance together make the full movement
  • MinimalJumpDistance is some very questionable metric that takes the minimum between slightly lowered LazyJumpDistance and "Distance from tail to next object, lowered by followcircle radius". And in the most cases it's the second part that's taken as minimum.
  • And somehow it's MinimalJumpDistance what is used as a metric that needs to be paired with TravelDistance

The whole MinimalJumpDistance calculation doesn't makes any sense. Why would you take LazyJumpDistance and subtract arbitrary distance from it? Why second part of the formula takes distance from the tail and subtracts followcircle radius?
In case where sliderbody is away from next object - it would just be the same as LazyJumpDistance. However in case where it's in direction of next object - you're already taking less distance than LazyJumpDistance (because you fully reached the end, not lazily) and subtracting this distance even further.

This change fixes the second part, and makes MinimalJumpDistance to essentially be Max(JumpDistance, LazyJumpDistance - 0.6 * circle_radius). I have no idea what this metric meant to represent and why it's used together with TravelDistance.

@@ -197,7 +197,7 @@ private void setDistances(double clockRate)

float distanceBetweenStartPositions = (BaseObject.StackedPosition * scalingFactor - lastObject.StackedPosition * scalingFactor).Length;

if (MinimumJumpDistance < distanceBetweenStartPositions)
if (MinimumJumpDistance < distanceBetweenStartPositions && LazyJumpDistance >= distanceBetweenStartPositions)

This comment was marked as resolved.

…nd distanceBetweenStartPositions for close-to-zero cases
@stanriders
Copy link
Member Author

!diffcalc
RULESET=osu

@tsunyoku tsunyoku self-requested a review December 11, 2024 11:00
Copy link

Difficulty calculation failed: https://github.com/ppy/osu/actions/runs/12272699486

@smoogipoo
Copy link
Contributor

!diffcalc
RULESET=osu

tsunyoku
tsunyoku previously approved these changes Dec 12, 2024
Copy link

@tsunyoku tsunyoku self-requested a review December 16, 2024 11:48
@tsunyoku
Copy link
Member

!diffcalc
RULESET=osu

This comment was marked as outdated.

@stanriders stanriders changed the base branch from master to pp-dev December 18, 2024 11:36
@stanriders stanriders requested a review from a team December 27, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants