From 4e39d6f52b97878f21560a40ca1cbe7401f70d41 Mon Sep 17 00:00:00 2001 From: EpicGamer2469 <62869918+Epicgamer2469@users.noreply.github.com> Date: Sun, 19 May 2024 16:14:59 -0500 Subject: [PATCH] Bouncy Road improvements (#944) * Add custom notes to Bouncy Road + fix swing animations * Add simple tap controls to Bouncy Road * Add blank pole sounds + volume panning to Bouncy Road --- .../Sfx/games/bouncyRoad/leftBlank.ogg | Bin 0 -> 6493 bytes .../Sfx/games/bouncyRoad/leftBlank.ogg.meta | 22 ++++ .../Sfx/games/bouncyRoad/rightBlank.ogg | Bin 0 -> 6785 bytes .../Sfx/games/bouncyRoad/rightBlank.ogg.meta | 22 ++++ Assets/Scripts/Games/BouncyRoad/Ball.cs | 41 ++++++-- Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs | 98 +++++++++++++++--- 6 files changed, 156 insertions(+), 27 deletions(-) create mode 100644 Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg create mode 100644 Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg.meta create mode 100644 Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg create mode 100644 Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg.meta diff --git a/Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg b/Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg new file mode 100644 index 0000000000000000000000000000000000000000..7a362b9bf2e2f708816268b0978f33a355da77ad GIT binary patch literal 6493 zcmai32Ut_fvp@8NCejRo-hdzkK?wvjTv0$!5U}vP1*^mGA^a`vo!T`Dx z^@R6!8@d5VkCtKK~fNOR23ze?ukROm_-_)SxgJ=s8c5{iy7C6a8E>c{n;Tg z9&!*Q2t{bXlS>wHK0{b9gnBZ)5KBF{s~jm3Z~FubzxQFQJFTp-%$GKVQiDl23qim@ z#um!avIK5Nj#Z99fbN14y+^q`k1ncNQ5Y$z+k=d<(tTcEK>>OW5^n;1G5x?`H?+>45}iF%?$ukTQjF*~g;Fv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fqUuSKc4|{^@LO$2w|@w`=;ek?@ub+jsryG(*$vchoZF z(~P7Gy?@^-q4LfjYW$!E8(@WDr~ z3X*1jz{CbqHw!{-=31TKV1haUzl6un`Tj8x$d)$Vb}@XVpY3RS$O7dNpZYwD_U!Z< z?UNQtK}$ii?_Ft5dZh+sQHqVG@GCnE@>&dPwwupg|1Hf4J?~aM!R&TSK*bxw^t8VQyr^rg3B(s+JsYC`^>_ z<8PhxOGi^jRZR09$qvvL*E?}CBfLJW+;zyiqUFF>9>ie`a3SW~p%h zV!i}E>Qpc77wz7;5<%lHuQ!%Gp+d`00cEEAtu4P$#Ji3hHs-Fk=I=P7G+9*2<`bd( zcFUcB-{(FLDp&7mymYfs)pNEWRXq;jNVqoj@qA7)PB%KVB3@cZ93j)odGvP4kUo;O zE$f%+1eJaAE9fudQ6@!Z6Go>|`dJQPWxMy#W1L*zj~&GF+jj@q7apW<=8$c(F-dA! z^S>s=D&QW-Bx}zcdm62Mk6fS<{iud8k}h%dOGnIuHkg&FK}JT6v8cD+JBm-P^4;rF z`<3!5dUaZlD29_FZ21Z(XY=Q8G0tzz4ls(~M~uhU;~I}b(4%N;ZTi!(7sCMyckYCL z{_OGN^+1qTvFCKRp=e#hgH5klPYWsyw#<5d*f^{9_PJPrZri6Tx2adHj1`(Uh0-J# zrxP^FZ?Cv_qeu;8N5eh4N4K`KBYR(l|8|d|PV|4;KL@KE!0#r+l?v_Jdp!zTIA
rnsz literal 0 HcmV?d00001 diff --git a/Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg.meta b/Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg.meta new file mode 100644 index 000000000..203474204 --- /dev/null +++ b/Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9b584037609d9084aa8a838607884dcc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg b/Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg new file mode 100644 index 0000000000000000000000000000000000000000..1c168aa95d9413e2f4a40d226dbbe3ff9daea009 GIT binary patch literal 6785 zcmai12|SeD_kYGZgoJF38e0sej3p*5C}D=mFxFItu@eTpDsN;6A;yrkY@;kAge;}R zAX~P^5>Y8xN}II2)&I_T-}m?afB*mI_j^9~xu5&obMHC#obx^BIroT{mo3Bt{rQm9 z)(2Cb=wR4ZSooobN31KLYf7J`-Ged3?K)FqBufe z{OdeWrU&d{5FE^4tdOjz!Bipyi9^sy6_i-IrzMI(FI11nqFZoAEbW9WdIC$&6Nk6=M;YM-F?nU*w zLDLQBx?!9Z=CQqd)m;JCbCdz>eBPg(5LXW*IE$%(oQJq6oWnjIRhkt7Sgostgrb0& zka?PvWsOvC4WfTY<;Vvu8%g~kT{BxdYa)2UTphy6W8qRu`Z2~PK~iH6AV-lngO$kLSwk-AZt@6oj z@UCbG=&jZ2trg)e0nX*)oCYfJ$tnFm&C@B9{NJ0gcee&)3~bpIjOYqhF(asSg=h(K zE!+(OpBfXiSRs1m6umCW9?;A~4?d(@^?$P3_?HtnZigUa41yJmcnGXPK#zpzJ5ctH zQLM*+DL5AS&rdWLFF+B+e9uhZD7bE_8`msRfURsH{D8>1B(Na9a1NO>nDen8E0*)J zpiC-vq%FZNSFNcmE0^m*{{gudz?Z0=Y*s<`U=C%#QY445K8ldY6=aqTgE_hRJh4tW zH?YoUI7hH-!V&Cs8q9fhqe%*k66m>V^-Xr`{QiVR+3~!AHtaL7BVjVvuSv)ijJ|s0 zz3ms`%>6rjjDg?W#$`M6FCZgR1V~bfrHbiWLobV^7ht+kC0mnI4&lm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ni6hcaz7-ne3(=7gE@ zAO6;a(sIbp%}aGV@qYie+!yyGEq;;^N1x)yTSEDdrf;13igOY-J;Jjf?8X!oEg(#w zjy*19rWx!JyYd;oZ3}amx-CE8cAP7eTVzdB;zeYhdt0i0I#+bh4{;%lq8?1ALV?yz z!7ri4s-8v>8HxB8Xh+}BCo;cP(j9i}ywHRFlq_MKr)(O)3;s?lsc2uQawR|F>iohX zs=p=ANQtx4VXI;Ue_;9>*8{&;E2q|wyW{R=bj<|#Sh1I!-dAVoNQ&iJ{fyGg?v{Jm z&>pJq&B(4QmFhiogY7hM!p$*3uHP3%8_<5xZg!tMdfh9{GCaY=)d8hri%-7zV7QK^ zkdD?3x=`(Btwg!4{qS|K@9js%m#HF`gxCjBh_VmW`_VPtO5Wqwd|JXoJV-x%LT~pc z@{uPR+1`c+qm5t+g1?3<^*@f#$<6m#Ec@36zBNYv3JRwoytW7UzrVw(iBx|uhq{h> zoBI7oyM;>HvGW}6v+s1&^F%;*2ODrsm+g(`n?7i0F#(?rSUJdFE zqOuF-GWguz;=0i^dj$pGlULu&`r8QY5m4#)c25FALQnP2U0u};h71w;n$Y%y&lOsl zZBQ-J>*fiI{vY2~);zCWyK`3iSI8~>6>I6!8E=c_3CLvgFdVnfTP%MV9i70x-M9BnK|+kx1sV8I8vo!X2lws2 zR|`y@D7uU`%2LekJ6PAYYG6O!t?)U+<9fZ^-pCq-F1@?vm@9hQUOqRybaZ= 1) curveProg = 1; @@ -44,9 +50,19 @@ namespace HeavenStudio.Games.Scripts_BouncyRoad } } - private void Bounce() - { - game.PlayBounceSound(startBeat, lengthBeat); + private void Bounce() { + float[] pitches = null; + if (bounceNotes != null) + { + pitches = new float[12]; + for (int i = 0; i < 12; i++) + { + + pitches[i] = GetPitch(bounceNotes[i]); + } + } + + game.PlayBounceSound(startBeat, lengthBeat, pitches, GetPitch(bounceNote)); var actions = new List(); @@ -70,7 +86,7 @@ namespace HeavenStudio.Games.Scripts_BouncyRoad public void RightSuccess(PlayerActionEvent caller, float state) { - SoundByte.PlayOneShotGame("bouncyRoad/ballRight"); + SoundByte.PlayOneShotGame("bouncyRoad/ballRight", pitch: GetPitch(rightNote)); game.ThingsAnim[12].Play("podium", 0, 0); currentCurve = curve[1+12]; currentBeat = startBeat + 12 * lengthBeat; @@ -80,7 +96,7 @@ namespace HeavenStudio.Games.Scripts_BouncyRoad public void RightMiss(PlayerActionEvent caller) { - SoundByte.PlayOneShotGame("bouncyRoad/ballBounce"); + SoundByte.PlayOneShotGame("bouncyRoad/ballBounce", pitch: GetPitch(bounceNote)); currentCurve = curve[^2]; currentBeat = Conductor.instance.songPositionInBeats; isMiss = true; @@ -95,12 +111,12 @@ namespace HeavenStudio.Games.Scripts_BouncyRoad public void LeftSuccess(PlayerActionEvent caller, float state) { - SoundByte.PlayOneShotGame("bouncyRoad/ballLeft"); + SoundByte.PlayOneShotGame("bouncyRoad/ballLeft", pitch: GetPitch(leftNote)); game.ThingsAnim[13].Play("podium", 0, 0); currentCurve = curve[1+13]; currentBeat = startBeat + 13 * lengthBeat; - if (goal) SoundByte.PlayOneShotGame("bouncyRoad/goal", startBeat + 14 * lengthBeat); + if (goal) SoundByte.PlayOneShotGame("bouncyRoad/goal", startBeat + 14 * lengthBeat, pitch: GetPitch(goalNote)); BeatAction.New(game, new List() { new BeatAction.Action(startBeat + 14 * lengthBeat, delegate @@ -118,7 +134,7 @@ namespace HeavenStudio.Games.Scripts_BouncyRoad public void LeftMiss(PlayerActionEvent caller) { - SoundByte.PlayOneShotGame("bouncyRoad/ballBounce"); + SoundByte.PlayOneShotGame("bouncyRoad/ballBounce", pitch: GetPitch(bounceNote)); currentCurve = curve[^1]; currentBeat = Conductor.instance.songPositionInBeats; isMiss = true; @@ -132,5 +148,10 @@ namespace HeavenStudio.Games.Scripts_BouncyRoad } public void Empty(PlayerActionEvent caller) { } + + private float GetPitch(int semitones) + { + return useCustomNotes ? SoundByte.GetPitchFromSemiTones(semitones, true) : 1; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs b/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs index 2af35787d..11d07966a 100644 --- a/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs +++ b/Assets/Scripts/Games/BouncyRoad/BouncyRoad.cs @@ -24,6 +24,29 @@ namespace HeavenStudio.Games.Loaders { new Param("goal", true, "Play Goal Sound"), new Param("color", Color.white, "Color", "Choose the color of the ball."), + new Param("useCustomNotes", false, "Custom Notes", "Toggle if the ball should use custom notes.", new List() + { + new Param.CollapseParam((x, _) => (bool)x, new string[] { "bounceNote", "rightNote", "leftNote", "goalNote", "separateBounceNotes"}) + }), + new Param("separateBounceNotes", false, "Separate Bounce Notes", "Toggle if the ball should use separate notes for the each of the first 12 poles.", new List() + { + new Param.CollapseParam((x, _) => (bool)x, new string[] { "bounceNote2", "bounceNote3", "bounceNote4", "bounceNote5", "bounceNote6", "bounceNote7", "bounceNote8", "bounceNote9", "bounceNote10", "bounceNote11", "bounceNote12" }) + }), + new Param("bounceNote", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note", "Choose the note the ball plays when bouncing on the first 12 poles or the first pole if using custom notes."), + new Param("bounceNote2", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 2", "Choose the note the ball plays when bouncing on the second pole."), + new Param("bounceNote3", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 3", "Choose the note the ball plays when bouncing on the third pole."), + new Param("bounceNote4", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 4", "Choose the note the ball plays when bouncing on the fourth pole."), + new Param("bounceNote5", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 5", "Choose the note the ball plays when bouncing on the fifth pole."), + new Param("bounceNote6", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 6", "Choose the note the ball plays when bouncing on the sixth pole."), + new Param("bounceNote7", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 7", "Choose the note the ball plays when bouncing on the seventh pole."), + new Param("bounceNote8", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 8", "Choose the note the ball plays when bouncing on the eighth pole."), + new Param("bounceNote9", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 9", "Choose the note the ball plays when bouncing on the ninth pole."), + new Param("bounceNote10", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 10", "Choose the note the ball plays when bouncing on the tenth pole."), + new Param("bounceNote11", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 11", "Choose the note the ball plays when bouncing on the eleventh pole."), + new Param("bounceNote12", new EntityTypes.Note(0, 7, 4, "bouncyRoad/ballBounce"), "Bounce Note 12", "Choose the note the ball plays when bouncing on the twelfth pole."), + new Param("rightNote", new EntityTypes.Note(0, 3, 4, "bouncyRoad/ballRight"), "A Note", "Choose the note the ball plays when it bounces on the A pole."), + new Param("leftNote", new EntityTypes.Note(0, 10, 4, "bouncyRoad/ballLeft"), "+ Note", "Choose the note the ball plays when it bounces on the + pole."), + new Param("goalNote", new EntityTypes.Note(0, 3, 5, "bouncyRoad/goal"), "Goal Note", "Choose the note the ball plays when it bounces on the last pole."), } }, new GameAction("background appearance", "Background Appearance") @@ -87,12 +110,20 @@ namespace HeavenStudio.Games private ColorEase[] colorEases = new ColorEase[2]; const double BALL_SEEK_TIME = 1.0; - private struct ScheduledBall + + public struct ScheduledBall { public double beat; public double length; public bool goal; public Color color; + public bool useCustomNotes; + public bool seperateBounceNotes; + public int[] bounceNotes; + public int bounceNote; + public int rightNote; + public int leftNote; + public int goalNote; } List scheduledBalls = new(); int ballIndex; @@ -111,16 +142,18 @@ namespace HeavenStudio.Games } protected static bool IA_TouchLeft(out double dt) { - return PlayerInput.GetTouchDown(InputController.ActionsTouch.Left, out dt); + return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt) && instance.IsExpectingInputNow(InputAction_Left); } protected static bool IA_PadRight(out double dt) { return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt); } - protected static bool IA_TouchRight(out double dt) - { - return PlayerInput.GetTouchDown(InputController.ActionsTouch.Right, out dt); + protected static bool IA_TouchRight(out double dt) { + return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt) + && (instance.IsExpectingInputNow(InputAction_Right) + || (!instance.IsExpectingInputNow(InputAction_Left) && !instance.IsExpectingInputNow(InputAction_Right))); + } public static PlayerInput.InputAction InputAction_Left = @@ -204,12 +237,30 @@ namespace HeavenStudio.Games foreach (var e in events) { if (e.length == 0) continue; + + int[] bounceNotes = null; + if (e["separateBounceNotes"]) { + bounceNotes = new int[12]; + bounceNotes[0] = e["bounceNote"]; + for (int i = 1; i < 12; i++) + { + bounceNotes[i] = e[$"bounceNote{i+1}"]; + } + } + var ball = new ScheduledBall { beat = e.beat, length = e.length, goal = e["goal"], color = e["color"], + useCustomNotes = e["useCustomNotes"], + seperateBounceNotes = e["separateBounceNotes"], + bounceNotes = bounceNotes, + bounceNote = e["bounceNote"], + rightNote = e["rightNote"], + leftNote = e["leftNote"], + goalNote = e["goalNote"], }; scheduledBalls.Add(ball); } @@ -228,10 +279,12 @@ namespace HeavenStudio.Games if (PlayerInput.GetIsAction(InputAction_Right) && !IsExpectingInputNow(InputAction_Right)) { ThingsAnim[12].Play("podium", 0, 0); + SoundByte.PlayOneShotGame("bouncyRoad/rightBlank", volume: .5f); } if (PlayerInput.GetIsAction(InputAction_Left) && !IsExpectingInputNow(InputAction_Left)) { ThingsAnim[13].Play("podium", 0, 0); + SoundByte.PlayOneShotGame("bouncyRoad/leftBlank", volume: .5f); } UpdateBalls(); @@ -246,7 +299,7 @@ namespace HeavenStudio.Games var ball = scheduledBalls[ballIndex]; if (ball.beat - ball.length < beat + BALL_SEEK_TIME) { - SpawnBall(ball.beat, ball.length, ball.goal, ball.color); + SpawnBall(ball); ballIndex++; } else @@ -256,20 +309,26 @@ namespace HeavenStudio.Games } } - public void SpawnBall(double beat, double length, bool goal, Color color) + public void SpawnBall(ScheduledBall scheduledBall) { var newBall = Instantiate(baseBall, transform).GetComponent(); - newBall.startBeat = beat; - newBall.lengthBeat = length; - newBall.goal = goal; - newBall.color = color; + newBall.startBeat = scheduledBall.beat; + newBall.lengthBeat = scheduledBall.length; + newBall.goal = scheduledBall.goal; + newBall.color = scheduledBall.color; + newBall.useCustomNotes = scheduledBall.useCustomNotes; + newBall.bounceNotes = scheduledBall.bounceNotes; + newBall.bounceNote = scheduledBall.bounceNote; + newBall.rightNote = scheduledBall.rightNote; + newBall.leftNote = scheduledBall.leftNote; + newBall.goalNote = scheduledBall.goalNote; - newBall.curve = GetHeightCurve((float)length); + newBall.curve = GetHeightCurve((float)scheduledBall.length); BeatAction.New(instance, new List() { - new BeatAction.Action(beat - length, delegate + new BeatAction.Action(scheduledBall.beat - scheduledBall.length, delegate { newBall.Init(); newBall.gameObject.SetActive(true); @@ -278,13 +337,18 @@ namespace HeavenStudio.Games } List bounceBeats = new(); - public void PlayBounceSound(double beat, double length) + public void PlayBounceSound(double beat, double length, float[] pitches, float singlePitch) { var sounds = new List(); - for (int i = 0; i < 12 ; i++) - { + float volume = .65f; + for (int i = 0; i < 12 ; i++) { + if (i >= 6) volume += .059f; + var bounceBeat = beat + i * length; - if (!bounceBeats.Contains(bounceBeat)) sounds.Add(new MultiSound.Sound("bouncyRoad/ballBounce", bounceBeat)); + if (!bounceBeats.Contains(bounceBeat)) { + float pitch = pitches == null ? singlePitch : pitches[i]; + sounds.Add(new MultiSound.Sound("bouncyRoad/ballBounce", bounceBeat, pitch, volume)); + } bounceBeats.Add(bounceBeat); } MultiSound.Play(sounds.ToArray());