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;
}
}
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ Current team members include:


#### Attributions:
First Song: <a href="https://freesound.org/people/Magntron/sounds/335571/" title="gameMusic">gameMusic by Magntron - freesound.org</a>
Input buttons by <a href="https://thoseawesomeguys.com/prompts/" title="inputkeys">Nicolae (Xelu) Berbece</a>
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/)
1 change: 1 addition & 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
12 changes: 12 additions & 0 deletions scenes/Maps/scripts/Cartographer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public partial class Cartographer : Node2D
[Export]
private Button _focusedButton = null;

private BgAudioPlayer _bgPlayer;

public override void _Ready()
{
DrawMap();
Expand All @@ -23,6 +25,13 @@ public override void _Ready()
}
}

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 @@ -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<StageProducer>("/root/StageProducer").TransitionFromRoom(roomIdx);
};
}

private void WinStage()
Expand Down
8 changes: 8 additions & 0 deletions scenes/Puppets/scripts/PuppetTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
Expand Down
150 changes: 142 additions & 8 deletions scenes/SceneTransitions/TitleScreen.tscn
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
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.
//}
Binary file added scenes/SceneTransitions/assets/backTree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading