From e6a62807defb6fe765bc3f8cb619b2096220c747 Mon Sep 17 00:00:00 2001 From: RaffyTaffy14 Date: Thu, 15 Feb 2024 22:14:18 -0500 Subject: [PATCH] Random Bug Fixes Fixed random pose option, fixed an animation that accidentally left loop on, and added monologue. Getting ready for pr in a few days. --- Assets/Resources/Fonts/Kurokane.asset | 2 + Assets/Resources/Games/sumoBrothers.prefab | 5 +- .../SumoBrothers/SumoPosePMissBop2.anim | 2 +- .../Animations/SumoBrothers/SumoStompL.anim | 36 +++++++++++++ .../Animations/SumoBrothers/SumoStompR.anim | 36 +++++++++++++ Assets/Scenes/Editor.unity | 2 +- Assets/Scripts/AppInfo.cs | 4 +- .../Games/SumoBrothers/SumoBrothers.cs | 54 +++++++++++++++---- ProjectSettings/ProjectSettings.asset | 6 +-- 9 files changed, 127 insertions(+), 20 deletions(-) diff --git a/Assets/Resources/Fonts/Kurokane.asset b/Assets/Resources/Fonts/Kurokane.asset index f04f17b3f..0f9abc5e0 100644 --- a/Assets/Resources/Fonts/Kurokane.asset +++ b/Assets/Resources/Fonts/Kurokane.asset @@ -247,6 +247,8 @@ MonoBehaviour: m_LigatureGlyphID: 9328 - m_ComponentGlyphIDs: 320000004b000000 m_LigatureGlyphID: 9333 + - m_ComponentGlyphIDs: 010000004b000000 + m_LigatureGlyphID: 9450 m_GlyphPairAdjustmentRecords: - m_FirstAdjustmentRecord: m_GlyphIndex: 34 diff --git a/Assets/Resources/Games/sumoBrothers.prefab b/Assets/Resources/Games/sumoBrothers.prefab index a86a890a6..ea51e8ba8 100644 --- a/Assets/Resources/Games/sumoBrothers.prefab +++ b/Assets/Resources/Games/sumoBrothers.prefab @@ -2020,6 +2020,7 @@ MonoBehaviour: sumoBrotherGHead: {fileID: 1817974397600853338} sumoBrotherPHead: {fileID: 3294882688726592496} impact: {fileID: 4014474221203422495} + dust: {fileID: 0} --- !u!1 &2594614983758801598 GameObject: m_ObjectHideFlags: 0 @@ -2592,7 +2593,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &4284038126118897443 Transform: m_ObjectHideFlags: 0 @@ -7188,7 +7189,7 @@ SpriteRenderer: m_FlipX: 0 m_FlipY: 0 m_DrawMode: 0 - m_Size: {x: 6.94, y: 4.13} + m_Size: {x: 4, y: 4.8} m_AdaptiveModeThreshold: 0.5 m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 diff --git a/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoPosePMissBop2.anim b/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoPosePMissBop2.anim index 07784f565..f791fffd6 100644 --- a/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoPosePMissBop2.anim +++ b/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoPosePMissBop2.anim @@ -5991,7 +5991,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 + m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 diff --git a/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompL.anim b/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompL.anim index 41b526538..efbd71ff1 100644 --- a/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompL.anim +++ b/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompL.anim @@ -3106,6 +3106,24 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.13333334 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 0.45 value: 0 @@ -9800,6 +9818,24 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.13333334 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 0.45 value: 0 diff --git a/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompR.anim b/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompR.anim index be00be328..bc069d09a 100644 --- a/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompR.anim +++ b/Assets/Resources/Sprites/Games/SumoBrothers/Animations/SumoBrothers/SumoStompR.anim @@ -3307,6 +3307,24 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.13333334 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 0.45 value: 0 @@ -11498,6 +11516,24 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.06666667 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.13333334 + value: 0.78431374 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 0.45 value: 0 diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity index a4aaa61c0..024a60d8c 100644 --- a/Assets/Scenes/Editor.unity +++ b/Assets/Scenes/Editor.unity @@ -32707,7 +32707,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: 0, y: 47.632656} + m_AnchoredPosition: {x: 0, y: 47.632652} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!222 &1154875945 diff --git a/Assets/Scripts/AppInfo.cs b/Assets/Scripts/AppInfo.cs index 0f0eb11b6..129d128a6 100644 --- a/Assets/Scripts/AppInfo.cs +++ b/Assets/Scripts/AppInfo.cs @@ -1,8 +1,8 @@ using System; public static class AppInfo { - public const string Version = "0.0.1018"; - public static readonly DateTime Date = new DateTime(2024, 01, 15, 19, 39, 36, 317, DateTimeKind.Utc); + public const string Version = "1.0.4"; + public static readonly DateTime Date = new DateTime(2024, 02, 16, 02, 44, 34, 828, DateTimeKind.Utc); } diff --git a/Assets/Scripts/Games/SumoBrothers/SumoBrothers.cs b/Assets/Scripts/Games/SumoBrothers/SumoBrothers.cs index 5752ae666..25f6e9777 100644 --- a/Assets/Scripts/Games/SumoBrothers/SumoBrothers.cs +++ b/Assets/Scripts/Games/SumoBrothers/SumoBrothers.cs @@ -1,3 +1,29 @@ +/* Hello my brothers, it is RaffyTaffy14 here in the code comments with another monologue. +I still do not know much crap about Unity or C#. +Despite that, I have managed to cobble together Sumo Brothers in a fairly functional state. +A lot of the code may be very weird or just useless (especially the older stuff), but it works for now. +I started making Sumo Brothers for Heaven Studio all the way back in January of 2023 (13 months ago!) +Sumo Brothers at that time was VERY janky. Heck, I used blurry screenshots from videos as reference guides for everything. +Progress on Sumo stopped a few weeks into the project, being as functional as how I left Lockstep for rasmus to pick up. +In June, I finally learned how to cue inputs (I was doing something wrong for the longest time), so now Finishing Poses could be cued. +Nothing happened until December, when I coded most of the functionality for the Slapping/Stomping/Posing +switching, which is how it currently works now. + +From the end of January 2024 to the middle of February 2024, I spent dozens of hours meticulously animating +every animation (there's *74* when you factor out duplicate animations for the Glasses Brother) for the game, from "SumoSlapPrepare" all +the way to "SumoPoseGBopMiss2". +No one thought that there would be anyone crazy enough to hecking animate Sumo Brothers. +People said that it would be animator suicide to even attempt to animate Sumo Brothers. +Yet, here I am, still alive and still too crazy. + +Sometime during the mass animation process, I managed to get back in contact with the upscaler for this game for a potential +redo of the Inu Sensei sprites. +Let's just say that the sprites got a MASSIVE glow up (thx UnbrokenMage) +Animation for Sumo Brothers still isn't done, as I am yet to animate the 3rd and 4th poses which are (currently) absent. +Despite the absense for those 20 animations (yes 2 poses takes up 20 animations), I have managed to do a whopping 54 animations +during my ~2 week grind. + +I hope that whomever may be reading this shall enjoy the wonders of Sumo Brothers and have a great rest of your day. */ using HeavenStudio.Util; using HeavenStudio.InputSystem; using System; @@ -11,7 +37,7 @@ namespace HeavenStudio.Games.Loaders { public static Minigame AddGame(EventCaller eventCaller) { - return new Minigame("sumoBrothers", "Sumo Brothers \n[INITIALIZATION ONLY]", "EDED15", false, false, new List() + return new Minigame("sumoBrothers", "Sumo Brothers", "EDED15", false, false, new List() { new GameAction("bop", "Bop") @@ -107,6 +133,8 @@ namespace HeavenStudio.Games [SerializeField] Animator sumoBrotherGHead; [SerializeField] Animator sumoBrotherPHead; [SerializeField] Animator impact; + [SerializeField] Animator dust; + [Header("Properties")] /*static List queuedInputs = new List(); @@ -128,7 +156,7 @@ namespace HeavenStudio.Games private int sumoSlapDir; private int sumoPoseType; private string sumoPoseTypeCurrent = "1"; - private int sumoPoseTypeNext = 1; + private int sumoPoseTypeNext; private bool lookingAtCamera = false; @@ -200,7 +228,8 @@ namespace HeavenStudio.Games sumoStompDir = false; sumoSlapDir = 0; - sumoPoseType = UnityEngine.Random.Range(1, 2); + sumoPoseType = 0; + sumoPoseTypeNext = 0; } @@ -284,7 +313,7 @@ namespace HeavenStudio.Games } print("current sumo state: " + sumoState + " and previous sumo state: " + sumoStatePrevious); - print("sumo pose type: " + sumoPoseTypeCurrent); + print("sumo pose type: " + sumoPoseType); } public void Bop(double beat, float length, bool inu, bool sumo, bool inuAuto, bool sumoAuto) @@ -573,9 +602,11 @@ namespace HeavenStudio.Games sumoStatePrevious = sumoState; sumoState = SumoState.Pose; - if (randomPose) { - poseType = UnityEngine.Random.Range(1, 1); + if (sumoPoseTypeNext > 0 & randomPose) { + poseType = UnityEngine.Random.Range(1, 2); if (poseType >= sumoPoseTypeNext) poseType++; + } else if (randomPose) { + poseType = UnityEngine.Random.Range(1, 3); } var cond = Conductor.instance; @@ -615,10 +646,16 @@ namespace HeavenStudio.Games sumoPoseTypeCurrent = sumoPoseTypeNext.ToString(); sumoPoseType = sumoPoseTypeNext; + sumoBrotherP.DoScaledAnimationAsync("SumoPoseP" + sumoPoseTypeCurrent, 0.5f); + sumoBrotherG.DoScaledAnimationAsync("SumoPoseG" + sumoPoseTypeCurrent, 0.5f); + sumoBrotherGHead.DoScaledAnimationAsync("SumoGPose" + sumoPoseTypeCurrent, 0.5f); + if (state >= 1f || state <= -1f) { SoundByte.PlayOneShotGame("sumoBrothers/tink"); sumoBrotherPHead.DoScaledAnimationAsync("SumoPPoseBarely" + sumoPoseTypeCurrent, 0.5f); + // Dust is not meant to show up on a barely, need to somehow code that eventually + dust.DoScaledAnimationAsync("dustGone", 0.5f); } else { @@ -626,11 +663,6 @@ namespace HeavenStudio.Games } SoundByte.PlayOneShotGame("sumoBrothers/pose"); - sumoBrotherP.DoScaledAnimationAsync("SumoPoseP" + sumoPoseTypeCurrent, 0.5f); - sumoBrotherG.DoScaledAnimationAsync("SumoPoseG" + sumoPoseTypeCurrent, 0.5f); - sumoBrotherGHead.DoScaledAnimationAsync("SumoGPose" + sumoPoseTypeCurrent, 0.5f); - - } void PoseMiss(PlayerActionEvent caller) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index beaddb302..c0f19341f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 1.0.2 + bundleVersion: 1.0.4 preloadedAssets: - {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3} metroInputSource: 0 @@ -158,11 +158,11 @@ PlayerSettings: applicationIdentifier: Standalone: com.RHeavenStudio.Heaven-Studio buildNumber: - Standalone: 100002 + Standalone: 100004 iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 - AndroidBundleVersionCode: 100002 + AndroidBundleVersionCode: 100004 AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1