1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:33:22 +08:00

Compare commits

...

12 Commits

Author SHA1 Message Date
StanR
bd0af83dab
Merge 38754c6203 into aa0ee5cf3a 2024-12-04 10:23:34 -05:00
Salman Alshamrani
aa0ee5cf3a
Merge pull request #30970 from peppy/results-screen-quick-retry-transition
Fix quick retry transition from results screen
2024-12-04 07:12:38 -05:00
Salman Alshamrani
a7586c52d0
Merge branch 'master' into results-screen-quick-retry-transition 2024-12-04 06:31:14 -05:00
Dean Herbert
a4d58648e2
Fix quick retry transition from results screen 2024-12-04 14:31:39 +09:00
StanR
38754c6203 Increase the acute angle jump bonus multiplier 2024-11-29 03:21:55 +05:00
StanR
0045c838de Scale the wiggle bonus multiplayer down 2024-11-29 03:15:02 +05:00
StanR
a358cdf469 Make sure the previous object in the wiggle bonus is also part of the wiggle 2024-11-28 16:53:20 +05:00
StanR
8b7d98b113 Move wiggle multiplier to a const, slightly decrease acute bonus multiplier 2024-11-28 03:19:41 +05:00
StanR
852265cb0c Revert "Add hitwindow-based aim velocity decrease"
This reverts commit bcebe9662c.
2024-11-28 03:07:37 +05:00
StanR
bcebe9662c Add hitwindow-based aim velocity decrease 2024-11-28 02:54:07 +05:00
StanR
d58be00a6e Add aim wiggle bonus 2024-11-28 01:42:05 +05:00
StanR
bb21dd0a72 Simplify osu! high-bpm acute angle jumps bonus 2024-11-28 00:12:09 +05:00
3 changed files with 38 additions and 13 deletions

View File

@ -12,9 +12,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
public static class AimEvaluator
{
private const double wide_angle_multiplier = 1.5;
private const double acute_angle_multiplier = 1.95;
private const double acute_angle_multiplier = 2.5;
private const double slider_multiplier = 1.35;
private const double velocity_change_multiplier = 0.75;
private const double wiggle_multiplier = 1.1;
/// <summary>
/// Evaluates the difficulty of aiming the current object, based on:
@ -64,6 +65,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
double acuteAngleBonus = 0;
double sliderBonus = 0;
double velocityChangeBonus = 0;
double wiggleBonus = 0;
double aimStrain = currVelocity; // Start strain with regular velocity.
@ -79,22 +81,26 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
double angleBonus = Math.Min(currVelocity, prevVelocity);
wideAngleBonus = calcWideAngleBonus(currAngle);
acuteAngleBonus = calcAcuteAngleBonus(currAngle);
if (DifficultyCalculationUtils.MillisecondsToBPM(osuCurrObj.StrainTime, 2) < 300) // Only buff deltaTime exceeding 300 bpm 1/2.
acuteAngleBonus = 0;
else
{
acuteAngleBonus *= calcAcuteAngleBonus(lastAngle) // Multiply by previous angle, we don't want to buff unless this is a wiggle type pattern.
* Math.Min(angleBonus, diameter * 1.25 / osuCurrObj.StrainTime) // The maximum velocity we buff is equal to 125 / strainTime
* Math.Pow(Math.Sin(Math.PI / 2 * Math.Min(1, (100 - osuCurrObj.StrainTime) / 25)), 2) // scale buff from 150 bpm 1/4 to 200 bpm 1/4
* Math.Pow(Math.Sin(Math.PI / 2 * (Math.Clamp(osuCurrObj.LazyJumpDistance, radius, diameter) - radius) / radius), 2); // Buff distance exceeding radius up to diameter.
}
// Apply acute angle bonus for BPM above 300 1/2 and distance more than one diameter
acuteAngleBonus = calcAcuteAngleBonus(currAngle) *
angleBonus *
DifficultyCalculationUtils.Smootherstep(DifficultyCalculationUtils.MillisecondsToBPM(osuCurrObj.StrainTime, 2), 300, 400) *
DifficultyCalculationUtils.Smootherstep(osuCurrObj.LazyJumpDistance, diameter, diameter * 2);
// Penalize wide angles if they're repeated, reducing the penalty as the lastAngle gets more acute.
wideAngleBonus *= angleBonus * (1 - Math.Min(wideAngleBonus, Math.Pow(calcWideAngleBonus(lastAngle), 3)));
// Penalize acute angles if they're repeated, reducing the penalty as the lastLastAngle gets more obtuse.
acuteAngleBonus *= 0.5 + 0.5 * (1 - Math.Min(acuteAngleBonus, Math.Pow(calcAcuteAngleBonus(lastLastAngle), 3)));
acuteAngleBonus *= 1 - Math.Min(acuteAngleBonus, Math.Pow(calcAcuteAngleBonus(lastLastAngle), 3));
// Apply wiggle bonus for jumps that are [radius, 2*diameter] in distance and with < 110 angle
wiggleBonus = angleBonus
* DifficultyCalculationUtils.Smootherstep(osuCurrObj.LazyJumpDistance, radius, diameter)
* DifficultyCalculationUtils.Smootherstep(osuCurrObj.LazyJumpDistance, diameter * 2, diameter)
* DifficultyCalculationUtils.Smootherstep(currAngle, double.DegreesToRadians(110), double.DegreesToRadians(60))
* DifficultyCalculationUtils.Smootherstep(osuLastObj.LazyJumpDistance, radius, diameter)
* DifficultyCalculationUtils.Smootherstep(osuLastObj.LazyJumpDistance, diameter * 2, diameter)
* DifficultyCalculationUtils.Smootherstep(lastAngle, double.DegreesToRadians(110), double.DegreesToRadians(60));
}
}
@ -122,6 +128,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
sliderBonus = osuLastObj.TravelDistance / osuLastObj.TravelTime;
}
aimStrain += wiggleBonus * wiggle_multiplier;
// Add in acute angle bonus or wide angle bonus + velocity change bonus, whichever is larger.
aimStrain += Math.Max(acuteAngleBonus * acute_angle_multiplier, wideAngleBonus * wide_angle_multiplier + velocityChangeBonus * velocity_change_multiplier);

View File

@ -46,5 +46,18 @@ namespace osu.Game.Rulesets.Difficulty.Utils
/// <param name="exponent">Exponent</param>
/// <returns>The output of logistic function</returns>
public static double Logistic(double exponent, double maxValue = 1) => maxValue / (1 + Math.Exp(exponent));
/// <summary>
/// Smootherstep function (https://en.wikipedia.org/wiki/Smoothstep#Variations)
/// </summary>
/// <param name="x">Value to calculate the function for</param>
/// <param name="start">Value at which function returns 0</param>
/// <param name="end">Value at which function returns 1</param>
public static double Smootherstep(double x, double start, double end)
{
x = Math.Clamp((x - start) / (end - start), 0.0, 1.0);
return x * x * x * (x * (6.0 * x - 15.0) + 10.0);
}
}
}

View File

@ -55,6 +55,8 @@ namespace osu.Game.Screens.Ranking
[Resolved]
private Player? player { get; set; }
private bool skipExitTransition;
[Resolved]
private IAPIProvider api { get; set; } = null!;
@ -203,6 +205,7 @@ namespace osu.Game.Screens.Ranking
{
if (!this.IsCurrentScreen()) return;
skipExitTransition = true;
player?.Restart(true);
},
});
@ -313,7 +316,8 @@ namespace osu.Game.Screens.Ranking
// HitObject references from HitEvent.
Score?.HitEvents.Clear();
this.FadeOut(100);
if (!skipExitTransition)
this.FadeOut(100);
return false;
}