From a66ddc78136a877a697fec6d5232206db328439a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 17 Jan 2024 18:18:53 +0900 Subject: [PATCH] Change rolling counters to use quicker easing types --- osu.Game/Graphics/UserInterface/PercentageCounter.cs | 2 +- osu.Game/Graphics/UserInterface/RollingCounter.cs | 2 +- osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs | 2 +- osu.Game/Overlays/Mods/ScoreMultiplierDisplay.cs | 2 +- osu.Game/Overlays/Mods/VerticalAttributeDisplay.cs | 2 +- osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs | 3 +-- osu.Game/Screens/Play/HUD/ArgonComboCounter.cs | 3 +-- osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs | 3 +-- osu.Game/Screens/Play/HUD/BPMCounter.cs | 2 +- .../Play/HUD/ClicksPerSecond/ClicksPerSecondCounter.cs | 2 +- osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs | 2 +- osu.Game/Screens/Play/HUD/UnstableRateCounter.cs | 2 +- .../Ranking/Expanded/Statistics/AccuracyStatistic.cs | 7 ++++--- 13 files changed, 16 insertions(+), 18 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/PercentageCounter.cs b/osu.Game/Graphics/UserInterface/PercentageCounter.cs index ed06211e8f..1f9103b3bd 100644 --- a/osu.Game/Graphics/UserInterface/PercentageCounter.cs +++ b/osu.Game/Graphics/UserInterface/PercentageCounter.cs @@ -14,7 +14,7 @@ namespace osu.Game.Graphics.UserInterface /// public partial class PercentageCounter : RollingCounter { - protected override double RollingDuration => 750; + protected override double RollingDuration => 375; private float epsilon => 1e-10f; diff --git a/osu.Game/Graphics/UserInterface/RollingCounter.cs b/osu.Game/Graphics/UserInterface/RollingCounter.cs index b80c0e3b58..e69727e047 100644 --- a/osu.Game/Graphics/UserInterface/RollingCounter.cs +++ b/osu.Game/Graphics/UserInterface/RollingCounter.cs @@ -45,7 +45,7 @@ namespace osu.Game.Graphics.UserInterface /// /// Easing for the counter rollover animation. /// - protected virtual Easing RollingEasing => Easing.OutQuint; + protected virtual Easing RollingEasing => Easing.OutQuad; private T displayedCount; diff --git a/osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs b/osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs index 94dd96ec1c..b9e4896b21 100644 --- a/osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs +++ b/osu.Game/Overlays/Mods/BeatmapAttributesDisplay.cs @@ -196,7 +196,7 @@ namespace osu.Game.Overlays.Mods private partial class BPMDisplay : RollingCounter { - protected override double RollingDuration => 500; + protected override double RollingDuration => 250; protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0 BPM"); diff --git a/osu.Game/Overlays/Mods/ScoreMultiplierDisplay.cs b/osu.Game/Overlays/Mods/ScoreMultiplierDisplay.cs index b599b53082..a86eba81e4 100644 --- a/osu.Game/Overlays/Mods/ScoreMultiplierDisplay.cs +++ b/osu.Game/Overlays/Mods/ScoreMultiplierDisplay.cs @@ -145,7 +145,7 @@ namespace osu.Game.Overlays.Mods private partial class EffectCounter : RollingCounter { - protected override double RollingDuration => 500; + protected override double RollingDuration => 250; protected override LocalisableString FormatCount(double count) => ModUtils.FormatScoreMultiplier(count); diff --git a/osu.Game/Overlays/Mods/VerticalAttributeDisplay.cs b/osu.Game/Overlays/Mods/VerticalAttributeDisplay.cs index 33b7eaae1c..a3e24b486f 100644 --- a/osu.Game/Overlays/Mods/VerticalAttributeDisplay.cs +++ b/osu.Game/Overlays/Mods/VerticalAttributeDisplay.cs @@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Mods private partial class EffectCounter : RollingCounter { - protected override double RollingDuration => 500; + protected override double RollingDuration => 250; protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0.0#"); diff --git a/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs b/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs index 171aa3f44b..ca00ab12c7 100644 --- a/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs @@ -17,8 +17,7 @@ namespace osu.Game.Screens.Play.HUD { public partial class ArgonAccuracyCounter : GameplayAccuracyCounter, ISerialisableDrawable { - protected override double RollingDuration => 500; - protected override Easing RollingEasing => Easing.OutQuint; + protected override double RollingDuration => 250; [SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")] public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f) diff --git a/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs b/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs index 1d6ca3c893..369c753cb0 100644 --- a/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs @@ -21,8 +21,7 @@ namespace osu.Game.Screens.Play.HUD { private ArgonCounterTextComponent text = null!; - protected override double RollingDuration => 500; - protected override Easing RollingEasing => Easing.OutQuint; + protected override double RollingDuration => 250; [SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")] public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f) diff --git a/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs b/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs index f7ca218767..348327d710 100644 --- a/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs @@ -18,8 +18,7 @@ namespace osu.Game.Screens.Play.HUD { private ArgonScoreTextComponent scoreText = null!; - protected override double RollingDuration => 500; - protected override Easing RollingEasing => Easing.OutQuint; + protected override double RollingDuration => 250; [SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")] public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f) diff --git a/osu.Game/Screens/Play/HUD/BPMCounter.cs b/osu.Game/Screens/Play/HUD/BPMCounter.cs index cd24237493..9cd285db4c 100644 --- a/osu.Game/Screens/Play/HUD/BPMCounter.cs +++ b/osu.Game/Screens/Play/HUD/BPMCounter.cs @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.HUD { public partial class BPMCounter : RollingCounter, ISerialisableDrawable { - protected override double RollingDuration => 750; + protected override double RollingDuration => 375; [Resolved] private IBindable beatmap { get; set; } = null!; diff --git a/osu.Game/Screens/Play/HUD/ClicksPerSecond/ClicksPerSecondCounter.cs b/osu.Game/Screens/Play/HUD/ClicksPerSecond/ClicksPerSecondCounter.cs index 9b5ea309b0..a1cccdef0a 100644 --- a/osu.Game/Screens/Play/HUD/ClicksPerSecond/ClicksPerSecondCounter.cs +++ b/osu.Game/Screens/Play/HUD/ClicksPerSecond/ClicksPerSecondCounter.cs @@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play.HUD.ClicksPerSecond [Resolved] private ClicksPerSecondController controller { get; set; } = null!; - protected override double RollingDuration => 350; + protected override double RollingDuration => 175; public bool UsesFixedAnchor { get; set; } diff --git a/osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs b/osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs index 82f116b4ae..f041e120f6 100644 --- a/osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs +++ b/osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs @@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.HUD protected override bool IsRollingProportional => true; - protected override double RollingDuration => 1000; + protected override double RollingDuration => 500; private const float alpha_when_invalid = 0.3f; diff --git a/osu.Game/Screens/Play/HUD/UnstableRateCounter.cs b/osu.Game/Screens/Play/HUD/UnstableRateCounter.cs index 701b8a8732..ab7ab6b3a0 100644 --- a/osu.Game/Screens/Play/HUD/UnstableRateCounter.cs +++ b/osu.Game/Screens/Play/HUD/UnstableRateCounter.cs @@ -23,7 +23,7 @@ namespace osu.Game.Screens.Play.HUD { public bool UsesFixedAnchor { get; set; } - protected override double RollingDuration => 750; + protected override double RollingDuration => 375; private const float alpha_when_invalid = 0.3f; private readonly Bindable valid = new Bindable(); diff --git a/osu.Game/Screens/Ranking/Expanded/Statistics/AccuracyStatistic.cs b/osu.Game/Screens/Ranking/Expanded/Statistics/AccuracyStatistic.cs index 4b8c057235..f1f2c47e20 100644 --- a/osu.Game/Screens/Ranking/Expanded/Statistics/AccuracyStatistic.cs +++ b/osu.Game/Screens/Ranking/Expanded/Statistics/AccuracyStatistic.cs @@ -44,9 +44,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics private partial class Counter : RollingCounter { - protected override double RollingDuration => AccuracyCircle.ACCURACY_TRANSFORM_DURATION; - - protected override Easing RollingEasing => AccuracyCircle.ACCURACY_TRANSFORM_EASING; + // FormatAccuracy doesn't round, which means if we use the OutPow10 easing the number will stick 0.01% short for some time. + // To avoid that let's use a shorter easing which looks roughly the same. + protected override double RollingDuration => AccuracyCircle.ACCURACY_TRANSFORM_DURATION / 2; + protected override Easing RollingEasing => Easing.OutQuad; protected override LocalisableString FormatCount(double count) => count.FormatAccuracy();