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

Flashlight difficulty rework #28278

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Flashlight difficulty rework #28278

wants to merge 16 commits into from

Conversation

molneya
Copy link
Contributor

@molneya molneya commented May 21, 2024

New version of #24124.

This is a combination of many small changes that should make flashlight performance technically more correct. Overall, flashlight scores will generally give more pp than before if they were FCs.

Spinner bug fix

The most notable nerf in this set of changes, caused by not adding StrainTime during a spinner.

Example maps most affected by this change:

New slider calculation

Before this rework, some of the long sliders on maps such as Notch Hell gave no extra pp despite definitely warranting it. This rework uses a better measure of slider velocity and uses it to scale the slider's difficulty. This is the most notable buff in this set of changes.

Example maps most affected by this change:

Flashlight radius consideration in difficulty

This adds 2 new attributes to OsuDifficultyHitObject: PreviousMaxCombo and CurrentMaxCombo. These are used in the flashlight evaluator to get the current flashlight radius to scale the new distance based nerfs.

Flashlight radius consideration in performance

When a player misses, the flashlight radius will increase in size. This rework attempts to estimate how much of the score was spent in each combo radius by using the missing combo from an FC and the effectiveMissCount. Since this is a new nerf to the performance calculator, this will cause non-FCs to lose pp. In the future, removing the combo scaling factor should be considered.

A new length bonus formula to better reflect the flashlight radii was also added. The comparison can be seen here: https://www.desmos.com/calculator/4tt2ypchzq

Accuracy changes

FL and HD now have the same accuracy multiplier to prevent rare cases where FL SS scores were worth less than HD SS scores on low difficulties. Also includes a slight buff to HDFL scores.

Slider lazy end consideration

This rework uses the LazyEndPosition for jumps between non-consecutive objects to better reflect actual cursor positions. This doesn't really affect values all that much.

@smoogipoo
Copy link
Contributor

!diffcalc

@smoogipoo smoogipoo requested a review from a team May 21, 2024 15:31
Copy link

github-actions bot commented May 21, 2024

Copy link
Member

@apollo-dw apollo-dw left a comment

Choose a reason for hiding this comment

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

Just a quick parse to start with.

Comment on lines +134 to +143
private static double getComboScaleFor(int combo)
{
// Taken from ModFlashlight.
if (combo >= 200)
return 125.0;
if (combo >= 100)
return 162.5;

return 200.0;
}
Copy link
Member

Choose a reason for hiding this comment

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

Honestly, at this point you might as well stick to ground truth here and use the GetSize() method directly from ModFlashlight. It'd have the added bonus of adding calculation support for mod settings. It would mean passing the flashlight mod through to the evaluator, but I think this is practically expected for a mod evaluator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This kind of thing goes over my head. There is also a lot more to consider than just the radius that it might be worth making another PR instead (unless someone tells me otherwise)

@@ -105,6 +115,9 @@ public OsuDifficultyHitObject(HitObject hitObject, HitObject lastObject, HitObje
}

setDistances(clockRate);

PreviousMaxCombo = index > 0 ? ((OsuDifficultyHitObject)Previous(0)).CurrentMaxCombo : getObjectCombo(lastObject);
CurrentMaxCombo = PreviousMaxCombo + getObjectCombo(hitObject);
Copy link
Member

Choose a reason for hiding this comment

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

The Previous() call here is probably something to give a quick double check on from a profiling perspective, since that's going to be called for every object in the map when creating difficulty objects. I'll leave this for @tsunyoku though...

This could be optimised by moving this to the CreateDifficultyHitObjects method loop if desired.

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.

None yet

3 participants