From d1f686b1a8ee3565ff9f6f6b9962ba5344acd262 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 16:38:58 +0900 Subject: [PATCH 01/36] Fix DrawableTaikoHitObject origins. --- osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs index c14dc6d7b0..609fac70ea 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs @@ -22,7 +22,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable : base(hitObject) { Anchor = Anchor.CentreLeft; - Origin = Anchor.Centre; + Origin = Anchor.CentreLeft; RelativePositionAxes = Axes.X; } From 1615db386a8eff9204b217f4cbe4bf81f834ec1d Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 16:47:13 +0900 Subject: [PATCH 02/36] Give DrumRoll some sane velocity/tickdistance defaults. --- osu.Game.Modes.Taiko/Objects/DrumRoll.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs index 1f9241268b..7dba605213 100644 --- a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs @@ -25,13 +25,13 @@ namespace osu.Game.Modes.Taiko.Objects /// /// Velocity of the drum roll in positional length units per millisecond. /// - public double Velocity { get; protected set; } + public double Velocity { get; protected set; } = 5; /// /// The distance between ticks of this drumroll. /// Half of this value is the hit window of the ticks. /// - public double TickTimeDistance { get; protected set; } + public double TickTimeDistance { get; protected set; } = 200; /// /// Number of drum roll ticks required for a "Good" hit. From 1220972170a98eeaec35213b11f4dd2f8dffff4b Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 16:47:25 +0900 Subject: [PATCH 03/36] Fix ticks not being passed IsStrong. --- osu.Game.Modes.Taiko/Objects/DrumRoll.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs index 7dba605213..ff73c40d2f 100644 --- a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs @@ -88,6 +88,7 @@ namespace osu.Game.Modes.Taiko.Objects PreEmpt = PreEmpt, TickTimeDistance = TickTimeDistance, StartTime = t, + IsStrong = IsStrong, Sample = new HitSampleInfo { Type = SampleType.None, From 2e8607687c1dccb4cb23c6675193769fff947401 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 16:49:39 +0900 Subject: [PATCH 04/36] Implement DrumRollTick drawing. --- .../Objects/Drawable/DrawableDrumRollTick.cs | 57 ++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs index 1e270c6751..da460e5cfc 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs @@ -5,20 +5,67 @@ using OpenTK.Input; using osu.Game.Modes.Taiko.Judgements; using System; using osu.Game.Modes.Objects.Drawables; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using OpenTK; +using OpenTK.Graphics; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Transforms; namespace osu.Game.Modes.Taiko.Objects.Drawable { public class DrawableDrumRollTick : DrawableTaikoHitObject { + /// + /// The size of a tick. + /// + private const float tick_size = 24; + + /// + /// Any tick that is not the first is not filled, but is displayed + /// as a circle instead. This is what controls the stroke width of that circle. + /// + private const float tick_border_width = 6; + private readonly DrumRollTick tick; + private readonly CircularContainer bodyContainer; + public DrawableDrumRollTick(DrumRollTick tick) : base(tick) { this.tick = tick; + + Anchor = Anchor.CentreLeft; + Origin = Anchor.Centre; + + RelativePositionAxes = Axes.X; + Size = new Vector2(tick_size); + + Children = new[] + { + bodyContainer = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, + Masking = true, + BorderThickness = tick_border_width, + BorderColour = Color4.White, + Children = new[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Alpha = tick.FirstTick ? 1 : 0, + AlwaysPresent = true + } + } + } + }; } - protected override TaikoJudgement CreateJudgement() => new TaikoDrumRollTickJudgement(); + protected override TaikoJudgement CreateJudgement() => new TaikoDrumRollTickJudgement { SecondHit = tick.IsStrong }; protected override void CheckJudgement(bool userTriggered) { @@ -38,11 +85,17 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable protected override void UpdateState(ArmedState state) { + switch (state) + { + case ArmedState.Hit: + bodyContainer.ScaleTo(0, 100, EasingTypes.OutQuint); + break; + } } protected override void UpdateScrollPosition(double time) { - // Drum roll ticks shouldn't move + // Ticks don't move } protected override bool HandleKeyPress(Key key) From 6b1dab5b834dad53f8c71d7f67c9efbf4e966789 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 16:50:06 +0900 Subject: [PATCH 05/36] Implement drawable drumroll. --- .../Tests/TestCaseTaikoPlayfield.cs | 18 ++++++++++++ .../Objects/Drawable/DrawableDrumRoll.cs | 22 +++++++++------ .../Drawable/DrawableStrongDrumRoll.cs | 20 +++++++++++++ .../Drawable/Pieces/DrumRollCirclePiece.cs | 28 +++++++++++++++++++ .../osu.Game.Modes.Taiko.csproj | 4 ++- 5 files changed, 83 insertions(+), 9 deletions(-) create mode 100644 osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongDrumRoll.cs create mode 100644 osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs index 395a0cab13..ef9c3006f1 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs @@ -6,6 +6,7 @@ using osu.Framework.Screens.Testing; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Taiko.Judgements; using osu.Game.Modes.Taiko.Objects; +using osu.Game.Modes.Taiko.Objects.Drawable; using osu.Game.Modes.Taiko.UI; namespace osu.Desktop.VisualTests.Tests @@ -22,6 +23,8 @@ namespace osu.Desktop.VisualTests.Tests AddButton("Hit!", addHitJudgement); AddButton("Miss :(", addMissJudgement); + AddButton("DrumRoll", () => addDrumRoll(false)); + AddButton("Strong DrumRoll", () => addDrumRoll(true)); Add(playfield = new TaikoPlayfield { @@ -60,6 +63,21 @@ namespace osu.Desktop.VisualTests.Tests }); } + private void addDrumRoll(bool strong) + { + var d = new DrumRoll + { + StartTime = Time.Current + 1000, + Distance = 2000, + PreEmpt = 1000, + }; + + if (strong) + playfield.Add(new DrawableStrongDrumRoll(d)); + else + playfield.Add(new DrawableDrumRoll(d)); + } + private class DrawableTestHit : DrawableHitObject { public DrawableTestHit(TaikoHitObject hitObject) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index 3551538fe7..7915599c3e 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -1,8 +1,10 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Graphics; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Taiko.Judgements; +using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; using System.Linq; namespace osu.Game.Modes.Taiko.Objects.Drawable @@ -16,25 +18,23 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { this.drumRoll = drumRoll; - int tickIndex = 0; + RelativeSizeAxes = Axes.X; + Width = (float)(drumRoll.Duration / drumRoll.PreEmpt); + + Add(new DrumRollCirclePiece(CreateCirclePiece())); + foreach (var tick in drumRoll.Ticks) { var newTick = new DrawableDrumRollTick(tick) { - Depth = tickIndex, X = (float)((tick.StartTime - HitObject.StartTime) / drumRoll.Duration) }; AddNested(newTick); - - tickIndex++; + Add(newTick); } } - protected override void UpdateState(ArmedState state) - { - } - protected override void CheckJudgement(bool userTriggered) { if (userTriggered) @@ -53,5 +53,11 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable else Judgement.Result = HitResult.Miss; } + + protected override void UpdateState(ArmedState state) + { + } + + protected virtual CirclePiece CreateCirclePiece() => new CirclePiece(); } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongDrumRoll.cs new file mode 100644 index 0000000000..e9723a0162 --- /dev/null +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongDrumRoll.cs @@ -0,0 +1,20 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Modes.Taiko.Judgements; +using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; + +namespace osu.Game.Modes.Taiko.Objects.Drawable +{ + public class DrawableStrongDrumRoll : DrawableDrumRoll + { + public DrawableStrongDrumRoll(DrumRoll drumRoll) + : base(drumRoll) + { + } + + protected override TaikoJudgement CreateJudgement() => new TaikoJudgement { SecondHit = true }; + + protected override CirclePiece CreateCirclePiece() => new StrongCirclePiece(); + } +} diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs new file mode 100644 index 0000000000..d462f4eeb8 --- /dev/null +++ b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs @@ -0,0 +1,28 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Game.Graphics; + +namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces +{ + public class DrumRollCirclePiece : Container + { + private readonly CirclePiece circle; + + public DrumRollCirclePiece(CirclePiece piece) + { + RelativeSizeAxes = Axes.X; + + Add(circle = piece); + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + circle.AccentColour = colours.YellowDark; + } + } +} diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index d2aecc8d2e..3e26bf7ef2 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -53,11 +53,13 @@ + + @@ -102,4 +104,4 @@ --> - + \ No newline at end of file From 6f66558e299e14091321ee2b167289caef8d7276 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 17:10:01 +0900 Subject: [PATCH 06/36] Use relative size for ticks. --- osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs index da460e5cfc..74ffc59548 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs @@ -19,13 +19,13 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable /// /// The size of a tick. /// - private const float tick_size = 24; + private const float tick_size = TaikoHitObject.CIRCLE_RADIUS / 2; /// /// Any tick that is not the first is not filled, but is displayed /// as a circle instead. This is what controls the stroke width of that circle. /// - private const float tick_border_width = 6; + private const float tick_border_width = tick_size / 4; private readonly DrumRollTick tick; From 79764603d7b2102a414ada8e160c871f4b105856 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 17:18:58 +0900 Subject: [PATCH 07/36] Adjust comment. --- osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs index 74ffc59548..b6a20bab8d 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs @@ -22,8 +22,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable private const float tick_size = TaikoHitObject.CIRCLE_RADIUS / 2; /// - /// Any tick that is not the first is not filled, but is displayed - /// as a circle instead. This is what controls the stroke width of that circle. + /// Any tick that is not the first for a drumroll is not filled, but is instead displayed + /// as a hollow circle. This is what controls the border width of that circle. /// private const float tick_border_width = tick_size / 4; From 2ff213d2c8f47b37b0420704cdef00aad2a1cf06 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 17:19:27 +0900 Subject: [PATCH 08/36] Fix resharper warning. --- osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs index ef9c3006f1..a318ec570f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs @@ -72,10 +72,7 @@ namespace osu.Desktop.VisualTests.Tests PreEmpt = 1000, }; - if (strong) - playfield.Add(new DrawableStrongDrumRoll(d)); - else - playfield.Add(new DrawableDrumRoll(d)); + playfield.Add(strong ? new DrawableStrongDrumRoll(d) : new DrawableDrumRoll(d)); } private class DrawableTestHit : DrawableHitObject From c14759ebadd04d933f013b3c246ba593d993444b Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 17:24:14 +0900 Subject: [PATCH 09/36] Use new circle piece in test case. --- .../Tests/TestCaseTaikoHitObjects.cs | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs index 0204058b8a..5e8d28e192 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs @@ -78,21 +78,21 @@ namespace osu.Desktop.VisualTests.Tests Position = new Vector2(350, 500) }); - Add(new DrumRollCircle(new CirclePiece() + Add(new DrumRollCirclePiece(new CirclePiece { KiaiMode = kiai }) { - Width = 250, + Width = 0.25f, Position = new Vector2(575, 100) }); - Add(new DrumRollCircle(new StrongCirclePiece() + Add(new DrumRollCirclePiece(new StrongCirclePiece { KiaiMode = kiai }) { - Width = 250, + Width = 0.25f, Position = new Vector2(575, 300) }); } @@ -119,20 +119,6 @@ namespace osu.Desktop.VisualTests.Tests } } - private class DrumRollCircle : BaseCircle - { - public DrumRollCircle(CirclePiece piece) - : base(piece) - { - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { - Piece.AccentColour = colours.YellowDark; - } - } - private class CentreHitCircle : BaseCircle { public CentreHitCircle(CirclePiece piece) From 714c280531bad47c8b93c220c609db155a746f49 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 28 Mar 2017 17:26:30 +0900 Subject: [PATCH 10/36] One more xmldoc. --- .../Objects/Drawable/Pieces/DrumRollCirclePiece.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs index d462f4eeb8..076ac5d03a 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs @@ -8,6 +8,9 @@ using osu.Game.Graphics; namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces { + /// + /// A circle piece used for drumrolls. + /// public class DrumRollCirclePiece : Container { private readonly CirclePiece circle; From 2a018e708de0879934c118cef37130923cc9a00b Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 09:36:07 +0900 Subject: [PATCH 11/36] Better life time end. --- .../Objects/Drawable/DrawableDrumRoll.cs | 11 +++++++++++ .../Objects/Drawable/DrawableTaikoHitObject.cs | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index 7915599c3e..b599fea57d 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -35,6 +35,17 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable } } + protected override void LoadComplete() + { + base.LoadComplete(); + + // This is naive, however it's based on the reasoning that the hit target + // is further than mid point of the play field, so the time taken to scroll in should always + // be greater than the time taken to scroll out to the left of the screen. + // Thus, using PreEmpt here is enough for the drum roll to completely scroll out. + LifetimeEnd = drumRoll.EndTime + drumRoll.PreEmpt; + } + protected override void CheckJudgement(bool userTriggered) { if (userTriggered) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs index 609fac70ea..8da05d8bed 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHitObject.cs @@ -30,7 +30,6 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable protected override void LoadComplete() { LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2; - LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt; base.LoadComplete(); } From 1b291ec1a1d1db0b95f8e12006dcfc6a394a982a Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 09:38:24 +0900 Subject: [PATCH 12/36] Make drumroll body colour depending on completion. --- .../Objects/Drawable/DrawableDrumRoll.cs | 12 +++++++- .../Objects/Drawable/Pieces/CirclePiece.cs | 6 ++-- .../Drawable/Pieces/DrumRollCirclePiece.cs | 28 ++++++++++++++++++- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index b599fea57d..f1e2ecef7e 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -13,6 +13,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { private readonly DrumRoll drumRoll; + private readonly DrumRollCirclePiece circle; + public DrawableDrumRoll(DrumRoll drumRoll) : base(drumRoll) { @@ -21,7 +23,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable RelativeSizeAxes = Axes.X; Width = (float)(drumRoll.Duration / drumRoll.PreEmpt); - Add(new DrumRollCirclePiece(CreateCirclePiece())); + Add(circle = new DrumRollCirclePiece(CreateCirclePiece())); foreach (var tick in drumRoll.Ticks) { @@ -30,11 +32,19 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable X = (float)((tick.StartTime - HitObject.StartTime) / drumRoll.Duration) }; + newTick.OnJudgement += onTickJudgement; + AddNested(newTick); Add(newTick); } } + private void onTickJudgement(DrawableHitObject obj) + { + int countHit = NestedHitObjects.Count(o => o.Judgement.Result == HitResult.Hit); + circle.Completion = (float)countHit / NestedHitObjects.Count(); + } + protected override void LoadComplete() { base.LoadComplete(); diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs index ec98feddae..2af469d05f 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs @@ -36,9 +36,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces accentColour = value; innerBackground.Colour = AccentColour; - - triangles.ColourLight = AccentColour; - triangles.ColourDark = AccentColour.Darken(0.1f); + triangles.Colour = AccentColour; resetEdgeEffects(); } @@ -107,6 +105,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, + ColourLight = Color4.White, + ColourDark = Color4.White.Darken(0.1f) } } }, diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs index 076ac5d03a..3be99ab161 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs @@ -1,9 +1,12 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using OpenTK; +using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.MathUtils; using osu.Game.Graphics; namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces @@ -13,8 +16,30 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces /// public class DrumRollCirclePiece : Container { + private float completion; + /// + /// The amount of the drumroll that has been completed, as a percentage of the number + /// of ticks in the drumroll. This determines the internal colour of the drumroll. + /// + public float Completion + { + get { return completion; } + set + { + completion = MathHelper.Clamp(value, 0, 1); + + if (!IsLoaded) + return; + + circle.AccentColour = Interpolation.ValueAt(completion, baseColour, finalColour, 0, 1); + } + } + private readonly CirclePiece circle; + private Color4 baseColour; + private Color4 finalColour; + public DrumRollCirclePiece(CirclePiece piece) { RelativeSizeAxes = Axes.X; @@ -25,7 +50,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces [BackgroundDependencyLoader] private void load(OsuColour colours) { - circle.AccentColour = colours.YellowDark; + circle.AccentColour = baseColour = colours.YellowDark; + finalColour = colours.YellowDarker; } } } From df88121f34bcda101bbbf972bb942adb7da5dd84 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 11:16:14 +0900 Subject: [PATCH 13/36] Fix post-merge errors. --- osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs index a16d4b226c..235617ad49 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs @@ -103,7 +103,7 @@ namespace osu.Desktop.VisualTests.Tests { Anchor = Anchor.Centre, Origin = Anchor.Centre, - TextSize = SYMBOL_INNER_SIZE, + TextSize = CirclePiece.SYMBOL_INNER_SIZE, Icon = FontAwesome.fa_asterisk, Shadow = false }); From 1cfe58e9058cbbe6827287ccbaecddb47bd7f479 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 11:22:27 +0900 Subject: [PATCH 14/36] Implement convesion from TaikoHitObjects to DrawableTaikoHitObjects. --- .../Objects/Drawable/DrawableDrumRollTick.cs | 1 - osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 34 ++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs index b6a20bab8d..11a4b56930 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs @@ -10,7 +10,6 @@ using osu.Framework.Graphics.Containers; using OpenTK; using OpenTK.Graphics; using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Transforms; namespace osu.Game.Modes.Taiko.Objects.Drawable { diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index 3266b5c030..aae0dfc0b8 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -7,6 +7,7 @@ using osu.Game.Modes.Scoring; using osu.Game.Modes.Taiko.Beatmaps; using osu.Game.Modes.Taiko.Judgements; using osu.Game.Modes.Taiko.Objects; +using osu.Game.Modes.Taiko.Objects.Drawable; using osu.Game.Modes.Taiko.Scoring; using osu.Game.Modes.UI; @@ -27,6 +28,37 @@ namespace osu.Game.Modes.Taiko.UI protected override Playfield CreatePlayfield() => new TaikoPlayfield(); - protected override DrawableHitObject GetVisualRepresentation(TaikoHitObject h) => null; + protected override DrawableHitObject GetVisualRepresentation(TaikoHitObject h) + { + var hit = h as Hit; + if (hit != null) + { + switch (hit.Type) + { + case HitType.Centre: + if (h.IsStrong) + return new DrawableStrongCentreHit(hit); + return new DrawableCentreHit(hit); + case HitType.Rim: + if (h.IsStrong) + return new DrawableStrongRimHit(hit); + return new DrawableRimHit(hit); + } + } + + var drumRoll = h as DrumRoll; + if (drumRoll != null) + { + if (h.IsStrong) + return new DrawableStrongDrumRoll(drumRoll); + return new DrawableDrumRoll(drumRoll); + } + + var swell = h as Swell; + if (swell != null) + return new DrawableSwell(swell); + + return null; + } } } From eed50784ba7c02d562a596069b81e5689e194a36 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 11:35:33 +0900 Subject: [PATCH 15/36] Make player work with TaikoHitRenderer. --- osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 7 ++++++- osu.Game/Screens/Play/Player.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index aae0dfc0b8..6ea091a586 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -2,6 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; +using osu.Framework.Graphics; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Scoring; using osu.Game.Modes.Taiko.Beatmaps; @@ -26,7 +27,11 @@ namespace osu.Game.Modes.Taiko.UI protected override IBeatmapProcessor CreateBeatmapProcessor() => new TaikoBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new TaikoPlayfield(); + protected override Playfield CreatePlayfield() => new TaikoPlayfield + { + Anchor = Anchor.CentreLeft, + Origin = Anchor.CentreLeft + }; protected override DrawableHitObject GetVisualRepresentation(TaikoHitObject h) { diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 0554c0e77b..20b6f69b92 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -65,7 +65,7 @@ namespace osu.Game.Screens.Play { var beatmap = Beatmap.Beatmap; - if (beatmap.BeatmapInfo?.Mode > PlayMode.Osu) + if (beatmap.BeatmapInfo?.Mode > PlayMode.Taiko) { //we only support osu! mode for now because the hitobject parsing is crappy and needs a refactor. Exit(); From b10f9512ada9251e5e04926221fa336674b0a01f Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 29 Mar 2017 11:40:13 +0900 Subject: [PATCH 16/36] Remove unused using. --- osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs index b6a20bab8d..11a4b56930 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRollTick.cs @@ -10,7 +10,6 @@ using osu.Framework.Graphics.Containers; using OpenTK; using OpenTK.Graphics; using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Transforms; namespace osu.Game.Modes.Taiko.Objects.Drawable { From 71baf916d159634f6af4c741c3dd491eb8a64365 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Thu, 30 Mar 2017 14:15:42 +0900 Subject: [PATCH 17/36] Fix post-merge errors. --- .../Tests/TestCaseTaikoHitObjects.cs | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs index 4b6302b489..cd79beadb1 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs @@ -133,66 +133,6 @@ namespace osu.Desktop.VisualTests.Tests } } - private class CentreHitCircle : BaseCircle - { - public CentreHitCircle(CirclePiece piece) - : base(piece) - { - Piece.Add(new CircularContainer - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Size = new Vector2(SYMBOL_INNER_SIZE), - Masking = true, - Children = new[] - { - new Box - { - RelativeSizeAxes = Axes.Both - } - } - }); - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { - Piece.AccentColour = colours.PinkDarker; - } - } - - private class RimHitCircle : BaseCircle - { - public RimHitCircle(CirclePiece piece) - : base(piece) - { - Piece.Add(new CircularContainer - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Size = new Vector2(SYMBOL_SIZE), - BorderThickness = SYMBOL_BORDER, - BorderColour = Color4.White, - Masking = true, - Children = new[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Alpha = 0, - AlwaysPresent = true - } - } - }); - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { - Piece.AccentColour = colours.BlueDarker; - } - } - private abstract class BaseCircle : Container { protected readonly CirclePiece Piece; From 41aaf42183a1780992990f5c75800a0c7ffd9057 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Thu, 30 Mar 2017 18:59:00 +0900 Subject: [PATCH 18/36] Remove DrumRollCirclePiece, cleanup CirclePiece a bit. --- .../Tests/TestCaseTaikoHitObjects.cs | 18 +++--- .../Objects/Drawable/DrawableDrumRoll.cs | 26 +++++++-- .../Objects/Drawable/Pieces/CirclePiece.cs | 17 +++--- .../Drawable/Pieces/DrumRollCirclePiece.cs | 57 ------------------- .../osu.Game.Modes.Taiko.csproj | 1 - 5 files changed, 36 insertions(+), 83 deletions(-) delete mode 100644 osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs index cd79beadb1..ce395fd492 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs @@ -92,22 +92,20 @@ namespace osu.Desktop.VisualTests.Tests Position = new Vector2(350, 500) }); - Add(new DrumRollCirclePiece(new CirclePiece - { - KiaiMode = kiai - }) + Add(new CirclePiece { + Position = new Vector2(575, 100), Width = 0.25f, - Position = new Vector2(575, 100) + AccentColour = Color4.Orange, + KiaiMode = kiai, }); - Add(new DrumRollCirclePiece(new StrongCirclePiece - { - KiaiMode = kiai - }) + Add(new StrongCirclePiece { + Position = new Vector2(575, 300), Width = 0.25f, - Position = new Vector2(575, 300) + AccentColour = Color4.Orange, + KiaiMode = kiai }); } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index f1e2ecef7e..f50cab33b0 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -1,7 +1,11 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using OpenTK.Graphics; +using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.MathUtils; +using osu.Game.Graphics; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Taiko.Judgements; using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; @@ -13,7 +17,10 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { private readonly DrumRoll drumRoll; - private readonly DrumRollCirclePiece circle; + private readonly CirclePiece circle; + + private Color4 baseColour; + private Color4 finalColour; public DrawableDrumRoll(DrumRoll drumRoll) : base(drumRoll) @@ -23,7 +30,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable RelativeSizeAxes = Axes.X; Width = (float)(drumRoll.Duration / drumRoll.PreEmpt); - Add(circle = new DrumRollCirclePiece(CreateCirclePiece())); + Add(circle = CreateCirclePiece()); foreach (var tick in drumRoll.Ticks) { @@ -39,10 +46,11 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable } } - private void onTickJudgement(DrawableHitObject obj) + [BackgroundDependencyLoader] + private void load(OsuColour colours) { - int countHit = NestedHitObjects.Count(o => o.Judgement.Result == HitResult.Hit); - circle.Completion = (float)countHit / NestedHitObjects.Count(); + circle.Background.Colour = baseColour = colours.YellowDark; + finalColour = colours.YellowDarker; } protected override void LoadComplete() @@ -56,6 +64,14 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable LifetimeEnd = drumRoll.EndTime + drumRoll.PreEmpt; } + private void onTickJudgement(DrawableHitObject obj) + { + int countHit = NestedHitObjects.Count(o => o.Judgement.Result == HitResult.Hit); + float completion = (float)countHit / NestedHitObjects.Count(); + + circle.AccentColour = Interpolation.ValueAt(completion, baseColour, finalColour, 0, 1); + } + protected override void CheckJudgement(bool userTriggered) { if (userTriggered) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs index 2af469d05f..59eebce28e 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/CirclePiece.cs @@ -35,8 +35,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces { accentColour = value; - innerBackground.Colour = AccentColour; - triangles.Colour = AccentColour; + background.Colour = AccentColour; resetEdgeEffects(); } @@ -66,10 +65,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces protected override Container Content => SymbolContainer; protected readonly Container SymbolContainer; + private readonly Container background; private readonly Container innerLayer; - private readonly Container innerCircleContainer; - private readonly Box innerBackground; - private readonly Triangles triangles; public CirclePiece() { @@ -85,22 +82,22 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces RelativeSizeAxes = Axes.Y, Children = new Framework.Graphics.Drawable[] { - innerCircleContainer = new CircularContainer + background = new CircularContainer { - Name = "Inner Circle", + Name = "Background", Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, Masking = true, Children = new Framework.Graphics.Drawable[] { - innerBackground = new Box + new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, }, - triangles = new Triangles + new Triangles { Anchor = Anchor.Centre, Origin = Anchor.Centre, @@ -149,7 +146,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces private void resetEdgeEffects() { - innerCircleContainer.EdgeEffect = new EdgeEffect + background.EdgeEffect = new EdgeEffect { Type = EdgeEffectType.Glow, Colour = AccentColour, diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs b/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs deleted file mode 100644 index 3be99ab161..0000000000 --- a/osu.Game.Modes.Taiko/Objects/Drawable/Pieces/DrumRollCirclePiece.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using OpenTK; -using OpenTK.Graphics; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.MathUtils; -using osu.Game.Graphics; - -namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces -{ - /// - /// A circle piece used for drumrolls. - /// - public class DrumRollCirclePiece : Container - { - private float completion; - /// - /// The amount of the drumroll that has been completed, as a percentage of the number - /// of ticks in the drumroll. This determines the internal colour of the drumroll. - /// - public float Completion - { - get { return completion; } - set - { - completion = MathHelper.Clamp(value, 0, 1); - - if (!IsLoaded) - return; - - circle.AccentColour = Interpolation.ValueAt(completion, baseColour, finalColour, 0, 1); - } - } - - private readonly CirclePiece circle; - - private Color4 baseColour; - private Color4 finalColour; - - public DrumRollCirclePiece(CirclePiece piece) - { - RelativeSizeAxes = Axes.X; - - Add(circle = piece); - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { - circle.AccentColour = baseColour = colours.YellowDark; - finalColour = colours.YellowDarker; - } - } -} diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 8865e65228..232d108f57 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -64,7 +64,6 @@ - From 0e2f72542507f2fcd0214c88f805407614fad16e Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 31 Mar 2017 11:41:06 +0900 Subject: [PATCH 19/36] Fade the accent colour instead of stepping. --- .../Tests/TestCaseTaikoPlayfield.cs | 2 +- .../Objects/Drawable/DrawableDrumRoll.cs | 29 ++++++++++++++----- osu.Game.Modes.Taiko/Objects/DrumRoll.cs | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs index 56d41027f6..e7702bc032 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs @@ -81,7 +81,7 @@ namespace osu.Desktop.VisualTests.Tests var d = new DrumRoll { StartTime = Time.Current + 1000, - Distance = 2000, + Distance = 20000, PreEmpt = 1000, }; diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index f50cab33b0..6b1c4f546b 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -15,12 +16,21 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { public class DrawableDrumRoll : DrawableTaikoHitObject { + /// + /// Number of consecutive hits required to reach the dark/final accent colour. + /// + private const int consecutive_hits_for_dark_accent = 5; + private readonly DrumRoll drumRoll; private readonly CirclePiece circle; - private Color4 baseColour; - private Color4 finalColour; + private Color4 accentDarkColour; + + /// + /// Number of consecutive tick hits. + /// + private int consecutiveHits; public DrawableDrumRoll(DrumRoll drumRoll) : base(drumRoll) @@ -49,8 +59,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable [BackgroundDependencyLoader] private void load(OsuColour colours) { - circle.Background.Colour = baseColour = colours.YellowDark; - finalColour = colours.YellowDarker; + circle.AccentColour = AccentColour = colours.YellowDark; + accentDarkColour = colours.YellowDarker; } protected override void LoadComplete() @@ -66,10 +76,15 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable private void onTickJudgement(DrawableHitObject obj) { - int countHit = NestedHitObjects.Count(o => o.Judgement.Result == HitResult.Hit); - float completion = (float)countHit / NestedHitObjects.Count(); + if (obj.Judgement.Result == HitResult.Hit) + consecutiveHits++; + else + consecutiveHits--; - circle.AccentColour = Interpolation.ValueAt(completion, baseColour, finalColour, 0, 1); + consecutiveHits = MathHelper.Clamp(consecutiveHits, 0, consecutive_hits_for_dark_accent); + + Color4 newAccent = Interpolation.ValueAt((float)consecutiveHits / consecutive_hits_for_dark_accent, AccentColour, accentDarkColour, 0, 1); + circle.FadeAccent(newAccent, 100); } protected override void CheckJudgement(bool userTriggered) diff --git a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs index ff73c40d2f..df8870ab97 100644 --- a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs @@ -31,7 +31,7 @@ namespace osu.Game.Modes.Taiko.Objects /// The distance between ticks of this drumroll. /// Half of this value is the hit window of the ticks. /// - public double TickTimeDistance { get; protected set; } = 200; + public double TickTimeDistance { get; protected set; } = 100; /// /// Number of drum roll ticks required for a "Good" hit. From 782c6bf28ecb12d12be14706623fcaa9b469bd08 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 1 Apr 2017 16:07:54 +0900 Subject: [PATCH 20/36] Remove unnecessary usings. --- osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs | 2 -- osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs | 1 - 2 files changed, 3 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs index 664c0bf30a..2557875c84 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs @@ -3,10 +3,8 @@ using OpenTK; using OpenTK.Graphics; -using osu.Framework.Allocation; using osu.Framework.Graphics.Containers; using osu.Framework.Testing; -using osu.Game.Graphics; using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; namespace osu.Desktop.VisualTests.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs index 4cc959215f..74f59f3fdb 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs @@ -3,7 +3,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; using osu.Framework.MathUtils; using osu.Framework.Testing; using osu.Game.Modes.Objects.Drawables; From d1e3bbb5f42c4b2d2d7105ee5a42529be71048ec Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 1 Apr 2017 16:12:27 +0900 Subject: [PATCH 21/36] Don't call Reset() from within TestCaseTaikoHitObjects. --- osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs index 2557875c84..7aeb75ef8d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Linq; using OpenTK; using OpenTK.Graphics; using osu.Framework.Graphics.Containers; @@ -22,7 +23,7 @@ namespace osu.Desktop.VisualTests.Tests AddToggleStep("Kiai", b => { kiai = !kiai; - Reset(); + updateKiaiState(); }); Add(new CirclePiece @@ -102,6 +103,12 @@ namespace osu.Desktop.VisualTests.Tests }); } + private void updateKiaiState() + { + foreach (var c in Children.OfType()) + c.KiaiMode = kiai; + } + private abstract class BaseCircle : Container { protected readonly CirclePiece Piece; From b5ef0ae0d8a2e37256bc41f665d154e87902e130 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 1 Apr 2017 16:32:31 +0900 Subject: [PATCH 22/36] consecutiveHits -> rollingHits. --- .../Objects/Drawable/DrawableDrumRoll.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index 6b1c4f546b..9374864003 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -17,9 +17,9 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable public class DrawableDrumRoll : DrawableTaikoHitObject { /// - /// Number of consecutive hits required to reach the dark/final accent colour. + /// Number of rolling hits required to reach the dark/final accent colour. /// - private const int consecutive_hits_for_dark_accent = 5; + private const int rolling_hits_for_dark_accent = 5; private readonly DrumRoll drumRoll; @@ -28,9 +28,9 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable private Color4 accentDarkColour; /// - /// Number of consecutive tick hits. + /// Rolling number of tick hits. This increases for hits and increases for misses. /// - private int consecutiveHits; + private int rollingHits; public DrawableDrumRoll(DrumRoll drumRoll) : base(drumRoll) @@ -77,13 +77,13 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable private void onTickJudgement(DrawableHitObject obj) { if (obj.Judgement.Result == HitResult.Hit) - consecutiveHits++; + rollingHits++; else - consecutiveHits--; + rollingHits--; - consecutiveHits = MathHelper.Clamp(consecutiveHits, 0, consecutive_hits_for_dark_accent); + rollingHits = MathHelper.Clamp(rollingHits, 0, rolling_hits_for_dark_accent); - Color4 newAccent = Interpolation.ValueAt((float)consecutiveHits / consecutive_hits_for_dark_accent, AccentColour, accentDarkColour, 0, 1); + Color4 newAccent = Interpolation.ValueAt((float)rollingHits / rolling_hits_for_dark_accent, AccentColour, accentDarkColour, 0, 1); circle.FadeAccent(newAccent, 100); } From efb589cc089b7ea87bfda2865427f12536229aa4 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 1 Apr 2017 16:34:30 +0900 Subject: [PATCH 23/36] (de)creases for misses. --- osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index 9374864003..4697625c5e 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -28,7 +28,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable private Color4 accentDarkColour; /// - /// Rolling number of tick hits. This increases for hits and increases for misses. + /// Rolling number of tick hits. This increases for hits and decreases for misses. /// private int rollingHits; From 1a667556943b56274990c01f3d5fdeb68548624f Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 10:20:20 +0900 Subject: [PATCH 24/36] Fix second hit displaying two judgements, move hitobjects above playfield when hit. --- osu.Game.Modes.Taiko/UI/HitExplosion.cs | 26 +++++++++++++++++------ osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs | 21 +++++++++++++++--- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/osu.Game.Modes.Taiko/UI/HitExplosion.cs b/osu.Game.Modes.Taiko/UI/HitExplosion.cs index 94938a700d..e3fd89e2b5 100644 --- a/osu.Game.Modes.Taiko/UI/HitExplosion.cs +++ b/osu.Game.Modes.Taiko/UI/HitExplosion.cs @@ -18,12 +18,21 @@ namespace osu.Game.Modes.Taiko.UI /// internal class HitExplosion : CircularContainer { - private readonly TaikoJudgement judgement; + /// + /// The size of a hit explosion if a hit object has been hit with the second key. + /// + private const float secondhit_scale = 1.5f; + + /// + /// The judgement this hit explosion visualises. + /// + public readonly TaikoJudgement Judgement; + private readonly Box innerFill; public HitExplosion(TaikoJudgement judgement) { - this.judgement = judgement; + Judgement = judgement; Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2); @@ -50,10 +59,7 @@ namespace osu.Game.Modes.Taiko.UI [BackgroundDependencyLoader] private void load(OsuColour colours) { - if (judgement.SecondHit) - Size *= 1.5f; - - switch (judgement.TaikoResult) + switch (Judgement.TaikoResult) { case TaikoHitResult.Good: innerFill.Colour = colours.Green; @@ -73,5 +79,13 @@ namespace osu.Game.Modes.Taiko.UI Expire(); } + + /// + /// Transforms this hit explosion to visualise a secondary hit. + /// + public void VisualiseSecondHit() + { + ResizeTo(Size * secondhit_scale, 50); + } } } diff --git a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs index b6165b785b..8efb815fc0 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs @@ -15,6 +15,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics.Primitives; using osu.Game.Modes.Taiko.Objects.Drawable; +using System.Linq; namespace osu.Game.Modes.Taiko.UI { @@ -176,9 +177,7 @@ namespace osu.Game.Modes.Taiko.UI public override void OnJudgement(DrawableHitObject judgedObject) { bool wasHit = judgedObject.Judgement.Result == HitResult.Hit; - - if (wasHit) - hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement)); + bool secondHit = judgedObject.Judgement.SecondHit; judgementContainer.Add(new DrawableTaikoJudgement(judgedObject.Judgement) { @@ -187,6 +186,22 @@ namespace osu.Game.Modes.Taiko.UI RelativePositionAxes = Axes.X, X = wasHit ? judgedObject.Position.X : 0, }); + + if (!wasHit) + return; + + if (!secondHit) + { + if (judgedObject.X >= -0.05f && !(judgedObject is DrawableSwell)) + { + // If we're far enough away from the left stage, we should bring outselves in front of it + topLevelHitContainer.Add(judgedObject.CreateProxy()); + } + + hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement)); + } + else + hitExplosionContainer.Children.FirstOrDefault(e => e.Judgement == judgedObject.Judgement)?.VisualiseSecondHit(); } } } \ No newline at end of file From b027d0d3b43230f1ca3ac5e7e832905657a4dcb8 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 10:28:03 +0900 Subject: [PATCH 25/36] Changing duration is wrong, add HitMultiplier. I don't know if this is the best way to handle this/if there's a better way, but this seems pretty sane? This could be expanded on in the future to make swells harder/require more hits with a smaller duration. --- osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs | 3 ++- osu.Game.Modes.Taiko/Objects/Swell.cs | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index cc361628a3..cc5e394987 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -70,7 +70,8 @@ namespace osu.Game.Modes.Taiko.Beatmaps Sample = original.Sample, IsStrong = strong, - EndTime = original.StartTime + endTimeData.Duration * bash_convert_factor + EndTime = original.StartTime + endTimeData.Duration, + HitMultiplier = bash_convert_factor }; } diff --git a/osu.Game.Modes.Taiko/Objects/Swell.cs b/osu.Game.Modes.Taiko/Objects/Swell.cs index 4cbb5904c7..a2d52d1358 100644 --- a/osu.Game.Modes.Taiko/Objects/Swell.cs +++ b/osu.Game.Modes.Taiko/Objects/Swell.cs @@ -14,6 +14,12 @@ namespace osu.Game.Modes.Taiko.Objects public double Duration => EndTime - StartTime; + /// + /// The multiplier for cases in which the number of required hits by a Swell is not + /// dependent on solely the overall difficulty and the duration of the swell. + /// + public double HitMultiplier { get; set; } = 1; + /// /// The number of hits required to complete the swell successfully. /// @@ -24,7 +30,7 @@ namespace osu.Game.Modes.Taiko.Objects base.ApplyDefaults(timing, difficulty); double spinnerRotationRatio = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5); - RequiredHits = (int)Math.Max(1, Duration / 1000f * spinnerRotationRatio); + RequiredHits = (int)Math.Max(1, Duration / 1000f * spinnerRotationRatio * HitMultiplier); } } } \ No newline at end of file From 3b672fd8424028af9c08882193702e38e4702433 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 1 Apr 2017 23:30:16 +0900 Subject: [PATCH 26/36] Lengthen drum rolls as required by conversion. --- osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index cc5e394987..7cc383f622 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -57,7 +57,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps Sample = original.Sample, IsStrong = strong, - Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1) + Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1) * legacy_velocity_scale }; } From 33e10adfa6336e844efa9124034d5a46abff2aea Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 10:54:13 +0900 Subject: [PATCH 27/36] Rewrite beatmap conversion to allow converting sliders to normal hits. --- .../Beatmaps/TaikoBeatmapConverter.cs | 109 +++++++++++------- 1 file changed, 67 insertions(+), 42 deletions(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index 7cc383f622..693e9cadf3 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -7,6 +7,7 @@ using osu.Game.Beatmaps.Samples; using osu.Game.Modes.Objects; using osu.Game.Modes.Objects.Types; using osu.Game.Modes.Taiko.Objects; +using System; using System.Collections.Generic; using System.Linq; @@ -24,75 +25,99 @@ namespace osu.Game.Modes.Taiko.Beatmaps return new Beatmap(original) { - HitObjects = convertHitObjects(original.HitObjects) + HitObjects = original.HitObjects.SelectMany(h => convertHitObject(h, original)).ToList() }; } - private List convertHitObjects(List hitObjects) - { - return hitObjects.Select(convertHitObject).ToList(); - } - - private TaikoHitObject convertHitObject(HitObject original) + private IEnumerable convertHitObject(HitObject obj, Beatmap beatmap) { // Check if this HitObject is already a TaikoHitObject, and return it if so - TaikoHitObject originalTaiko = original as TaikoHitObject; + var originalTaiko = obj as TaikoHitObject; if (originalTaiko != null) - return originalTaiko; + yield return originalTaiko; - IHasDistance distanceData = original as IHasDistance; - IHasRepeats repeatsData = original as IHasRepeats; - IHasEndTime endTimeData = original as IHasEndTime; + var distanceData = obj as IHasDistance; + var repeatsData = obj as IHasRepeats; + var endTimeData = obj as IHasEndTime; // Old osu! used hit sounding to determine various hit type information - SampleType sample = original.Sample?.Type ?? SampleType.None; + SampleType sample = obj.Sample?.Type ?? SampleType.None; bool strong = (sample & SampleType.Finish) > 0; if (distanceData != null) { - return new DrumRoll + double sv = beatmap.TimingInfo.SliderVelocityAt(obj.StartTime) * beatmap.BeatmapInfo.Difficulty.SliderMultiplier; + + double l = distanceData.Distance * legacy_velocity_scale; + double v = sv * legacy_velocity_scale; + double bl = beatmap.TimingInfo.BeatLengthAt(obj.StartTime); + + int repeats = repeatsData?.RepeatCount ?? 1; + + double skipPeriod = Math.Min(bl / beatmap.BeatmapInfo.Difficulty.SliderTickRate, distanceData.Duration / repeats); + + if (skipPeriod > 0 && l / v * 1000 < 2 * bl) { - StartTime = original.StartTime, - Sample = original.Sample, - IsStrong = strong, - - Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1) * legacy_velocity_scale - }; + for (double j = obj.StartTime; j <= distanceData.EndTime + skipPeriod / 8; j += skipPeriod) + { + // Todo: This should generate different type of hits (including strongs) + // depending on hitobject sound additions (not implemented fully yet) + yield return new CentreHit + { + StartTime = obj.StartTime, + Sample = obj.Sample, + IsStrong = strong + }; + } + } + else + { + yield return new DrumRoll + { + StartTime = obj.StartTime, + Sample = obj.Sample, + IsStrong = strong, + Distance = distanceData.Distance * (repeatsData?.RepeatCount ?? 1) * legacy_velocity_scale + }; + } } - - if (endTimeData != null) + else if (endTimeData != null) { // We compute the end time manually to add in the Bash convert factor - return new Swell + yield return new Swell { - StartTime = original.StartTime, - Sample = original.Sample, + StartTime = obj.StartTime, + Sample = obj.Sample, IsStrong = strong, - EndTime = original.StartTime + endTimeData.Duration, + EndTime = obj.StartTime + endTimeData.Duration, HitMultiplier = bash_convert_factor }; } - - bool isCentre = (sample & ~(SampleType.Finish | SampleType.Normal)) == 0; - - if (isCentre) + else { - return new CentreHit + bool isCentre = (sample & ~(SampleType.Finish | SampleType.Normal)) == 0; + + if (isCentre) { - StartTime = original.StartTime, - Sample = original.Sample, - IsStrong = strong - }; + yield return new CentreHit + { + StartTime = obj.StartTime, + Sample = obj.Sample, + IsStrong = strong + }; + } + else + { + yield return new RimHit + { + StartTime = obj.StartTime, + Sample = obj.Sample, + IsStrong = strong, + }; + } } - - return new RimHit - { - StartTime = original.StartTime, - Sample = original.Sample, - IsStrong = strong, - }; } } } From 3920758981a233b1b05dfcdea98a6a6652a3fbef Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 10:59:49 +0900 Subject: [PATCH 28/36] Rename all occurrences of finishers to strong. --- osu.Game.Modes.Taiko/Judgements/TaikoJudgement.cs | 2 +- osu.Game.Modes.Taiko/UI/HitTarget.cs | 14 +++++++------- osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/osu.Game.Modes.Taiko/Judgements/TaikoJudgement.cs b/osu.Game.Modes.Taiko/Judgements/TaikoJudgement.cs index f4745730db..c2c4093b1b 100644 --- a/osu.Game.Modes.Taiko/Judgements/TaikoJudgement.cs +++ b/osu.Game.Modes.Taiko/Judgements/TaikoJudgement.cs @@ -43,7 +43,7 @@ namespace osu.Game.Modes.Taiko.Judgements public override string MaxResultString => MAX_HIT_RESULT.GetDescription(); /// - /// Whether this Judgement has a secondary hit in the case of finishers. + /// Whether this Judgement has a secondary hit in the case of strong hits. /// public virtual bool SecondHit { get; set; } diff --git a/osu.Game.Modes.Taiko/UI/HitTarget.cs b/osu.Game.Modes.Taiko/UI/HitTarget.cs index 32b2877545..27562cd916 100644 --- a/osu.Game.Modes.Taiko/UI/HitTarget.cs +++ b/osu.Game.Modes.Taiko/UI/HitTarget.cs @@ -21,9 +21,9 @@ namespace osu.Game.Modes.Taiko.UI private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2; /// - /// Diameter of finisher hit object circles. + /// Diameter of strong hit object circles. /// - private const float finisher_diameter = normal_diameter * 1.5f; + private const float strong_hit_diameter = normal_diameter * 1.5f; /// /// The 1px inner border of the taiko playfield. @@ -47,15 +47,15 @@ namespace osu.Game.Modes.Taiko.UI Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Y = border_offset, - Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - finisher_diameter) / 2f - border_offset), + Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - strong_hit_diameter) / 2f - border_offset), Alpha = 0.1f }, new CircularContainer { - Name = "Finisher Ring", + Name = "Strong Hit Ring", Anchor = Anchor.Centre, Origin = Anchor.Centre, - Size = new Vector2(finisher_diameter), + Size = new Vector2(strong_hit_diameter), Masking = true, BorderColour = Color4.White, BorderThickness = border_thickness, @@ -72,7 +72,7 @@ namespace osu.Game.Modes.Taiko.UI }, new CircularContainer { - Name = "Normal Ring", + Name = "Normal Hit Ring", Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(normal_diameter), @@ -96,7 +96,7 @@ namespace osu.Game.Modes.Taiko.UI Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Y = -border_offset, - Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - finisher_diameter) / 2f - border_offset), + Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - strong_hit_diameter) / 2f - border_offset), Alpha = 0.1f }, }; diff --git a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs index 8efb815fc0..c23d920eda 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs @@ -23,7 +23,7 @@ namespace osu.Game.Modes.Taiko.UI { /// /// The play field height. This is relative to the size of hit objects - /// such that the playfield is just a bit larger than finishers. + /// such that the playfield is just a bit larger than strong hits. /// public const float PLAYFIELD_HEIGHT = TaikoHitObject.CIRCLE_RADIUS * 2 * 2; From cd6fdcf0290a108e24a3bcb792095b6990a3c25a Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 11:00:59 +0900 Subject: [PATCH 29/36] Rename spinnerRotationRatio -> baseHitMultiplier. --- osu.Game.Modes.Taiko/Objects/Swell.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Swell.cs b/osu.Game.Modes.Taiko/Objects/Swell.cs index a2d52d1358..db31add4d7 100644 --- a/osu.Game.Modes.Taiko/Objects/Swell.cs +++ b/osu.Game.Modes.Taiko/Objects/Swell.cs @@ -29,8 +29,8 @@ namespace osu.Game.Modes.Taiko.Objects { base.ApplyDefaults(timing, difficulty); - double spinnerRotationRatio = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5); - RequiredHits = (int)Math.Max(1, Duration / 1000f * spinnerRotationRatio * HitMultiplier); + double baseHitMultiplier = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5); + RequiredHits = (int)Math.Max(1, Duration / 1000f * baseHitMultiplier * HitMultiplier); } } } \ No newline at end of file From 8aa723b6a372f4621f8782f2a1e223b9ca4899e4 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 11:05:15 +0900 Subject: [PATCH 30/36] General fixes. --- osu.Game.Modes.Taiko/Objects/Swell.cs | 2 +- osu.Game.Modes.Taiko/UI/HitExplosion.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Swell.cs b/osu.Game.Modes.Taiko/Objects/Swell.cs index db31add4d7..0b654f6ff4 100644 --- a/osu.Game.Modes.Taiko/Objects/Swell.cs +++ b/osu.Game.Modes.Taiko/Objects/Swell.cs @@ -15,7 +15,7 @@ namespace osu.Game.Modes.Taiko.Objects public double Duration => EndTime - StartTime; /// - /// The multiplier for cases in which the number of required hits by a Swell is not + /// The multiplier for cases in which the number of required hits by a swell is not /// dependent on solely the overall difficulty and the duration of the swell. /// public double HitMultiplier { get; set; } = 1; diff --git a/osu.Game.Modes.Taiko/UI/HitExplosion.cs b/osu.Game.Modes.Taiko/UI/HitExplosion.cs index e3fd89e2b5..eb43c1a5d0 100644 --- a/osu.Game.Modes.Taiko/UI/HitExplosion.cs +++ b/osu.Game.Modes.Taiko/UI/HitExplosion.cs @@ -19,9 +19,9 @@ namespace osu.Game.Modes.Taiko.UI internal class HitExplosion : CircularContainer { /// - /// The size of a hit explosion if a hit object has been hit with the second key. + /// The size multiplier of a hit explosion if a hit object has been hit with the second key. /// - private const float secondhit_scale = 1.5f; + private const float secondhit_size_multiplier = 1.5f; /// /// The judgement this hit explosion visualises. @@ -85,7 +85,7 @@ namespace osu.Game.Modes.Taiko.UI /// public void VisualiseSecondHit() { - ResizeTo(Size * secondhit_scale, 50); + ResizeTo(Size * secondhit_size_multiplier, 50); } } } From 6a3601efdca8614a274b3089ceecc106bbfe5317 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 14:22:22 +0900 Subject: [PATCH 31/36] Fix post-merge errors. --- osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 32 +++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index f8e2c81236..d47d3496d9 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -4,15 +4,15 @@ using osu.Game.Beatmaps; using osu.Framework.Graphics; using osu.Game.Modes.Objects.Drawables; -using osu.Game.Modes.Replays; using osu.Game.Modes.Scoring; using osu.Game.Modes.Taiko.Beatmaps; using osu.Game.Modes.Taiko.Judgements; using osu.Game.Modes.Taiko.Objects; using osu.Game.Modes.Taiko.Objects.Drawable; -using osu.Game.Modes.Taiko.Replays; using osu.Game.Modes.Taiko.Scoring; using osu.Game.Modes.UI; +using osu.Game.Modes.Replays; +using osu.Game.Modes.Taiko.Replays; namespace osu.Game.Modes.Taiko.UI { @@ -37,20 +37,20 @@ namespace osu.Game.Modes.Taiko.UI protected override DrawableHitObject GetVisualRepresentation(TaikoHitObject h) { - var hit = h as Hit; - if (hit != null) + var centreHit = h as CentreHit; + if (centreHit != null) { - switch (hit.Type) - { - case HitType.Centre: - if (h.IsStrong) - return new DrawableStrongCentreHit(hit); - return new DrawableCentreHit(hit); - case HitType.Rim: - if (h.IsStrong) - return new DrawableStrongRimHit(hit); - return new DrawableRimHit(hit); - } + if (h.IsStrong) + return new DrawableStrongCentreHit(centreHit); + return new DrawableCentreHit(centreHit); + } + + var rimHit = h as RimHit; + if (centreHit != null) + { + if (h.IsStrong) + return new DrawableStrongRimHit(rimHit); + return new DrawableRimHit(rimHit); } var drumRoll = h as DrumRoll; @@ -67,5 +67,7 @@ namespace osu.Game.Modes.Taiko.UI return null; } + + protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new TaikoFramedReplayInputHandler(replay); } } From 501d52dd8930c60138149033f2155deb42f8f5a3 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 14:28:28 +0900 Subject: [PATCH 32/36] Good catch resharper :+1:. --- osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index d47d3496d9..5640e1df30 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -46,7 +46,7 @@ namespace osu.Game.Modes.Taiko.UI } var rimHit = h as RimHit; - if (centreHit != null) + if (rimHit != null) { if (h.IsStrong) return new DrawableStrongRimHit(rimHit); From 6e612bbefc029cb2fc788469feeb910e56b22d95 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 14:39:56 +0900 Subject: [PATCH 33/36] Reduce complexity of instantiating circle pieces in hits. --- .../Objects/Drawable/DrawableCentreHit.cs | 16 ++++++---------- .../Objects/Drawable/DrawableHit.cs | 13 +++++++++++-- .../Objects/Drawable/DrawableRimHit.cs | 16 ++++++---------- .../Objects/Drawable/DrawableStrongCentreHit.cs | 16 ++++++---------- .../Objects/Drawable/DrawableStrongRimHit.cs | 16 ++++++---------- 5 files changed, 35 insertions(+), 42 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableCentreHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableCentreHit.cs index 683d48df10..76eb6bb77d 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableCentreHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableCentreHit.cs @@ -12,24 +12,20 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { protected override Key[] HitKeys { get; } = { Key.F, Key.J }; - private readonly CirclePiece circlePiece; - public DrawableCentreHit(Hit hit) : base(hit) { - Add(circlePiece = new CirclePiece - { - Children = new[] - { - new CentreHitSymbolPiece() - } - }); } [BackgroundDependencyLoader] private void load(OsuColour colours) { - circlePiece.AccentColour = colours.PinkDarker; + Circle.AccentColour = colours.PinkDarker; } + + protected override CirclePiece CreateCirclePiece() => new CirclePiece + { + Children = new[] { new CentreHitSymbolPiece() } + }; } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs index c8a7355e3c..f6239da929 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs @@ -6,6 +6,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Taiko.Judgements; +using osu.Game.Modes.Taiko.Objects.Drawable.Pieces; using System; using System.Linq; @@ -20,15 +21,17 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable protected override Container Content => bodyContainer; + protected readonly CirclePiece Circle; + private readonly Hit hit; + private readonly Container bodyContainer; + /// /// Whether the last key pressed is a valid hit key. /// private bool validKeyPressed; - private readonly Container bodyContainer; - protected DrawableHit(Hit hit) : base(hit) { @@ -38,6 +41,10 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { Anchor = Anchor.Centre, Origin = Anchor.Centre, + Children = new[] + { + Circle = CreateCirclePiece() + } }); } @@ -100,5 +107,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable Expire(); } + + protected abstract CirclePiece CreateCirclePiece(); } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableRimHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableRimHit.cs index cab6819300..893a6fbb4d 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableRimHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableRimHit.cs @@ -12,24 +12,20 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { protected override Key[] HitKeys { get; } = { Key.D, Key.K }; - private readonly CirclePiece circlePiece; - public DrawableRimHit(Hit hit) : base(hit) { - Add(circlePiece = new CirclePiece - { - Children = new[] - { - new RimHitSymbolPiece() - } - }); } [BackgroundDependencyLoader] private void load(OsuColour colours) { - circlePiece.AccentColour = colours.BlueDarker; + Circle.AccentColour = colours.BlueDarker; } + + protected override CirclePiece CreateCirclePiece() => new CirclePiece + { + Children = new[] { new RimHitSymbolPiece() } + }; } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongCentreHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongCentreHit.cs index b4ec0b108a..bac44f48fb 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongCentreHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongCentreHit.cs @@ -12,24 +12,20 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { protected override Key[] HitKeys { get; } = { Key.F, Key.J }; - private readonly CirclePiece circlePiece; - public DrawableStrongCentreHit(Hit hit) : base(hit) { - Add(circlePiece = new StrongCirclePiece - { - Children = new [] - { - new CentreHitSymbolPiece() - } - }); } [BackgroundDependencyLoader] private void load(OsuColour colours) { - circlePiece.AccentColour = colours.PinkDarker; + Circle.AccentColour = colours.PinkDarker; } + + protected override CirclePiece CreateCirclePiece() => new StrongCirclePiece + { + Children = new[] { new CentreHitSymbolPiece() } + }; } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongRimHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongRimHit.cs index 1f77ad0409..985ba1c2df 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongRimHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableStrongRimHit.cs @@ -12,24 +12,20 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { protected override Key[] HitKeys { get; } = { Key.D, Key.K }; - private readonly CirclePiece circlePiece; - public DrawableStrongRimHit(Hit hit) : base(hit) { - Add(circlePiece = new StrongCirclePiece - { - Children = new[] - { - new RimHitSymbolPiece() - } - }); } [BackgroundDependencyLoader] private void load(OsuColour colours) { - circlePiece.AccentColour = colours.BlueDarker; + Circle.AccentColour = colours.BlueDarker; } + + protected override CirclePiece CreateCirclePiece() => new StrongCirclePiece + { + Children = new[] { new RimHitSymbolPiece() } + }; } } From ebbf381cd6a160fd27b767867e73fb99625692a3 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 14:40:12 +0900 Subject: [PATCH 34/36] Fix kiai not working during gameplay. --- osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs | 1 + osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs | 2 ++ osu.Game.Modes.Taiko/Objects/Drawable/DrawableSwell.cs | 2 ++ 3 files changed, 5 insertions(+) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs index 4697625c5e..ea6b0043d7 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableDrumRoll.cs @@ -41,6 +41,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable Width = (float)(drumRoll.Duration / drumRoll.PreEmpt); Add(circle = CreateCirclePiece()); + circle.KiaiMode = HitObject.Kiai; foreach (var tick in drumRoll.Ticks) { diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs index f6239da929..87f0e76f60 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableHit.cs @@ -46,6 +46,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable Circle = CreateCirclePiece() } }); + + Circle.KiaiMode = HitObject.Kiai; } protected override void CheckJudgement(bool userTriggered) diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableSwell.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableSwell.cs index ccd6380542..ec1ab42bfc 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableSwell.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableSwell.cs @@ -128,6 +128,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable } } }; + + circlePiece.KiaiMode = HitObject.Kiai; } [BackgroundDependencyLoader] From 774e15b89dd94efd1e7fbfd001db55e8aa611adc Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 15:02:21 +0900 Subject: [PATCH 35/36] Set RequiredHits at conversion time to remove HitMultiplier. --- .../Beatmaps/TaikoBeatmapConverter.cs | 5 ++++- osu.Game.Modes.Taiko/Objects/Swell.cs | 19 +------------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index 693e9cadf3..ec8f64bd2f 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -10,6 +10,7 @@ using osu.Game.Modes.Taiko.Objects; using System; using System.Collections.Generic; using System.Linq; +using osu.Game.Database; namespace osu.Game.Modes.Taiko.Beatmaps { @@ -84,6 +85,8 @@ namespace osu.Game.Modes.Taiko.Beatmaps } else if (endTimeData != null) { + double hitMultiplier = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.Difficulty.OverallDifficulty, 3, 5, 7.5) * bash_convert_factor; + // We compute the end time manually to add in the Bash convert factor yield return new Swell { @@ -92,7 +95,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps IsStrong = strong, EndTime = obj.StartTime + endTimeData.Duration, - HitMultiplier = bash_convert_factor + RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier) }; } else diff --git a/osu.Game.Modes.Taiko/Objects/Swell.cs b/osu.Game.Modes.Taiko/Objects/Swell.cs index 0b654f6ff4..f55416509a 100644 --- a/osu.Game.Modes.Taiko/Objects/Swell.cs +++ b/osu.Game.Modes.Taiko/Objects/Swell.cs @@ -1,9 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using osu.Game.Beatmaps.Timing; -using osu.Game.Database; using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Taiko.Objects @@ -14,23 +11,9 @@ namespace osu.Game.Modes.Taiko.Objects public double Duration => EndTime - StartTime; - /// - /// The multiplier for cases in which the number of required hits by a swell is not - /// dependent on solely the overall difficulty and the duration of the swell. - /// - public double HitMultiplier { get; set; } = 1; - /// /// The number of hits required to complete the swell successfully. /// - public int RequiredHits { get; protected set; } = 10; - - public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) - { - base.ApplyDefaults(timing, difficulty); - - double baseHitMultiplier = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5); - RequiredHits = (int)Math.Max(1, Duration / 1000f * baseHitMultiplier * HitMultiplier); - } + public int RequiredHits = 10; } } \ No newline at end of file From a03cffab587d1e7794c2ad178bf51a5705bdc330 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 3 Apr 2017 15:05:12 +0900 Subject: [PATCH 36/36] No need to compute end time manually anymore. --- osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index ec8f64bd2f..97acdeb3e6 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -87,14 +87,13 @@ namespace osu.Game.Modes.Taiko.Beatmaps { double hitMultiplier = BeatmapDifficulty.DifficultyRange(beatmap.BeatmapInfo.Difficulty.OverallDifficulty, 3, 5, 7.5) * bash_convert_factor; - // We compute the end time manually to add in the Bash convert factor yield return new Swell { StartTime = obj.StartTime, Sample = obj.Sample, IsStrong = strong, - EndTime = obj.StartTime + endTimeData.Duration, + EndTime = endTimeData.EndTime, RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier) }; }