Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 2d_lights_and_shadows_neutral_point_light.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 2d_lights_and_shadows_neutral_point_light.webp.import
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions Globals/BGAudioPlayer.tscn
Original file line number Diff line number Diff line change
@@ -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")
30 changes: 30 additions & 0 deletions Globals/BgAudioPlayer.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}
6 changes: 6 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -80,6 +81,11 @@ Inventory={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null)
]
}
Secondary={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}

[rendering]

Expand Down
12 changes: 12 additions & 0 deletions scenes/Maps/scripts/Cartographer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ public partial class Cartographer : Node2D
[Export]
private Button _focusedButton = null;

private BgAudioPlayer _bgPlayer;

public override void _Ready()
{
DrawMap();
GetViewport().GuiFocusChanged += UpdateFocus;
}

public override void _EnterTree()
{
GD.Print("[DEBUG] TitleScreen entered the tree");
_bgPlayer = GetNode<BgAudioPlayer>("/root/BgAudioPlayer");
_bgPlayer.PlayLevelMusic();
}

public override void _Process(double delta)
{
if (!GetTree().Paused && !_validButtons.Contains(GetViewport().GuiGetFocusOwner()))
Expand Down Expand Up @@ -121,6 +130,9 @@ 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<StageProducer>("/root/StageProducer").TransitionFromRoom(roomIdx);
};
}
}
62 changes: 50 additions & 12 deletions scenes/SceneTransitions/TitleScreen.tscn
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
[gd_scene load_steps=17 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"]
[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="AudioStream" uid="uid://co61cvxxakdjs" path="res://scenes/SceneTransitions/assets/song18.mp3" id="11_t7vbg"]
[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
Expand All @@ -28,7 +42,8 @@ hue_variation_min = -1.0
hue_variation_max = 1.0
turbulence_enabled = true

[node name="Title" type="Control"]
[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
Expand All @@ -37,6 +52,23 @@ 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)
Expand All @@ -55,6 +87,7 @@ 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")

Expand All @@ -67,14 +100,15 @@ 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)
scale = Vector2(1, 1)
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
Expand Down Expand Up @@ -113,14 +147,20 @@ layout_mode = 2
visible = false
texture = ExtResource("1_r5xy8")

[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
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/outline_size = 13
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 = 57
text = "Funk Engine"
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
Expand Down Expand Up @@ -183,17 +223,15 @@ text = "Change Controls"
script = ExtResource("2_7f3m6")
ScenePath = 6

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_t7vbg")
autoplay = true

[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
Expand Down
51 changes: 51 additions & 0 deletions scenes/SceneTransitions/assets/TitleFont.gdshader
Original file line number Diff line number Diff line change
@@ -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.
//}
7 changes: 4 additions & 3 deletions scenes/SceneTransitions/assets/font.TTF.import
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dest_files=["res://.godot/imported/font.TTF-d7f862dc1f5e4b5cfedf614b37a87c94.fon
[params]

Rendering=null
antialiasing=1
antialiasing=0
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
Expand All @@ -22,7 +22,7 @@ msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=1
subpixel_positioning=0
oversampling=0.0
Fallbacks=null
fallbacks=[]
Expand All @@ -32,7 +32,8 @@ preload=[{
"chars": [],
"glyphs": [],
"name": "New Configuration",
"size": Vector2i(16, 0)
"size": Vector2i(16, 0),
"variation_embolden": 0.0
}]
language_support={}
script_support={}
Expand Down
Binary file removed scenes/SceneTransitions/assets/song18.mp3
Binary file not shown.
19 changes: 0 additions & 19 deletions scenes/SceneTransitions/assets/song18.mp3.import

This file was deleted.

Binary file added scenes/SceneTransitions/assets/titleSong.ogg
Binary file not shown.
19 changes: 19 additions & 0 deletions scenes/SceneTransitions/assets/titleSong.ogg.import
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading