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

Buff precision difficulty rating in osu! #28877

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 15 additions & 3 deletions osu.Game.Rulesets.Osu/Difficulty/Evaluators/AimEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current, bool with
// Rewarding angles, take the smaller velocity as base.
double angleBonus = Math.Min(currVelocity, prevVelocity);

wideAngleBonus = calcWideAngleBonus(currAngle);
wideAngleBonus = calcWideAngleBonus(lastAngle);
Copy link
Contributor

Choose a reason for hiding this comment

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

don't really understand why it's changed from currAngle to lastAngle

acuteAngleBonus = calcAcuteAngleBonus(currAngle);

if (osuCurrObj.StrainTime > 100) // Only buff deltaTime exceeding 300 bpm 1/2.
Expand All @@ -88,9 +88,21 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current, bool with
}

// 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)));
wideAngleBonus *= angleBonus * (1 - Math.Min(wideAngleBonus, Math.Pow(calcWideAngleBonus(lastLastAngle), 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)));

// If objects just go back and forth through a middle point - don't give as much wide bonus
var lastLastBaseObject = (OsuHitObject)osuLastLastObj.BaseObject;
var currBaseObject = (OsuHitObject)osuCurrObj.BaseObject;

float scalingFactor = OsuDifficultyHitObject.NORMALISED_RADIUS / (float)currBaseObject.Radius;
float distance = (lastLastBaseObject.StackedPosition * scalingFactor - currBaseObject.StackedPosition * scalingFactor).Length;

if (distance < 1)
{
wideAngleBonus *= 1 - 0.35 * (1 - distance);
Copy link
Contributor

@Givikap120 Givikap120 Jul 17, 2024

Choose a reason for hiding this comment

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

this thing is not even working
need to check last and lastlastlast (💀) instead
EDIT: oopsie, I was wrong, it was not working cuz I changed angle for bonus from prev to curr

}
}
}

Expand Down Expand Up @@ -125,7 +137,7 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current, bool with
if (withSliderTravelDistance)
aimStrain += sliderBonus * slider_multiplier;

return aimStrain;
return osuCurrObj.SmallCircleBonus * aimStrain;
}

private static double calcWideAngleBonus(double angle) => Math.Pow(Math.Sin(3.0 / 4 * (Math.Min(5.0 / 6 * Math.PI, Math.Max(Math.PI / 6, angle)) - Math.PI / 6)), 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public class OsuDifficultyHitObject : DifficultyHitObject
/// </summary>
public double HitWindowGreat { get; private set; }

/// <summary>
/// Selective bonus for maps with higher circle size.
/// </summary>
public double SmallCircleBonus { get; private set; } = 1.0;

private readonly OsuHitObject? lastLastObject;
private readonly OsuHitObject lastObject;

Expand Down Expand Up @@ -155,8 +160,7 @@ private void setDistances(double clockRate)

if (BaseObject.Radius < 30)
{
float smallCircleBonus = Math.Min(30 - (float)BaseObject.Radius, 5) / 50;
scalingFactor *= 1 + smallCircleBonus;
SmallCircleBonus = 1.0 + Math.Min(30 - BaseObject.Radius, 30) / 38;
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you even need Math.Min here?

}

Vector2 lastCursorPosition = getEndCursorPosition(lastObject);
Expand Down
Loading