diff --git a/Scenes/Play.tscn b/Scenes/Play.tscn index ed940f7..759047d 100644 --- a/Scenes/Play.tscn +++ b/Scenes/Play.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=18 format=3 uid="uid://bqh00ot0csqmk"] +[gd_scene load_steps=19 format=3 uid="uid://bqh00ot0csqmk"] [ext_resource type="Script" path="res://Scripts/Scenes/Play/Play.cs" id="1_asytu"] [ext_resource type="PackedScene" uid="uid://cyetvgmwnoy8l" path="res://Things/Background.tscn" id="2_8g6gv"] [ext_resource type="Shader" path="res://Shaders/Cutout2D.gdshader" id="3_rjbyl"] [ext_resource type="Script" path="res://Scripts/Scenes/Play/Audio/BGM.cs" id="4_c2dke"] [ext_resource type="Script" path="res://Scripts/Scenes/Play/Audio/SFX.cs" id="5_owrd5"] +[ext_resource type="PackedScene" uid="uid://cyopljug0duaa" path="res://Things/TunnelObjects/Notes/NoteTouch.tscn" id="6_kjmqf"] [sub_resource type="Environment" id="Environment_nefjb"] ambient_light_source = 1 @@ -61,7 +62,7 @@ uv1_scale = Vector3(-1, 1, 1) [sub_resource type="ViewportTexture" id="ViewportTexture_w20vk"] viewport_path = NodePath("Mask") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_osg3y"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_nh4gy"] resource_local_to_scene = true shader = ExtResource("3_rjbyl") shader_parameter/mask = SubResource("ViewportTexture_w20vk") @@ -84,8 +85,8 @@ blend_mode = 1 script = ExtResource("1_asytu") bgmController = NodePath("AudioStreamPlayer BGM") sfxController = NodePath("AudioStreamPlayer SFX") -noteDisplay = NodePath("2D Viewport/Viewport Control/Notes Scroll") -scrollDisplay = NodePath("2D Viewport/Viewport Control/Holds ViewportView/Holds Viewport/Holds Scroll") +noteDisplay = NodePath("2D Viewport/Viewport Control/Scroll Anchor/Notes Scroll") +scrollDisplay = NodePath("2D Viewport/Viewport Control/Holds ViewportView/Holds Viewport/Scroll Anchor/Holds Scroll") background = NodePath("2D Viewport/Viewport Control/Background") mainViewport = NodePath("2D Viewport") leftViewport = NodePath("2D Viewport/Viewport Control/ViewportView Left/Viewport Left") @@ -140,7 +141,7 @@ anchor_mode = 0 editor_draw_screen = false [node name="Background" parent="2D Viewport/Viewport Control" instance=ExtResource("2_8g6gv")] -material = SubResource("ShaderMaterial_osg3y") +material = SubResource("ShaderMaterial_nh4gy") layout_mode = 1 offset_top = -1920.0 offset_right = 1920.0 @@ -157,13 +158,22 @@ screen_space_aa = 1 size = Vector2i(1920, 1920) render_target_update_mode = 4 -[node name="Holds Scroll" type="Control" parent="2D Viewport/Viewport Control/Holds ViewportView/Holds Viewport"] +[node name="Scroll Anchor" type="Control" parent="2D Viewport/Viewport Control/Holds ViewportView/Holds Viewport"] layout_mode = 3 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -10.0 +offset_bottom = -10.0 +grow_vertical = 0 + +[node name="Holds Scroll" type="Control" parent="2D Viewport/Viewport Control/Holds ViewportView/Holds Viewport/Scroll Anchor"] +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_top = 1920.0 -offset_bottom = 1920.0 +offset_right = -40.0 +offset_bottom = -40.0 grow_horizontal = 2 grow_vertical = 2 @@ -181,16 +191,6 @@ grow_vertical = 2 rotation = 1.5708 texture = SubResource("GradientTexture1D_pha5y") -[node name="Notes Scroll" type="Control" parent="2D Viewport/Viewport Control"] -material = SubResource("CanvasItemMaterial_27qpl") -layout_mode = 1 -anchors_preset = 2 -anchor_top = 1.0 -anchor_bottom = 1.0 -offset_top = -1920.0 -offset_bottom = -1920.0 -grow_vertical = 0 - [node name="ViewportView Left" type="SubViewportContainer" parent="2D Viewport/Viewport Control"] layout_mode = 0 offset_right = 1920.0 @@ -232,6 +232,25 @@ position = Vector2(0, -1920) offset = Vector2(1921, 1920) anchor_mode = 0 +[node name="Scroll Anchor" type="Control" parent="2D Viewport/Viewport Control"] +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_top = -10.0 +offset_bottom = -10.0 +grow_vertical = 0 + +[node name="Notes Scroll" type="Control" parent="2D Viewport/Viewport Control/Scroll Anchor"] +material = SubResource("CanvasItemMaterial_27qpl") +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +grow_vertical = 0 + +[node name="NoteTouch" parent="2D Viewport/Viewport Control/Scroll Anchor/Notes Scroll" instance=ExtResource("6_kjmqf")] + [node name="AudioStreamPlayer BGM" type="AudioStreamPlayer" parent="."] script = ExtResource("4_c2dke") diff --git a/Scripts/Data/Chart/Chart.cs b/Scripts/Data/Chart/Chart.cs index 8441f1c..1b3a265 100644 --- a/Scripts/Data/Chart/Chart.cs +++ b/Scripts/Data/Chart/Chart.cs @@ -180,21 +180,21 @@ namespace WacK.Data.Chart curNote = new NotePlay( curTime, mb, chartNote.Item2.position, chartNote.Item2.size, - type: NotePlayType.Untimed + type: NotePlayType.Chain ); break; case MerType.SwipeIn: curNote = new NotePlay( curTime, mb, chartNote.Item2.position, chartNote.Item2.size, - type: NotePlayType.SwipeIn + type: NotePlayType.SnapIn ); break; case MerType.SwipeOut: curNote = new NotePlay( curTime, mb, chartNote.Item2.position, chartNote.Item2.size, - type: NotePlayType.SwipeOut + type: NotePlayType.SnapOut ); break; case MerType.SwipeCW: @@ -291,8 +291,8 @@ namespace WacK.Data.Chart List chordableNotes = new List(); foreach (NotePlay n in pair.Value) { - if (n.type != NotePlayType.HoldEnd && n.type != NotePlayType.Untimed) - if (!(new NotePlayType[] { NotePlayType.HoldEnd, NotePlayType.Untimed, NotePlayType.HoldMid }).Contains(n.type)) + if (n.type != NotePlayType.HoldEnd && n.type != NotePlayType.Chain) + if (!(new NotePlayType[] { NotePlayType.HoldEnd, NotePlayType.Chain, NotePlayType.HoldMid }).Contains(n.type)) chordableNotes.Add(n); } if (chordableNotes.Count >= 2) diff --git a/Scripts/Data/Chart/NotePlay.cs b/Scripts/Data/Chart/NotePlay.cs index 85197d3..4ff1d1f 100755 --- a/Scripts/Data/Chart/NotePlay.cs +++ b/Scripts/Data/Chart/NotePlay.cs @@ -8,9 +8,9 @@ namespace WacK.Data.Chart HoldStart, HoldMid, HoldEnd, - Untimed, - SwipeIn, - SwipeOut, + Chain, + SnapIn, + SnapOut, SwipeCW, SwipeCCW, } diff --git a/Scripts/Scenes/Play/Audio/BGM.cs b/Scripts/Scenes/Play/Audio/BGM.cs index eafea4d..8ecaa1e 100644 --- a/Scripts/Scenes/Play/Audio/BGM.cs +++ b/Scripts/Scenes/Play/Audio/BGM.cs @@ -31,7 +31,7 @@ public partial class BGM : AudioStreamPlayer GD.PrintErr($"Unable to open {path} for loading audio! {FileAccess.GetOpenError()}"); return; } - GD.Print("hi"); + var ext = path.Split('.')[^1].ToLower(); switch (ext) { diff --git a/Scripts/Scenes/Play/Play.cs b/Scripts/Scenes/Play/Play.cs index e15cc9f..af3939e 100644 --- a/Scripts/Scenes/Play/Play.cs +++ b/Scripts/Scenes/Play/Play.cs @@ -34,6 +34,10 @@ namespace WacK.Scenes public static PackedScene noteTouch = GD.Load("res://Things/TunnelObjects/Notes/NoteTouch.tscn"); public static PackedScene noteHold = GD.Load("res://Things/TunnelObjects/Notes/NoteHold.tscn"); public static PackedScene noteChain = GD.Load("res://Things/TunnelObjects/Notes/NoteChain.tscn"); + public static PackedScene noteCW = GD.Load("res://Things/TunnelObjects/Notes/NoteSwipeCW.tscn"); + public static PackedScene noteCCW = GD.Load("res://Things/TunnelObjects/Notes/NoteSwipeCCW.tscn"); + public static PackedScene noteIn = GD.Load("res://Things/TunnelObjects/Notes/NoteSnapIn.tscn"); + public static PackedScene noteOut = GD.Load("res://Things/TunnelObjects/Notes/NoteSnapOut.tscn"); [ExportCategory("Audio")] [Export] @@ -104,9 +108,21 @@ namespace WacK.Scenes case NotePlayType.Touch: nNote = noteTouch.Instantiate(); break; - case NotePlayType.Untimed: + case NotePlayType.Chain: nNote = noteChain.Instantiate(); break; + case NotePlayType.SwipeCW: + nNote = noteCW.Instantiate(); + break; + case NotePlayType.SwipeCCW: + nNote = noteCCW.Instantiate(); + break; + case NotePlayType.SnapIn: + nNote = noteIn.Instantiate(); + break; + case NotePlayType.SnapOut: + nNote = noteOut.Instantiate(); + break; default: continue; } @@ -124,7 +140,7 @@ namespace WacK.Scenes double time = bgmController.GetPlaybackPosition() + AudioServer.GetTimeSinceLastMix() - AudioServer.GetOutputLatency(); var nPos = noteDisplay.Position; - nPos.Y = (bgmController.CurTime * scrollPxPerSec) + 1910; + nPos.Y = bgmController.CurTime * scrollPxPerSec; noteDisplay.Position = nPos; scrollDisplay.Position = nPos; } diff --git a/Things/TunnelObjects/Notes/NoteSnapIn.tscn b/Things/TunnelObjects/Notes/NoteSnapIn.tscn new file mode 100644 index 0000000..f5d0e0e --- /dev/null +++ b/Things/TunnelObjects/Notes/NoteSnapIn.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://b4osxd8lxmq8h"] + +[ext_resource type="Script" path="res://Scripts/Things/TunnelObjects/THNotePlay.cs" id="1_lmk57"] +[ext_resource type="Texture2D" uid="uid://cr2a3fc5nu7js" path="res://_Assets/Textures/Notes/SnapIn.png" id="2_ipqj7"] + +[node name="NoteSnapIn" type="Control"] +layout_mode = 3 +anchors_preset = 0 +offset_right = 200.0 +offset_bottom = 24.0 +script = ExtResource("1_lmk57") + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -36.0 +offset_bottom = -24.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_ipqj7") +patch_margin_left = 12 +patch_margin_right = 12 diff --git a/Things/TunnelObjects/Notes/NoteSnapOut.tscn b/Things/TunnelObjects/Notes/NoteSnapOut.tscn new file mode 100644 index 0000000..87565e0 --- /dev/null +++ b/Things/TunnelObjects/Notes/NoteSnapOut.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://dqw7av6ummhib"] + +[ext_resource type="Script" path="res://Scripts/Things/TunnelObjects/THNotePlay.cs" id="1_mhn02"] +[ext_resource type="Texture2D" uid="uid://cdui66l8fg6rg" path="res://_Assets/Textures/Notes/SnapOut.png" id="2_6llgl"] + +[node name="NoteSnapOut" type="Control"] +layout_mode = 3 +anchors_preset = 0 +offset_right = 200.0 +offset_bottom = 24.0 +script = ExtResource("1_mhn02") + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -36.0 +offset_bottom = -24.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_6llgl") +patch_margin_left = 12 +patch_margin_right = 12 diff --git a/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn b/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn new file mode 100644 index 0000000..79d4e80 --- /dev/null +++ b/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://bcindeb5bakb3"] + +[ext_resource type="Script" path="res://Scripts/Things/TunnelObjects/THNotePlay.cs" id="1_e4xxi"] +[ext_resource type="Texture2D" uid="uid://cfm2r0ha81eum" path="res://_Assets/Textures/Notes/SwipeCCW.png" id="2_yb0qd"] + +[node name="NoteSwipeCCW" type="Control"] +layout_mode = 3 +anchors_preset = 0 +offset_right = 200.0 +offset_bottom = 24.0 +script = ExtResource("1_e4xxi") + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -36.0 +offset_bottom = -24.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_yb0qd") +patch_margin_left = 12 +patch_margin_right = 12 diff --git a/Things/TunnelObjects/Notes/NoteSwipeCW.tscn b/Things/TunnelObjects/Notes/NoteSwipeCW.tscn new file mode 100644 index 0000000..58979d9 --- /dev/null +++ b/Things/TunnelObjects/Notes/NoteSwipeCW.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://wk634bobe32k"] + +[ext_resource type="Script" path="res://Scripts/Things/TunnelObjects/THNotePlay.cs" id="1_aasqx"] +[ext_resource type="Texture2D" uid="uid://rrwjokjt4jb8" path="res://_Assets/Textures/Notes/SwipeCW.png" id="2_ttxox"] + +[node name="NoteSwipeCW" type="Control"] +layout_mode = 3 +anchors_preset = 0 +offset_right = 200.0 +offset_bottom = 24.0 +script = ExtResource("1_aasqx") + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -36.0 +offset_bottom = -24.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_ttxox") +patch_margin_left = 12 +patch_margin_right = 12 diff --git a/_Assets/Textures/Notes/Notes.xcf b/_Assets/Textures/Notes/Notes.xcf index ebb5630..a8c7ded 100644 Binary files a/_Assets/Textures/Notes/Notes.xcf and b/_Assets/Textures/Notes/Notes.xcf differ diff --git a/_Assets/Textures/Notes/SnapIn.png b/_Assets/Textures/Notes/SnapIn.png new file mode 100644 index 0000000..ce2ebcf Binary files /dev/null and b/_Assets/Textures/Notes/SnapIn.png differ diff --git a/_Assets/Textures/Notes/SnapIn.png.import b/_Assets/Textures/Notes/SnapIn.png.import new file mode 100644 index 0000000..bfedce6 --- /dev/null +++ b/_Assets/Textures/Notes/SnapIn.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cr2a3fc5nu7js" +path="res://.godot/imported/SnapIn.png-f1e7282d0648cf2f969ac2be970c5308.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://_Assets/Textures/Notes/SnapIn.png" +dest_files=["res://.godot/imported/SnapIn.png-f1e7282d0648cf2f969ac2be970c5308.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/_Assets/Textures/Notes/SnapOut.png b/_Assets/Textures/Notes/SnapOut.png new file mode 100644 index 0000000..346dace Binary files /dev/null and b/_Assets/Textures/Notes/SnapOut.png differ diff --git a/_Assets/Textures/Notes/SnapOut.png.import b/_Assets/Textures/Notes/SnapOut.png.import new file mode 100644 index 0000000..53e3494 --- /dev/null +++ b/_Assets/Textures/Notes/SnapOut.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdui66l8fg6rg" +path="res://.godot/imported/SnapOut.png-66b253d339e92d6939407a6ec84a4c1c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://_Assets/Textures/Notes/SnapOut.png" +dest_files=["res://.godot/imported/SnapOut.png-66b253d339e92d6939407a6ec84a4c1c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/_Assets/Textures/Notes/SwipeCCW.png b/_Assets/Textures/Notes/SwipeCCW.png new file mode 100644 index 0000000..3fc81f1 Binary files /dev/null and b/_Assets/Textures/Notes/SwipeCCW.png differ diff --git a/_Assets/Textures/Notes/SwipeCCW.png.import b/_Assets/Textures/Notes/SwipeCCW.png.import new file mode 100644 index 0000000..a430e5f --- /dev/null +++ b/_Assets/Textures/Notes/SwipeCCW.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfm2r0ha81eum" +path="res://.godot/imported/SwipeCCW.png-bd0032db3441ea2cfe1b145078e43456.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://_Assets/Textures/Notes/SwipeCCW.png" +dest_files=["res://.godot/imported/SwipeCCW.png-bd0032db3441ea2cfe1b145078e43456.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/_Assets/Textures/Notes/SwipeCW.png b/_Assets/Textures/Notes/SwipeCW.png new file mode 100644 index 0000000..d2a65b4 Binary files /dev/null and b/_Assets/Textures/Notes/SwipeCW.png differ diff --git a/_Assets/Textures/Notes/SwipeCW.png.import b/_Assets/Textures/Notes/SwipeCW.png.import new file mode 100644 index 0000000..aa2f3b6 --- /dev/null +++ b/_Assets/Textures/Notes/SwipeCW.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://rrwjokjt4jb8" +path="res://.godot/imported/SwipeCW.png-4282aaf6474583e62f18408cbf13ae93.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://_Assets/Textures/Notes/SwipeCW.png" +dest_files=["res://.godot/imported/SwipeCW.png-4282aaf6474583e62f18408cbf13ae93.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1