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

Various speed distance difficulty calculation changes #29980

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions osu.Game.Rulesets.Osu/Difficulty/Evaluators/SpeedEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static class SpeedEvaluator
private const double single_spacing_threshold = 125; // 1.25 circles distance between centers
private const double min_speed_bonus = 75; // ~200BPM
private const double speed_balancing_factor = 40;
private const double distance_multiplier = 0.95;

/// <summary>
/// Evaluates the difficulty of tapping the current object, based on:
Expand Down Expand Up @@ -51,11 +52,11 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current)
strainTime /= Math.Clamp((strainTime / osuCurrObj.HitWindowGreat) / 0.93, 0.92, 1);

// speedBonus will be 1.0 for BPM < 200
tsunyoku marked this conversation as resolved.
Show resolved Hide resolved
double speedBonus = 1.0;
double speedBonus = 0.0;

// Add additional scaling bonus for streams/bursts higher than 200bpm
if (strainTime < min_speed_bonus)
speedBonus = 1 + 0.75 * Math.Pow((min_speed_bonus - strainTime) / speed_balancing_factor, 2);
speedBonus = 0.75 * Math.Pow((min_speed_bonus - strainTime) / speed_balancing_factor, 2);

double travelDistance = osuPrevObj?.TravelDistance ?? 0;
double distance = travelDistance + osuCurrObj.MinimumJumpDistance;
Expand All @@ -64,10 +65,10 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current)
distance = Math.Min(distance, single_spacing_threshold);

// Max distance bonus is 2 at single_spacing_threshold
double distanceBonus = 1 + Math.Pow(distance / single_spacing_threshold, 3.5);
double distanceBonus = Math.Pow(distance / single_spacing_threshold, 3.75) * distance_multiplier;

// Base difficulty with all bonuses
double difficulty = speedBonus * distanceBonus * 1000 / strainTime;
double difficulty = (1 + speedBonus + distanceBonus) * 1000 / strainTime;

// Apply penalty if there's doubletappable doubles
return difficulty * doubletapness;
Expand Down
Loading