From f7d15c5196e9d44204c3612c100a7c615659fa9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2020 15:08:27 +0000 Subject: [PATCH 01/12] Bump Microsoft.NET.Test.Sdk from 16.6.1 to 16.7.0 Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.6.1 to 16.7.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/compare/v16.6.1...v16.7.0) Signed-off-by: dependabot[bot] --- .../osu.Game.Rulesets.Sentakki.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki.Tests/osu.Game.Rulesets.Sentakki.Tests.csproj b/osu.Game.Rulesets.Sentakki.Tests/osu.Game.Rulesets.Sentakki.Tests.csproj index 1dd1da0fd..585bd12ae 100644 --- a/osu.Game.Rulesets.Sentakki.Tests/osu.Game.Rulesets.Sentakki.Tests.csproj +++ b/osu.Game.Rulesets.Sentakki.Tests/osu.Game.Rulesets.Sentakki.Tests.csproj @@ -11,7 +11,7 @@ - + From b13c42875db6834c91e7d968945b4b312f3e7656 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2020 15:08:28 +0000 Subject: [PATCH 02/12] Bump ppy.osu.Game from 2020.725.0 to 2020.806.0 Bumps [ppy.osu.Game](https://github.com/ppy/osu) from 2020.725.0 to 2020.806.0. - [Release notes](https://github.com/ppy/osu/releases) - [Commits](https://github.com/ppy/osu/compare/2020.725.0...2020.806.0) Signed-off-by: dependabot[bot] --- osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj b/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj index 603021cc9..7f2ae9756 100644 --- a/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj +++ b/osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj @@ -10,6 +10,6 @@ osu.Game.Rulesets.Sentakki - + \ No newline at end of file From 612c8c49bc8678b657c182b8aa3dd85fc0b58e6d Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Thu, 6 Aug 2020 23:22:49 +0800 Subject: [PATCH 03/12] Move Slides out of experiments --- .../Beatmaps/SentakkiBeatmapConverter.cs | 1 - .../Beatmaps/SentakkiPatternGenerator.cs | 2 +- .../Mods/SentakkiModExperimental.cs | 10 ---------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs index c6adab2a7..b166d11a8 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs @@ -17,7 +17,6 @@ public enum ConversionExperiments twins = 1, touch = 2, patternv2 = 4, - slide = 8 } public class SentakkiBeatmapConverter : BeatmapConverter diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs index 563a10f58..fb3affea3 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs @@ -71,7 +71,7 @@ public IEnumerable GenerateNewNote(HitObject original) { case IHasPathWithRepeats hold: breakNote = hold.NodeSamples.Any(samples => samples.Any(s => s.Name == HitSampleInfo.HIT_FINISH)); - if (Experiments.Value.HasFlag(ConversionExperiments.slide) && hold.NodeSamples.Any(samples => samples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE)) && hold.Duration > 400) + if (hold.NodeSamples.Any(samples => samples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE)) && hold.Duration > 400) { notes.Add(createSlideNote(original, isBreak: breakNote)); } diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs index 8814d309b..7edafcff1 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs @@ -46,13 +46,6 @@ public class SentakkiModExperimental : Mod, IApplicableToBeatmapConverter Value = true }; - [SettingSource("Enable Slide notes", "Allow SLIDEs to appear")] - public BindableBool EnableSlides { get; } = new BindableBool - { - Default = false, - Value = false - }; - public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) { if (EnableTwins.Value) @@ -63,9 +56,6 @@ public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) if (EnablePatternGen.Value) (beatmapConverter as SentakkiBeatmapConverter).EnabledExperiments.Value |= ConversionExperiments.patternv2; - - if (EnableSlides.Value) - (beatmapConverter as SentakkiBeatmapConverter).EnabledExperiments.Value |= ConversionExperiments.slide; } } } From 566bf620e773a3d945df7f8f1043eac1135b0fe0 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Thu, 6 Aug 2020 23:31:58 +0800 Subject: [PATCH 04/12] Move pattern generator out of experiments --- .../Beatmaps/SentakkiBeatmapConverter.cs | 52 +----- .../Beatmaps/SentakkiNoteConversions.cs | 171 ------------------ .../Beatmaps/SentakkiPatternGenerator.cs | 9 +- .../Mods/SentakkiModExperimental.cs | 12 +- 4 files changed, 13 insertions(+), 231 deletions(-) delete mode 100644 osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiNoteConversions.cs diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs index b166d11a8..8ec5645a4 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiBeatmapConverter.cs @@ -3,7 +3,6 @@ using osu.Game.Rulesets.Sentakki.Objects; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Types; -using osuTK; using System; using System.Collections.Generic; using System.Linq; @@ -16,7 +15,6 @@ public enum ConversionExperiments none = 0, twins = 1, touch = 2, - patternv2 = 4, } public class SentakkiBeatmapConverter : BeatmapConverter @@ -29,62 +27,20 @@ public class SentakkiBeatmapConverter : BeatmapConverter private SentakkiPatternGenerator patternGen; - private readonly Random random; - private readonly Random random2; - public SentakkiBeatmapConverter(IBeatmap beatmap, Ruleset ruleset) : base(beatmap, ruleset) { patternGen = new SentakkiPatternGenerator(beatmap); - var difficulty = beatmap.BeatmapInfo.BaseDifficulty; - int seed = ((int)MathF.Round(difficulty.DrainRate + difficulty.CircleSize) * 20) + (int)(difficulty.OverallDifficulty * 41.2) + (int)MathF.Round(difficulty.ApproachRate); - random = new Random(seed); - random2 = new Random(seed); patternGen.Experiments.BindTo(EnabledExperiments); } protected override IEnumerable ConvertHitObject(HitObject original, IBeatmap beatmap) { - Vector2 CENTRE_POINT = new Vector2(256, 192); - Vector2 newPos = (original as IHasPosition)?.Position ?? Vector2.Zero; - newPos.Y = 384 - newPos.Y; - - int lane = CENTRE_POINT.GetDegreesFromPosition(newPos).GetNoteLaneFromDegrees(); - List objects = new List(); - - if (EnabledExperiments.Value.HasFlag(ConversionExperiments.patternv2)) - { - if ((original as IHasCombo).NewCombo) - patternGen.CreateNewPattern(); - - foreach (var note in patternGen.GenerateNewNote(original).ToList()) - yield return note; - } - else - { - switch (original) - { - case IHasPathWithRepeats _: - objects.AddRange(Conversions.CreateHoldNote(original, lane, beatmap, random, EnabledExperiments.Value)); - break; - - case IHasDuration _: - objects.Add(Conversions.CreateTouchHold(original)); - break; - - default: - if (EnabledExperiments.Value.HasFlag(ConversionExperiments.touch) && (random2.Next() % 10 == 0)) - objects.AddRange(Conversions.CreateTouchNote(original, lane, random, EnabledExperiments.Value)); - else - objects.AddRange(Conversions.CreateTapNote(original, lane, random, EnabledExperiments.Value)); - break; - } - - foreach (var hitObject in objects) - yield return hitObject; + if ((original as IHasCombo).NewCombo) + patternGen.CreateNewPattern(); - yield break; - } + foreach (var note in patternGen.GenerateNewNote(original).ToList()) + yield return note; } protected override Beatmap CreateBeatmap() => new SentakkiBeatmap(); diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiNoteConversions.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiNoteConversions.cs deleted file mode 100644 index 5d381da03..000000000 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiNoteConversions.cs +++ /dev/null @@ -1,171 +0,0 @@ -using osu.Game.Beatmaps; -using osu.Game.Rulesets.Sentakki.Objects; -using osu.Game.Rulesets.Sentakki.UI; -using osu.Game.Rulesets.Objects; -using osu.Game.Rulesets.Objects.Types; -using osuTK; -using osuTK.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using osu.Game.Audio; -using osu.Game.Beatmaps.ControlPoints; -using System.Diagnostics; -using System.Threading; - -namespace osu.Game.Rulesets.Sentakki.Beatmaps -{ - public static class Conversions - { - public static List CreateTapNote(HitObject original, int lane, Random rng, ConversionExperiments experimental = ConversionExperiments.none) - { - List notes = new List(); - bool strong = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_FINISH); - bool twin = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_CLAP); - - notes.Add(new Tap - { - IsBreak = strong, - Lane = lane, - Samples = original.Samples, - StartTime = original.StartTime - }); - if (twin && experimental.HasFlag(ConversionExperiments.twins)) - { - int newPath = lane; - while (lane == newPath) newPath = rng.Next(0, 8); - notes.Add(new Tap - { - IsBreak = strong, - Lane = newPath, - Samples = original.Samples, - StartTime = original.StartTime - }); - foreach (var note in notes) - note.HasTwin = true; - } - - return notes; - } - - public static List CreateTouchNote(HitObject original, int lane, Random rng, ConversionExperiments experimental = ConversionExperiments.none) - { - Vector2 newPos = (original as IHasPosition)?.Position ?? Vector2.Zero; - newPos.Y = 384 - newPos.Y - 192; - newPos.X = (newPos.X - 256) * 0.6f; - - List notes = new List{new Touch - { - Samples = original.Samples, - StartTime = original.StartTime, - Position = newPos - }}; - - return notes; - } - - public static SentakkiHitObject CreateTouchHold(HitObject original) - => new TouchHold - { - StartTime = original.StartTime, - EndTime = (original as IHasDuration).EndTime, - Samples = original.Samples, - }; - - public static List CreateHoldNote(HitObject original, int lane, IBeatmap beatmap, Random rng, ConversionExperiments experimental = ConversionExperiments.none) - { - var curveData = original as IHasPathWithRepeats; - - List notes = new List(); - bool twin = curveData.NodeSamples.Any(s => s.Any(s => s.Name == HitSampleInfo.HIT_CLAP)); - bool strong = curveData.NodeSamples.Any(s => s.Any(s => s.Name == HitSampleInfo.HIT_FINISH)); - - notes.Add(new Hold - { - IsBreak = strong, - Lane = lane, - NodeSamples = curveData.NodeSamples, - StartTime = original.StartTime, - EndTime = original.GetEndTime() - }); - - if (experimental.HasFlag(ConversionExperiments.twins)) - { - if (twin) - { - int newLane = lane; - while (lane == newLane) newLane = rng.Next(0, 8); - notes.Add(new Hold - { - IsBreak = strong, - Lane = newLane, - NodeSamples = curveData.NodeSamples, - StartTime = original.StartTime, - EndTime = original.GetEndTime(), - }); - foreach (var note in notes) - note.HasTwin = true; - } - else - { - var taps = CreateTapFromTicks(original, lane, beatmap, rng); - if (taps.Any()) - notes.AddRange(taps); - } - } - - return notes; - } - - public static List CreateTapFromTicks(HitObject original, int lane, IBeatmap beatmap, Random rng) - { - var curve = original as IHasPathWithRepeats; - double spanDuration = curve.Duration / (curve.RepeatCount + 1); - bool isRepeatSpam = spanDuration < 75 && curve.RepeatCount > 0; - - List hitObjects = new List(); - if (isRepeatSpam) - return hitObjects; - - var difficulty = beatmap.BeatmapInfo.BaseDifficulty; - - var controlPointInfo = beatmap.ControlPointInfo; - TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(original.StartTime); - DifficultyControlPoint difficultyPoint = controlPointInfo.DifficultyPointAt(original.StartTime); - - double scoringDistance = 100 * difficulty.SliderMultiplier * difficultyPoint.SpeedMultiplier; - - var velocity = scoringDistance / timingPoint.BeatLength; - var tickDistance = scoringDistance / difficulty.SliderTickRate; - - double legacyLastTickOffset = (original as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0; - - foreach (var e in SliderEventGenerator.Generate(original.StartTime, spanDuration, velocity, tickDistance, curve.Path.Distance, curve.RepeatCount + 1, legacyLastTickOffset, CancellationToken.None)) - { - int newLane = lane; - while (newLane == lane) newLane = rng.Next(0, 8); - - switch (e.Type) - { - case SliderEventType.Tick: - case SliderEventType.Repeat: - hitObjects.Add(new Tap - { - Lane = newLane, - Samples = getTickSamples(original.Samples), - StartTime = e.Time, - }); - break; - } - } - return hitObjects; - } - - private static List getTickSamples(IList objSamples) => objSamples.Select(s => new HitSampleInfo - { - Bank = s.Bank, - Name = @"slidertick", - Volume = s.Volume - }).ToList(); - } -} diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs index fb3affea3..9f8b2f2d1 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs @@ -94,7 +94,7 @@ public IEnumerable GenerateNewNote(HitObject original) break; case IHasDuration _: - yield return Conversions.CreateTouchHold(original); + yield return CreateTouchHold(original); break; default: @@ -125,6 +125,13 @@ public IEnumerable GenerateNewNote(HitObject original) } // Individual note generation code, because it's cleaner + public static SentakkiHitObject CreateTouchHold(HitObject original) => new TouchHold + { + StartTime = original.StartTime, + EndTime = (original as IHasDuration).EndTime, + Samples = original.Samples, + }; + private SentakkiHitObject createSlideNote(HitObject original, bool twin = false, bool isBreak = false) { int noteLane = getNewLane(twin); diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs index 7edafcff1..a054751e5 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModExperimental.cs @@ -38,14 +38,7 @@ public class SentakkiModExperimental : Mod, IApplicableToBeatmapConverter Default = false, Value = true, }; - - [SettingSource("Use pattern generator for osu converts", "Use a pattern generator to generate convert beatmaps")] - public BindableBool EnablePatternGen { get; } = new BindableBool - { - Default = false, - Value = true - }; - + public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) { if (EnableTwins.Value) @@ -53,9 +46,6 @@ public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) if (EnableTouch.Value) (beatmapConverter as SentakkiBeatmapConverter).EnabledExperiments.Value |= ConversionExperiments.touch; - - if (EnablePatternGen.Value) - (beatmapConverter as SentakkiBeatmapConverter).EnabledExperiments.Value |= ConversionExperiments.patternv2; } } } From 56d7cc4de29e4ac1c3af27c02bc7b4de215c1388 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Thu, 6 Aug 2020 23:53:40 +0800 Subject: [PATCH 05/12] Fix RX not considering nested objects --- .../Mods/SentakkiModRelax.cs | 27 +++++++++++++++++++ .../Objects/Drawables/DrawableSlideNode.cs | 6 ++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs index c7426c8ae..bc5715b7a 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs @@ -69,6 +69,33 @@ public void Update(Playfield playfield) switch (h) { + case DrawableSlide slide: + foreach (var nested in slide.NestedHitObjects.Where(obj => obj.IsAlive && !h.IsHit && time >= h.HitObject.StartTime - relax_leniency)) + { + switch (nested) + { + case DrawableSlideTap slideTap: + if (slideTap.HitArea.IsHovered) + { + Debug.Assert(slideTap.HitObject.HitWindows != null); + requiresHit |= slideTap.HitObject.HitWindows.CanBeHit(time - slideTap.HitObject.StartTime); + } + break; + case DrawableSlideNode slideNode: + if (slideNode.IsHovered) + { + if (slideNode.IsTailNode) + { + Debug.Assert(slideNode.HitObject.HitWindows != null); + requiresHit |= slideNode.HitObject.HitWindows.CanBeHit(time - slideNode.HitObject.StartTime); + } + else requiresHit = true; + } + break; + } + } + break; + case DrawableTap tap: if (tap.HitArea.IsHovered) { diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs index 6cc8906fe..6a4ebe145 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs @@ -66,7 +66,7 @@ protected override void LoadSamples() } protected bool IsHittable => ThisIndex < 2 || Slide.SlideNodes[ThisIndex - 2].IsHit; - private bool isTailNode => (HitObject as Slide.SlideNode).IsTailNote; + public bool IsTailNode => (HitObject as Slide.SlideNode).IsTailNote; protected void HitPreviousNodes(bool successful = false) { @@ -95,7 +95,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset) ApplyResult(r => r.Type = HitResult.Perfect); HitPreviousNodes(true); } - if (isTailNode && !HitObject.HitWindows.CanBeHit(timeOffset)) + if (IsTailNode && !HitObject.HitWindows.CanBeHit(timeOffset)) { ApplyResult(r => r.Type = IsHittable ? HitResult.Good : HitResult.Miss); HitPreviousNodes(); @@ -108,7 +108,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset) HitResult result; - if (isTailNode) + if (IsTailNode) { result = HitObject.HitWindows.ResultFor(timeOffset); if (result == HitResult.None) From 2a40b4337a28068d22d19a80c8811ea58a453330 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 00:18:06 +0800 Subject: [PATCH 06/12] Fix crazy button spamming when RX does a slide --- .../Mods/SentakkiModRelax.cs | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs index bc5715b7a..bc80ae8ee 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs @@ -47,6 +47,7 @@ public void ApplyToPlayer(Player player) sentakkiInputManager.AllowUserPresses = false; } + private bool holdingSlide = false; public void Update(Playfield playfield) { if (hasReplay) @@ -75,25 +76,19 @@ public void Update(Playfield playfield) switch (nested) { case DrawableSlideTap slideTap: - if (slideTap.HitArea.IsHovered) - { - Debug.Assert(slideTap.HitObject.HitWindows != null); - requiresHit |= slideTap.HitObject.HitWindows.CanBeHit(time - slideTap.HitObject.StartTime); - } + if (time < slideTap.HitObject.StartTime - relax_leniency) + break; + holdingSlide = true; break; case DrawableSlideNode slideNode: + if (time < slide.HitObject.StartTime) + break; if (slideNode.IsHovered) - { - if (slideNode.IsTailNode) - { - Debug.Assert(slideNode.HitObject.HitWindows != null); - requiresHit |= slideNode.HitObject.HitWindows.CanBeHit(time - slideNode.HitObject.StartTime); - } - else requiresHit = true; - } + holdingSlide = true; break; } } + requiresHold = holdingSlide; break; case DrawableTap tap: From 928cde94b1f87852a07eaf12610f2ae7653e2d71 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 01:14:31 +0800 Subject: [PATCH 07/12] Add Slide Delay --- .../Objects/Drawables/DrawableSlide.cs | 23 +++++++++++++++---- .../Objects/Drawables/DrawableSlideNode.cs | 4 ++++ osu.Game.Rulesets.Sentakki/Objects/Slide.cs | 11 ++++++++- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs index e5d6eee5f..a525d24a0 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs @@ -1,3 +1,5 @@ +using osu.Framework.Allocation; +using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Scoring; @@ -5,9 +7,13 @@ using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Types; using osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces; +using osu.Game.Beatmaps.ControlPoints; using osuTK; using osuTK.Graphics; using System.Linq; +using osu.Game.Beatmaps; + + namespace osu.Game.Rulesets.Sentakki.Objects.Drawables { @@ -25,7 +31,7 @@ public class DrawableSlide : DrawableSentakkiHitObject private Container slideBodyContainer; public StarPiece SlideStar; - protected override double InitialLifetimeOffset => 8000; + protected override double InitialLifetimeOffset => 500; private float starProg = 0; private Vector2? previousPosition = null; @@ -106,19 +112,26 @@ protected override void LoadComplete() slideBodyContainer.Colour = c.NewValue; }, true); } + + [Resolved] + private Bindable workingBeatmap { get; set; } + + public double ShootDelay => workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength; + protected override void UpdateInitialTransforms() { - this.TransformTo(nameof(StarProgress), 0f); using (BeginAbsoluteSequence(HitObject.StartTime - 500, true)) { - Slidepath.FadeInFromZero(500); + Slidepath.FadeIn(500); using (BeginAbsoluteSequence(HitObject.StartTime - 50, true)) { - SlideStar.FadeInFromZero(100).ScaleTo(1, 100); - this.Delay(100).TransformTo(nameof(StarProgress), 1f, (HitObject as IHasDuration).Duration - 50); + //??? + SlideStar.FadeIn(100).ScaleTo(1, 100); + this.Delay(100 + ShootDelay).TransformTo(nameof(StarProgress), 1f, (HitObject as IHasDuration).Duration - 50 - ShootDelay); } } } + protected override void UpdateStateTransforms(ArmedState state) { base.UpdateStateTransforms(state); diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs index 6a4ebe145..3448cad49 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlideNode.cs @@ -9,6 +9,7 @@ using osu.Game.Audio; using osu.Game.Configuration; using osu.Game.Rulesets.Sentakki.Configuration; +using osu.Game.Rulesets.Objects.Types; using osu.Game.Screens.Play; using osu.Game.Rulesets.Judgements; @@ -48,6 +49,9 @@ protected override void LoadComplete() base.LoadComplete(); ThisIndex = Slide.SlideNodes.IndexOf(this); + // Adjust StartTime to account for the delay, likely a shite way if I do say so myself. Need to revisit. + HitObject.StartTime = Slide.HitObject.StartTime + Slide.ShootDelay + (((Slide.HitObject as IHasDuration).Duration - Slide.ShootDelay) * (HitObject as Slide.SlideNode).Progress); + OnNewResult += (DrawableHitObject hitObject, JudgementResult result) => { if (result.IsHit) diff --git a/osu.Game.Rulesets.Sentakki/Objects/Slide.cs b/osu.Game.Rulesets.Sentakki/Objects/Slide.cs index 0fbf499e7..19d5e2224 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Slide.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Slide.cs @@ -1,3 +1,4 @@ +using osu.Framework.Bindables; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Objects.Types; using osu.Game.Rulesets.Scoring; @@ -14,6 +15,15 @@ public class Slide : SentakkiHitObject, IHasDuration public static readonly float SLIDE_CHEVRON_DISTANCE = 25; public SentakkiSlidePath SlidePath; + // The delay (in beats) before the animation star starts moving along the path + private BindableInt slideShootDelay = new BindableInt(1); + + public int SlideShootDelay + { + get => slideShootDelay.Value; + set => slideShootDelay.Value = value; + } + public double EndTime { get => StartTime + Duration; @@ -34,7 +44,6 @@ protected override void CreateNestedHitObjects() var progress = i * chevronInterval; AddNested(new SlideNode { - StartTime = StartTime + (Duration * progress), Lane = Lane, Progress = (float)progress }); From 84ef57a2d87a3d6717424172281d0653f8f34c2f Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 01:42:05 +0800 Subject: [PATCH 08/12] Fix potential crash due to negative time transforms --- .../Objects/Drawables/DrawableSlide.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs index a525d24a0..0a5679903 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs @@ -49,6 +49,7 @@ public float StarProgress previousPosition = SlideStar.Position; } } + public DrawableSlide(SentakkiHitObject hitObject) : base(hitObject) { @@ -113,10 +114,24 @@ protected override void LoadComplete() }, true); } + protected override void InvalidateTransforms() + { + + } + [Resolved] private Bindable workingBeatmap { get; set; } - public double ShootDelay => workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength; + public double ShootDelay + { + get + { + double delay = workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength; + if (delay >= (HitObject as IHasDuration).Duration - 50) + return 0; + return delay; + } + } protected override void UpdateInitialTransforms() { @@ -125,7 +140,6 @@ protected override void UpdateInitialTransforms() Slidepath.FadeIn(500); using (BeginAbsoluteSequence(HitObject.StartTime - 50, true)) { - //??? SlideStar.FadeIn(100).ScaleTo(1, 100); this.Delay(100 + ShootDelay).TransformTo(nameof(StarProgress), 1f, (HitObject as IHasDuration).Duration - 50 - ShootDelay); } From f078dc2a3f76be4ec9915d461f944223e9d9b175 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 01:43:41 +0800 Subject: [PATCH 09/12] Increase minimum slide duration --- osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs index 9f8b2f2d1..e2175d4ed 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/SentakkiPatternGenerator.cs @@ -71,7 +71,7 @@ public IEnumerable GenerateNewNote(HitObject original) { case IHasPathWithRepeats hold: breakNote = hold.NodeSamples.Any(samples => samples.Any(s => s.Name == HitSampleInfo.HIT_FINISH)); - if (hold.NodeSamples.Any(samples => samples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE)) && hold.Duration > 400) + if (hold.NodeSamples.Any(samples => samples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE)) && hold.Duration >= 500) { notes.Add(createSlideNote(original, isBreak: breakNote)); } From e19092bfda7d82efd38cffa1855a148541c44185 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 02:05:58 +0800 Subject: [PATCH 10/12] Actually use the SlideShootDelay variable :| --- osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs index 0a5679903..178f626e5 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs @@ -126,7 +126,7 @@ public double ShootDelay { get { - double delay = workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength; + double delay = workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength * (HitObject as Slide).SlideShootDelay; if (delay >= (HitObject as IHasDuration).Duration - 50) return 0; return delay; From 0b35a815667017c7a7de029214e92a9044c73b89 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 02:13:06 +0800 Subject: [PATCH 11/12] Use half-beats for the delay --- osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs index 178f626e5..fd6817bcc 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs @@ -126,7 +126,7 @@ public double ShootDelay { get { - double delay = workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength * (HitObject as Slide).SlideShootDelay; + double delay = workingBeatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(HitObject.StartTime).BeatLength * (HitObject as Slide).SlideShootDelay / 2; if (delay >= (HitObject as IHasDuration).Duration - 50) return 0; return delay; From 9aa4d98ff0e9fd5de71999eb95e543fee139aae9 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Fri, 7 Aug 2020 02:14:16 +0800 Subject: [PATCH 12/12] Remove dumbass looking slide 10% because it's weird, 20% because not in original, 70% due to personal issues. --- osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs | 2 -- osu.Game.Rulesets.Sentakki/Objects/SlideData.cs | 1 - 2 files changed, 3 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs index fd6817bcc..74b08fa2f 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableSlide.cs @@ -13,8 +13,6 @@ using System.Linq; using osu.Game.Beatmaps; - - namespace osu.Game.Rulesets.Sentakki.Objects.Drawables { public class DrawableSlide : DrawableSentakkiHitObject diff --git a/osu.Game.Rulesets.Sentakki/Objects/SlideData.cs b/osu.Game.Rulesets.Sentakki/Objects/SlideData.cs index f37d55cc0..9fe6adc88 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/SlideData.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/SlideData.cs @@ -45,7 +45,6 @@ public static class SlidePaths GenerateUPattern(5), GenerateUPattern(6), GenerateUPattern(7), - GenerateVPattern(0), GenerateVPattern(1), GenerateVPattern(2), GenerateVPattern(3),