diff --git a/2d_lights_and_shadows_neutral_point_light.webp b/2d_lights_and_shadows_neutral_point_light.webp new file mode 100644 index 00000000..e71af9f1 Binary files /dev/null and b/2d_lights_and_shadows_neutral_point_light.webp differ diff --git a/2d_lights_and_shadows_neutral_point_light.webp.import b/2d_lights_and_shadows_neutral_point_light.webp.import new file mode 100644 index 00000000..a65bf9d5 --- /dev/null +++ b/2d_lights_and_shadows_neutral_point_light.webp.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://iqbqsiyjd3uq" +path="res://.godot/imported/2d_lights_and_shadows_neutral_point_light.webp-65502514064ef8af4bce05336c6482e4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://2d_lights_and_shadows_neutral_point_light.webp" +dest_files=["res://.godot/imported/2d_lights_and_shadows_neutral_point_light.webp-65502514064ef8af4bce05336c6482e4.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/Globals/BGAudioPlayer.tscn b/Globals/BGAudioPlayer.tscn new file mode 100644 index 00000000..932b5464 --- /dev/null +++ b/Globals/BGAudioPlayer.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://csx04jwaoo20u"] + +[ext_resource type="Script" path="res://Globals/BgAudioPlayer.cs" id="1_w7def"] + +[node name="BgAudioPlayer" type="AudioStreamPlayer"] +script = ExtResource("1_w7def") diff --git a/Globals/BgAudioPlayer.cs b/Globals/BgAudioPlayer.cs new file mode 100644 index 00000000..95fae32a --- /dev/null +++ b/Globals/BgAudioPlayer.cs @@ -0,0 +1,30 @@ +using Godot; + +public partial class BgAudioPlayer : AudioStreamPlayer +{ + private readonly AudioStream _levelMusic = (AudioStream) + ResourceLoader.Load("res://scenes/SceneTransitions/assets/titleSong.ogg"); + + private void PlayMusic(AudioStream music, float volume) + { + if (Playing && music.Equals(Stream)) + { + return; + } + + Stream = music; + VolumeDb = volume; + Play(); + } + + public void PlayLevelMusic(float volume = -10f) + { + PlayMusic(_levelMusic, volume); + } + + public void StopMusic() + { + Stop(); + Stream = null; + } +} diff --git a/README.md b/README.md index e0db8abf..30ae89c6 100644 --- a/README.md +++ b/README.md @@ -16,5 +16,9 @@ Current team members include: #### Attributions: -First Song: gameMusic by Magntron - freesound.org -Input buttons by Nicolae (Xelu) Berbece +Music: +- Title Screen: [Crystal Cave - Cynicmusic](https://opengameart.org/content/crystal-cave-song18) +- Battle Song 1: [gameMusic - Magntron](https://freesound.org/people/Magntron/sounds/335571/) + +Images: +- Input Buttons: [inputKeys - Nicolae (Xelu) Berbece](https://thoseawesomeguys.com/prompts/) diff --git a/project.godot b/project.godot index d006a59c..d98a7e8c 100644 --- a/project.godot +++ b/project.godot @@ -20,6 +20,7 @@ config/icon="res://scenes/BattleDirector/assets/Character1.png" TimeKeeper="*res://Globals/TimeKeeper.cs" Scribe="*res://Globals/Scribe.cs" StageProducer="*res://Globals/StageProducer.cs" +BgAudioPlayer="*res://Globals/BGAudioPlayer.tscn" [display] diff --git a/scenes/Maps/scripts/Cartographer.cs b/scenes/Maps/scripts/Cartographer.cs index 10d72539..e2188e8c 100644 --- a/scenes/Maps/scripts/Cartographer.cs +++ b/scenes/Maps/scripts/Cartographer.cs @@ -13,6 +13,8 @@ public partial class Cartographer : Node2D [Export] private Button _focusedButton = null; + private BgAudioPlayer _bgPlayer; + public override void _Ready() { DrawMap(); @@ -23,6 +25,13 @@ public override void _Ready() } } + public override void _EnterTree() + { + GD.Print("[DEBUG] TitleScreen entered the tree"); + _bgPlayer = GetNode("/root/BgAudioPlayer"); + _bgPlayer.PlayLevelMusic(); + } + public override void _Process(double delta) { if (!GetTree().Paused && !_validButtons.Contains(GetViewport().GuiGetFocusOwner())) @@ -125,7 +134,10 @@ private void EnterStage(int roomIdx, Button button) .TweenProperty(PlayerSprite, "position", button.Position + button.Size * .5f, 1f); tween.SetTrans(Tween.TransitionType.Back).SetEase(Tween.EaseType.InOut); tween.Finished += () => + { + _bgPlayer.StopMusic(); GetNode("/root/StageProducer").TransitionFromRoom(roomIdx); + }; } private void WinStage() diff --git a/scenes/Puppets/scripts/PuppetTemplate.cs b/scenes/Puppets/scripts/PuppetTemplate.cs index 32c9c476..4ea7ba96 100644 --- a/scenes/Puppets/scripts/PuppetTemplate.cs +++ b/scenes/Puppets/scripts/PuppetTemplate.cs @@ -21,6 +21,9 @@ public partial class PuppetTemplate : Node2D [Export] public Vector2 InitScale = Vector2.One; + [Export] + public bool hideHealth = false; + protected int _maxHealth = 100; protected int _currentHealth = 100; @@ -33,6 +36,11 @@ public override void _Ready() _healthBar.SetHealth(_maxHealth, _currentHealth); Position = StartPos; Sprite.Scale = InitScale; + + if (hideHealth) + { + _healthBar.Hide(); + } } public void Init(Texture2D texture, string name) diff --git a/scenes/SceneTransitions/TitleScreen.tscn b/scenes/SceneTransitions/TitleScreen.tscn index 4e5e6bc1..ac6aaff1 100644 --- a/scenes/SceneTransitions/TitleScreen.tscn +++ b/scenes/SceneTransitions/TitleScreen.tscn @@ -1,10 +1,49 @@ -[gd_scene load_steps=4 format=3 uid="uid://bm41yti6ij2j"] +[gd_scene load_steps=21 format=3 uid="uid://bm41yti6ij2j"] [ext_resource type="Texture2D" uid="uid://b0tvsewgnf2x7" path="res://icon.svg" id="1_r5xy8"] +[ext_resource type="Script" path="res://scenes/SceneTransitions/scripts/TitleScreen.cs" id="1_r22ha"] +[ext_resource type="Texture2D" uid="uid://ruxgynq6bc1m" path="res://scenes/SceneTransitions/assets/background.png" id="1_txix1"] +[ext_resource type="Texture2D" uid="uid://de2j543j83hmh" path="res://scenes/SceneTransitions/assets/backTree.png" id="2_4luva"] [ext_resource type="Script" path="res://scenes/SceneTransitions/scripts/SceneChange.cs" id="2_7f3m6"] [ext_resource type="Texture2D" uid="uid://b6fkei0i83vte" path="res://scenes/BattleDirector/assets/Character1.png" id="2_cf582"] - -[node name="Title" type="Control"] +[ext_resource type="Texture2D" uid="uid://iqbqsiyjd3uq" path="res://2d_lights_and_shadows_neutral_point_light.webp" id="2_kw6qk"] +[ext_resource type="Texture2D" uid="uid://dat1eoyl3do4e" path="res://scenes/SceneTransitions/assets/frontTree.png" id="3_hvvt6"] +[ext_resource type="Texture2D" uid="uid://d3rxic3mi8jwb" path="res://scenes/SceneTransitions/assets/midTree.png" id="4_ui8kj"] +[ext_resource type="Texture2D" uid="uid://bj8dxrlwuwrv4" path="res://scenes/SceneTransitions/assets/moon.png" id="5_squvs"] +[ext_resource type="Shader" path="res://scenes/SceneTransitions/assets/transparentStars.gdshader" id="5_x5dhk"] +[ext_resource type="FontFile" uid="uid://dlwfb7kb7pd76" path="res://scenes/SceneTransitions/assets/font.TTF" id="8_gkfev"] +[ext_resource type="Texture2D" uid="uid://hfxynr5jdgsp" path="res://scenes/NoteManager/assets/new_arrow.png" id="10_4hnj8"] +[ext_resource type="Shader" path="res://scenes/SceneTransitions/assets/TitleFont.gdshader" id="11_ht0dv"] +[ext_resource type="PackedScene" uid="uid://bi5iqbwpsd381" path="res://scenes/Puppets/Enemies/BossBlood/Boss1.tscn" id="12_lng3a"] +[ext_resource type="PackedScene" uid="uid://uvlux4t6h5de" path="res://scenes/Puppets/Enemies/Parasifly/Parasifly.tscn" id="13_j3xa4"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_xhbhh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_cbpjr"] +shader = ExtResource("5_x5dhk") +shader_parameter/time_scale = 0.24 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_4cy5c"] +shader = ExtResource("11_ht0dv") +shader_parameter/height = 10.0 +shader_parameter/speed = 2.0 +shader_parameter/freq = 10.0 +shader_parameter/bg_top_color = null +shader_parameter/bg_bottom_color = null +shader_parameter/gradient_ratio = 0.0 +shader_parameter/time_scale = null + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_4croe"] +particle_flag_disable_z = true +emission_shape = 3 +emission_box_extents = Vector3(2.4, 5, 1) +gravity = Vector3(-180, 0, 0) +hue_variation_min = -1.0 +hue_variation_max = 1.0 +turbulence_enabled = true + +[node name="Title" type="Control" node_paths=PackedStringArray("TextLight")] +modulate = Color(0.355314, 0.355314, 0.355314, 1) layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -13,6 +52,69 @@ grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 +script = ExtResource("1_r22ha") +TextLight = NodePath("TextLight") + +[node name="MoonLight" type="PointLight2D" parent="."] +position = Vector2(363, 37) +energy = 2.0 +texture = ExtResource("2_kw6qk") +texture_scale = 3.0 + +[node name="TextLight" type="PointLight2D" parent="."] +position = Vector2(320, 100) +scale = Vector2(6, 2) +color = Color(0.560784, 0, 1, 1) +energy = 2.0 +range_item_cull_mask = 3 +texture = ExtResource("2_kw6qk") +texture_scale = 0.5 + +[node name="Background" type="Node2D" parent="."] +position = Vector2(-38, -31) +scale = Vector2(2.2, 2.2) + +[node name="Art" type="Node2D" parent="Background"] + +[node name="Background" type="Sprite2D" parent="Background/Art"] +z_index = -2 +position = Vector2(314, 91) +texture = ExtResource("1_txix1") + +[node name="BackTree" type="Sprite2D" parent="Background/Art"] +position = Vector2(314, 91) +texture = ExtResource("2_4luva") + +[node name="FrontTree" type="Sprite2D" parent="Background/Art"] +z_index = 1 +material = SubResource("ShaderMaterial_xhbhh") +position = Vector2(314, 91) +texture = ExtResource("3_hvvt6") + +[node name="MidTree" type="Sprite2D" parent="Background/Art"] +position = Vector2(314, 91) +texture = ExtResource("4_ui8kj") + +[node name="Moon" type="Sprite2D" parent="Background/Art"] +position = Vector2(314, 91) +texture = ExtResource("5_squvs") + +[node name="Rabb" type="Sprite2D" parent="Background"] +visible = false +z_index = 2 +position = Vector2(162.727, 114.091) +texture = ExtResource("2_cf582") + +[node name="StarShader" type="ColorRect" parent="."] +z_index = -1 +material = SubResource("ShaderMaterial_cbpjr") +layout_mode = 0 +offset_left = -223.0 +offset_top = -200.0 +offset_right = 252.0 +offset_bottom = -23.0 +scale = Vector2(3.78, 3.82) +color = Color(0, 0, 0, 1) [node name="SecretLabel" type="Label" parent="."] visible = false @@ -22,6 +124,7 @@ offset_bottom = 23.0 text = "(Control nodes are fucking weird weird.)" [node name="VBoxContainer" type="VBoxContainer" parent="."] +z_index = 4 layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -41,14 +144,23 @@ layout_mode = 2 layout_mode = 2 [node name="Godot" type="Sprite2D" parent="VBoxContainer/MarginContainer/Control/Control"] +visible = false texture = ExtResource("1_r5xy8") -[node name="Rabb" type="Sprite2D" parent="VBoxContainer/MarginContainer/Control/Control"] -texture = ExtResource("2_cf582") - -[node name="Label" type="Label" parent="VBoxContainer/MarginContainer/Control"] +[node name="Title" type="Label" parent="VBoxContainer/MarginContainer/Control"] +light_mask = 2 +z_index = 10 +material = SubResource("ShaderMaterial_4cy5c") layout_mode = 2 -text = "Insert Title Screen Here" +theme_override_colors/font_shadow_color = Color(0, 0, 0, 1) +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) +theme_override_constants/shadow_offset_x = 4 +theme_override_constants/shadow_offset_y = 5 +theme_override_fonts/font = ExtResource("8_gkfev") +theme_override_font_sizes/font_size = 55 +text = "Midnight Riff" +horizontal_alignment = 1 +vertical_alignment = 1 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] layout_mode = 2 @@ -110,3 +222,25 @@ layout_mode = 2 text = "Change Controls" script = ExtResource("2_7f3m6") ScenePath = 6 + +[node name="EnemPuppet" parent="." instance=ExtResource("12_lng3a")] +visible = false +position = Vector2(37, 186) +StartPos = Vector2(40, 150) +InitScale = Vector2(1, 1) +hideHealth = true + +[node name="EnemPuppet2" parent="." instance=ExtResource("13_j3xa4")] +visible = false +position = Vector2(572, 167) +StartPos = Vector2(572, 167) +hideHealth = true + +[node name="GPUParticles2D" type="GPUParticles2D" parent="."] +z_index = -1 +z_as_relative = false +position = Vector2(643, 154) +process_material = SubResource("ParticleProcessMaterial_4croe") +texture = ExtResource("10_4hnj8") +lifetime = 15.0 +randomness = 1.0 diff --git a/scenes/SceneTransitions/assets/TitleFont.gdshader b/scenes/SceneTransitions/assets/TitleFont.gdshader new file mode 100644 index 00000000..338546fb --- /dev/null +++ b/scenes/SceneTransitions/assets/TitleFont.gdshader @@ -0,0 +1,51 @@ +shader_type canvas_item; + +uniform float height = 5.0; +uniform float speed = 5.0f; +uniform float freq = 10.0f; + +uniform vec3 bg_top_color; +uniform vec3 bg_bottom_color; +uniform float gradient_ratio; +uniform float time_scale; + +float rand(vec2 st) { + return fract(sin(dot(st.xy, vec2(12.9898,78.233))) * 43758.5453123); +} + +void vertex() { + // Called for every vertex the material is visible on. + VERTEX.y -= height * sin((TIME * speed) + (freq * UV.x)); +} + +void fragment() { + + float color = 0.0f; + + if (COLOR.rgb == vec3(1)){ + if (rand(SCREEN_UV.xy / 20.0) > 0.996){ + COLOR.rbg = vec3(1); + }else { + vec3 gradient = mix(bg_top_color, bg_bottom_color, SCREEN_UV.y / gradient_ratio); + COLOR.rgb = gradient; + } + /* + if (rand(SCREEN_UV.xy / 20.0) > 0.996) + { + float r = rand(SCREEN_UV.xy); + color = r * (0.85 * sin((TIME * time_scale) * (r * 5.0) + 720.0 * r) + 0.95); + } + + vec4 gradient_color = mix(bg_top_color, bg_bottom_color, SCREEN_UV.y / gradient_ratio); + COLOR = vec4(vec3(color),1.0) + gradient_color; + */ + + + } + // Called for every pixel the material is visible on. +} + +//void light() { + // Called for every pixel for every light affecting the CanvasItem. + // Uncomment to replace the default light processing function with this one. +//} diff --git a/scenes/SceneTransitions/assets/backTree.png b/scenes/SceneTransitions/assets/backTree.png new file mode 100644 index 00000000..3e3685e2 Binary files /dev/null and b/scenes/SceneTransitions/assets/backTree.png differ diff --git a/scenes/SceneTransitions/assets/backTree.png.import b/scenes/SceneTransitions/assets/backTree.png.import new file mode 100644 index 00000000..e3af798a --- /dev/null +++ b/scenes/SceneTransitions/assets/backTree.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://de2j543j83hmh" +path="res://.godot/imported/backTree.png-cd101cfcfd1c146ab0ea88e585106ef0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/SceneTransitions/assets/backTree.png" +dest_files=["res://.godot/imported/backTree.png-cd101cfcfd1c146ab0ea88e585106ef0.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/scenes/SceneTransitions/assets/background.png b/scenes/SceneTransitions/assets/background.png new file mode 100644 index 00000000..283c35cc Binary files /dev/null and b/scenes/SceneTransitions/assets/background.png differ diff --git a/scenes/SceneTransitions/assets/background.png.import b/scenes/SceneTransitions/assets/background.png.import new file mode 100644 index 00000000..11c12897 --- /dev/null +++ b/scenes/SceneTransitions/assets/background.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ruxgynq6bc1m" +path="res://.godot/imported/background.png-a073667c4584bab9ff61632bc4578b1d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/SceneTransitions/assets/background.png" +dest_files=["res://.godot/imported/background.png-a073667c4584bab9ff61632bc4578b1d.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/scenes/SceneTransitions/assets/font.TTF b/scenes/SceneTransitions/assets/font.TTF new file mode 100644 index 00000000..4b93740c Binary files /dev/null and b/scenes/SceneTransitions/assets/font.TTF differ diff --git a/scenes/SceneTransitions/assets/font.TTF.import b/scenes/SceneTransitions/assets/font.TTF.import new file mode 100644 index 00000000..bb476e0a --- /dev/null +++ b/scenes/SceneTransitions/assets/font.TTF.import @@ -0,0 +1,40 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dlwfb7kb7pd76" +path="res://.godot/imported/font.TTF-d7f862dc1f5e4b5cfedf614b37a87c94.fontdata" + +[deps] + +source_file="res://scenes/SceneTransitions/assets/font.TTF" +dest_files=["res://.godot/imported/font.TTF-d7f862dc1f5e4b5cfedf614b37a87c94.fontdata"] + +[params] + +Rendering=null +antialiasing=0 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=0 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[{ +"chars": [], +"glyphs": [], +"name": "New Configuration", +"size": Vector2i(16, 0), +"variation_embolden": 0.0 +}] +language_support={} +script_support={} +opentype_features={} diff --git a/scenes/SceneTransitions/assets/frontTree.png b/scenes/SceneTransitions/assets/frontTree.png new file mode 100644 index 00000000..933abdf2 Binary files /dev/null and b/scenes/SceneTransitions/assets/frontTree.png differ diff --git a/scenes/SceneTransitions/assets/frontTree.png.import b/scenes/SceneTransitions/assets/frontTree.png.import new file mode 100644 index 00000000..9cc04921 --- /dev/null +++ b/scenes/SceneTransitions/assets/frontTree.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dat1eoyl3do4e" +path="res://.godot/imported/frontTree.png-663f1ab9e520c56ea3ffdb26bdcb9d48.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/SceneTransitions/assets/frontTree.png" +dest_files=["res://.godot/imported/frontTree.png-663f1ab9e520c56ea3ffdb26bdcb9d48.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/scenes/SceneTransitions/assets/midTree.png b/scenes/SceneTransitions/assets/midTree.png new file mode 100644 index 00000000..e5ec467b Binary files /dev/null and b/scenes/SceneTransitions/assets/midTree.png differ diff --git a/scenes/SceneTransitions/assets/midTree.png.import b/scenes/SceneTransitions/assets/midTree.png.import new file mode 100644 index 00000000..f7a39eb3 --- /dev/null +++ b/scenes/SceneTransitions/assets/midTree.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3rxic3mi8jwb" +path="res://.godot/imported/midTree.png-0e1d74935bdde1388be14d3c45e05784.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/SceneTransitions/assets/midTree.png" +dest_files=["res://.godot/imported/midTree.png-0e1d74935bdde1388be14d3c45e05784.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/scenes/SceneTransitions/assets/moon.png b/scenes/SceneTransitions/assets/moon.png new file mode 100644 index 00000000..713f64db Binary files /dev/null and b/scenes/SceneTransitions/assets/moon.png differ diff --git a/scenes/SceneTransitions/assets/moon.png.import b/scenes/SceneTransitions/assets/moon.png.import new file mode 100644 index 00000000..7c1fbdca --- /dev/null +++ b/scenes/SceneTransitions/assets/moon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bj8dxrlwuwrv4" +path="res://.godot/imported/moon.png-ae76e6a309e1cf0426fcf886212d383f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/SceneTransitions/assets/moon.png" +dest_files=["res://.godot/imported/moon.png-ae76e6a309e1cf0426fcf886212d383f.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/scenes/SceneTransitions/assets/titleSong.ogg b/scenes/SceneTransitions/assets/titleSong.ogg new file mode 100644 index 00000000..5a8cda99 Binary files /dev/null and b/scenes/SceneTransitions/assets/titleSong.ogg differ diff --git a/scenes/SceneTransitions/assets/titleSong.ogg.import b/scenes/SceneTransitions/assets/titleSong.ogg.import new file mode 100644 index 00000000..0c631fc5 --- /dev/null +++ b/scenes/SceneTransitions/assets/titleSong.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://b52r6rgf4qsdr" +path="res://.godot/imported/titleSong.ogg-9b2a968ab90fbc0d5b93d6100fb323d4.oggvorbisstr" + +[deps] + +source_file="res://scenes/SceneTransitions/assets/titleSong.ogg" +dest_files=["res://.godot/imported/titleSong.ogg-9b2a968ab90fbc0d5b93d6100fb323d4.oggvorbisstr"] + +[params] + +loop=true +loop_offset=0.0 +bpm=0.0 +beat_count=0 +bar_beats=4 diff --git a/scenes/SceneTransitions/assets/transparentStars.gdshader b/scenes/SceneTransitions/assets/transparentStars.gdshader new file mode 100644 index 00000000..d3ad0aff --- /dev/null +++ b/scenes/SceneTransitions/assets/transparentStars.gdshader @@ -0,0 +1,20 @@ +shader_type canvas_item; + +uniform float time_scale; + +float rand(vec2 st) { + return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123); +} + +void fragment() { + float star_intensity = 0.0; + float alpha = 0.0; + + if (rand(SCREEN_UV.xy / 20.0) > 0.996) { + float r = rand(SCREEN_UV.xy); + star_intensity = r * (0.85 * sin((TIME * time_scale) * (r * 5.0) + 720.0 * r) + 0.95); + alpha = star_intensity; + } + + COLOR = vec4(vec3(star_intensity), alpha); +} diff --git a/scenes/SceneTransitions/scripts/TitleScreen.cs b/scenes/SceneTransitions/scripts/TitleScreen.cs new file mode 100644 index 00000000..a9b1e91a --- /dev/null +++ b/scenes/SceneTransitions/scripts/TitleScreen.cs @@ -0,0 +1,28 @@ +using System; +using Godot; + +public partial class TitleScreen : Control +{ + [Export] + public PointLight2D TextLight; + + public override void _Ready() + { + TweenLight(); + } + + private void TweenLight() + { + var tween = CreateTween(); + tween.SetTrans(Tween.TransitionType.Linear); + tween.TweenProperty(TextLight, "energy", 7, 5f); + tween.TweenProperty(TextLight, "energy", 2, 5f); + tween.SetLoops(-1); + tween.Play(); + } + + public override void _EnterTree() + { + GetNode("/root/BgAudioPlayer").PlayLevelMusic(); + } +}