-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made aim strain system use linear decay, removed speedDeviation, nerf…
…ed simple rhythm, rebalanced aim
- Loading branch information
Showing
9 changed files
with
211 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using osu.Game.Rulesets.Difficulty.Preprocessing; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Osu.Difficulty.Evaluators; | ||
using System.Collections.Generic; | ||
|
||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills | ||
{ | ||
/// <summary> | ||
/// Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances. | ||
/// </summary> | ||
public class AimFlow : OsuStrainSkill | ||
{ | ||
public AimFlow(Mod[] mods) | ||
: base(mods) | ||
{ | ||
} | ||
|
||
private double currentFlowStrain; | ||
private double currentSnapStrain; | ||
private double realStrain; | ||
|
||
private double skillMultiplier => 27.27;//38.75; | ||
// private double skillMultiplier => 23.55; | ||
private double strainDecayBase => 0.15; | ||
|
||
private readonly List<double> flowStrains = new List<double>(); | ||
private readonly List<double> snapStrains = new List<double>(); | ||
|
||
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000); | ||
|
||
protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => realStrain * strainDecay(time - current.Previous(0).StartTime); | ||
|
||
protected override double StrainValueAt(DifficultyHitObject current) | ||
{ | ||
// currentFlowStrain *= strainDecay(current.DeltaTime); | ||
// currentSnapStrain *= strainDecay(current.DeltaTime); | ||
|
||
currentFlowStrain *= Math.Min(1.0, Math.Max(0, (1000 - current.DeltaTime) / 1000)); | ||
currentSnapStrain *= Math.Min(1.0, Math.Max(0, (1000 - current.DeltaTime) / 1000)); | ||
|
||
double currentRhythm = RhythmEvaluator.EvaluateDifficultyOf(current); | ||
|
||
(double, double) aimResult = AimEvaluator.EvaluateDifficultyOf(current, true, strainDecayBase, currentRhythm); | ||
|
||
double flowStrain = aimResult.Item1 * skillMultiplier; | ||
double snapStrain = aimResult.Item2 * skillMultiplier; | ||
|
||
if (flowStrain < snapStrain) | ||
currentFlowStrain += flowStrain; | ||
else | ||
currentSnapStrain += snapStrain; | ||
|
||
realStrain = currentFlowStrain; | ||
|
||
return realStrain; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using osu.Game.Rulesets.Difficulty.Preprocessing; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Osu.Difficulty.Evaluators; | ||
using System.Collections.Generic; | ||
|
||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills | ||
{ | ||
/// <summary> | ||
/// Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances. | ||
/// </summary> | ||
public class AimSnap : OsuStrainSkill | ||
{ | ||
public AimSnap(Mod[] mods) | ||
: base(mods) | ||
{ | ||
} | ||
|
||
private double currentFlowStrain; | ||
private double currentSnapStrain; | ||
private double realStrain; | ||
|
||
private double skillMultiplier => 27.27;//38.75; | ||
// private double skillMultiplier => 23.55; | ||
private double strainDecayBase => 0.15; | ||
|
||
private readonly List<double> flowStrains = new List<double>(); | ||
private readonly List<double> snapStrains = new List<double>(); | ||
|
||
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000); | ||
|
||
protected override double CalculateInitialStrain(double time, DifficultyHitObject current) => realStrain * strainDecay(time - current.Previous(0).StartTime); | ||
|
||
protected override double StrainValueAt(DifficultyHitObject current) | ||
{ | ||
// currentFlowStrain *= strainDecay(current.DeltaTime); | ||
// currentSnapStrain *= strainDecay(current.DeltaTime); | ||
|
||
currentFlowStrain *= Math.Min(1.0, Math.Max(0, (1000 - current.DeltaTime) / 1000)); | ||
currentSnapStrain *= Math.Min(1.0, Math.Max(0, (1000 - current.DeltaTime) / 1000)); | ||
|
||
double currentRhythm = RhythmEvaluator.EvaluateDifficultyOf(current); | ||
|
||
(double, double) aimResult = AimEvaluator.EvaluateDifficultyOf(current, true, strainDecayBase, currentRhythm); | ||
|
||
double flowStrain = aimResult.Item1 * skillMultiplier; | ||
double snapStrain = aimResult.Item2 * skillMultiplier; | ||
|
||
if (flowStrain < snapStrain) | ||
currentFlowStrain += flowStrain; | ||
else | ||
currentSnapStrain += snapStrain; | ||
|
||
realStrain = currentSnapStrain; | ||
|
||
return realStrain; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters