diff --git a/Scenes/Play.tscn b/Scenes/Play.tscn index 069df35..0ae1766 100644 --- a/Scenes/Play.tscn +++ b/Scenes/Play.tscn @@ -1,12 +1,14 @@ -[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="Texture2D" uid="uid://cfvv520hv5lss" path="res://_Assets/Textures/background-placeholder.jpg" id="2_k05nq"] [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"] [sub_resource type="Environment" id="Environment_nefjb"] +background_mode = 3 ambient_light_source = 1 ambient_light_energy = 0.0 reflected_light_source = 1 @@ -61,7 +63,7 @@ uv1_scale = Vector3(-1, 1, 1) [sub_resource type="ViewportTexture" id="ViewportTexture_w20vk"] viewport_path = NodePath("Mask") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_7nje4"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2pv0x"] resource_local_to_scene = true shader = ExtResource("3_rjbyl") shader_parameter/mask = SubResource("ViewportTexture_w20vk") @@ -116,6 +118,25 @@ mesh = SubResource("ArrayMesh_qc82q") skeleton = NodePath("") surface_material_override/0 = SubResource("StandardMaterial3D_3rv8i") +[node name="Background" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TextureRect" type="TextureRect" parent="Background"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_k05nq") +expand_mode = 1 +stretch_mode = 6 + [node name="2D Viewport" type="SubViewport" parent="."] disable_3d = true own_world_3d = true @@ -140,7 +161,7 @@ anchor_mode = 0 editor_draw_screen = false [node name="Background" parent="2D Viewport/Viewport Control" instance=ExtResource("2_8g6gv")] -material = SubResource("ShaderMaterial_7nje4") +material = SubResource("ShaderMaterial_2pv0x") layout_mode = 1 offset_top = -1920.0 offset_right = 1920.0 diff --git a/Scripts/Scenes/Play/Play.cs b/Scripts/Scenes/Play/Play.cs index 667a41d..b21f77a 100644 --- a/Scripts/Scenes/Play/Play.cs +++ b/Scripts/Scenes/Play/Play.cs @@ -63,9 +63,9 @@ namespace WacK.Scenes public Viewport rightViewport; private Chart chart; - // Indices point to the NEXT thing to look for. We process that thing once - // the song time is at or later than the thing's time. - private int chordNextIdx = 0; + // Indices point to the NEXT thing in chart to look for. We process + // that thing once the song time is at or later than the thing's time. + private int playNextIdx = 0; private int eventNextIdx = 0; // base scroll speed, which we can apply multipliers on @@ -156,7 +156,7 @@ namespace WacK.Scenes foreach (var e in l) { - GD.Print($"Passed event {e.type}(pos={e.pos},size={e.size}) at {t}"); + GD.Print($"Passed event {e.type} at {t}"); switch (e.type) { case NoteEventType.BGAdd: @@ -178,29 +178,6 @@ namespace WacK.Scenes scrollDisplay.Position = nPos; } - private async void TestBGAnim() - { - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - - // clockwise all - background.SetSegments(0, 60, true, DrawDirection.Clockwise); - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - background.SetSegments(0, 60, false, DrawDirection.Clockwise); - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - - // counterclockwise all - background.SetSegments(0, 60, true, DrawDirection.CounterClockwise); - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - background.SetSegments(0, 60, false, DrawDirection.CounterClockwise); - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - - // center all - background.SetSegments(0, 60, true, DrawDirection.Center); - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - background.SetSegments(0, 60, false, DrawDirection.Center); - await ToSignal(GetTree().CreateTimer(1.5), SceneTreeTimer.SignalName.Timeout); - } - public override void _Process(double delta) { PlayLoop(); diff --git a/Scripts/Things/TunnelObjects/Background.cs b/Scripts/Things/TunnelObjects/Background.cs index 7f15c7f..a065050 100644 --- a/Scripts/Things/TunnelObjects/Background.cs +++ b/Scripts/Things/TunnelObjects/Background.cs @@ -80,7 +80,6 @@ namespace WacK.Things.TunnelObjects } await ToSignal(GetTree(), "process_frame"); } - GD.Print("Finished BG anim!"); } } } diff --git a/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn b/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn index 85f3246..8fe0165 100644 --- a/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn +++ b/Things/TunnelObjects/Notes/NoteSwipeCCW.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=3 format=3 uid="uid://bcindeb5bakb3"] +[gd_scene load_steps=4 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"] +[sub_resource type="LabelSettings" id="LabelSettings_up7en"] +font_size = 86 + [node name="NoteSwipeCCW" type="Control" node_paths=PackedStringArray("noteBase")] layout_mode = 3 anchors_preset = 0 @@ -23,3 +26,11 @@ grow_vertical = 2 texture = ExtResource("2_yb0qd") patch_margin_left = 12 patch_margin_right = 12 + +[node name="Label" type="Label" parent="."] +offset_left = 9.0 +offset_top = -159.0 +offset_right = 421.0 +offset_bottom = -48.0 +text = ">>>>>>>>>>>>>>>>" +label_settings = SubResource("LabelSettings_up7en") diff --git a/Things/TunnelObjects/Notes/NoteSwipeCW.tscn b/Things/TunnelObjects/Notes/NoteSwipeCW.tscn index ce48a61..1fe0502 100644 --- a/Things/TunnelObjects/Notes/NoteSwipeCW.tscn +++ b/Things/TunnelObjects/Notes/NoteSwipeCW.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=3 format=3 uid="uid://wk634bobe32k"] +[gd_scene load_steps=4 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"] +[sub_resource type="LabelSettings" id="LabelSettings_1hjvl"] +font_size = 86 + [node name="NoteSwipeCW" type="Control" node_paths=PackedStringArray("noteBase")] layout_mode = 3 anchors_preset = 0 @@ -23,3 +26,12 @@ grow_vertical = 2 texture = ExtResource("2_ttxox") patch_margin_left = 12 patch_margin_right = 12 + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_left = 9.0 +offset_top = -159.0 +offset_right = 421.0 +offset_bottom = -48.0 +text = "<<<<<<<<<<<<<<<<<<<<<<<<" +label_settings = SubResource("LabelSettings_1hjvl") diff --git a/_Assets/Textures/background-placeholder.jpg b/_Assets/Textures/background-placeholder.jpg new file mode 100644 index 0000000..520146a Binary files /dev/null and b/_Assets/Textures/background-placeholder.jpg differ diff --git a/_Assets/Textures/background-placeholder.jpg.import b/_Assets/Textures/background-placeholder.jpg.import new file mode 100644 index 0000000..beb8edc --- /dev/null +++ b/_Assets/Textures/background-placeholder.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfvv520hv5lss" +path="res://.godot/imported/background-placeholder.jpg-06c92c099a6e621a47176e83b0f7af77.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://_Assets/Textures/background-placeholder.jpg" +dest_files=["res://.godot/imported/background-placeholder.jpg-06c92c099a6e621a47176e83b0f7af77.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