-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add option for SongProgress
to use strain in difficulty graph
#30125
base: master
Are you sure you want to change the base?
Conversation
/// <summary> | ||
/// Filters relevant skills that would be used to represent difficulty of the section. | ||
/// </summary> | ||
/// <remarks> | ||
/// IMPORTANT NOTE: for now it's using <see cref="StrainSkill"/> to receive section values, consider changing it in the future. | ||
/// Also, this function should also be changed if filtering skills is no longer enough to get desired values. | ||
/// </remarks> | ||
public virtual StrainSkill[] GetRelevantSkills(Skill[] skills) => skills.OfType<StrainSkill>().ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can't exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How else can I filter the skills to get only those that I need
Specifically this means that I need to filter-out SliderlessAim from STD Difficulty Calculation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you filtering skills at all would be my primary question here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you filtering skills at all would be my primary question here?
Aim and SliderlessAim are the same skill
leaving them both means that aim difficulty is added 2 times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add public virtual bool IsRelevant => true; // Is skill relevant to star rating
field to the Skill
class
But it's +- the same as current solution, just written in different way
while (time > currentSectionEnd) | ||
{ | ||
saveCurrentPeak(); | ||
currentSectionPeak = 0; // This is wrong, but there's no way get decay from this class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can't just say "this is wrong" and then do it anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct way to do this is applying strain decay to currentSectionPeak
but there's no way to do this under current structure of StrainSkill
this is possible in #29290, as strain decay logic is moved back to the StrainSkill
class
But this is rather minor inconvenience, what wouldn't be noticeable for average player
@Givikap120 test failures are likely relevant. |
Ok, I will look into it |
The reasons for test fails is because those test scenes use |
this should fix tests failing
Fixed |
First step of adding Strain Graph - #30116
Question about structure:
Maybe adding all those logic into
SongProgress
class is not good, and I should createGraphSongProgress
that will be base for argon and triangles song progress classesA little explanation for reviewers on what parts this PR consists of:
This includes addition of per-section calculation. This calculation depends on ensuring correct bounds between first and last section (because in normal diffcalc bounds are cut-off). Also this requires filtering skills to only relevant ones.
This features my own algorithms for upscaling and downscaling, to specifically address the need of preserving correct "peak" value.
Type of value changed from int to float (for obvious reason). As well as
Objects
setter is changed withSetFromObjects
method for more intuitive understanding what it does (aka not just setting some field).Calculation of strains and option to show them on graph.