3 Commits

Author SHA1 Message Date
cfe154e754 fix: sound tweaks
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 8s
Create tag and build when new code gets to main / Export (push) Successful in 2m31s
2025-08-03 15:27:43 +02:00
8775e17258 feat:ambiance
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Successful in 2m42s
2025-08-03 14:43:49 +02:00
49ede4a46b feat: sound integration
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 8s
Create tag and build when new code gets to main / Export (push) Successful in 2m17s
2025-08-03 12:41:19 +02:00
26 changed files with 504 additions and 31 deletions

View File

@ -2,6 +2,7 @@ extends RigidBody2D
@onready var area_2d: Area2D = $Area2D @onready var area_2d: Area2D = $Area2D
@onready var kill_after: Timer = $KillAfter @onready var kill_after: Timer = $KillAfter
@onready var kill_audio: AudioStreamPlayer2D = $KillAudio
@export var speed = 100 @export var speed = 100
@export var rotation_speed = 1 @export var rotation_speed = 1
@ -33,4 +34,5 @@ func _on_kill_after_timeout() -> void:
func _on_body_entered(body: Node) -> void: func _on_body_entered(body: Node) -> void:
is_moving = false is_moving = false
kill_audio.play()
kill_after.start() kill_after.start()

View File

@ -1,8 +1,11 @@
[gd_scene load_steps=6 format=3 uid="uid://4bfkbcr7v8tj"] [gd_scene load_steps=10 format=3 uid="uid://4bfkbcr7v8tj"]
[ext_resource type="Script" uid="uid://127t4dvlp6tv" path="res://arrow/arrow.gd" id="1_d2qln"] [ext_resource type="Script" uid="uid://127t4dvlp6tv" path="res://arrow/arrow.gd" id="1_d2qln"]
[ext_resource type="Script" uid="uid://dt2lsk3je41th" path="res://damageable/hitbox.gd" id="2_d2qln"] [ext_resource type="Script" uid="uid://dt2lsk3je41th" path="res://damageable/hitbox.gd" id="2_d2qln"]
[ext_resource type="Texture2D" uid="uid://lhq6h8f81qrr" path="res://player/assets/Fleche.png" id="2_ofxgm"] [ext_resource type="Texture2D" uid="uid://lhq6h8f81qrr" path="res://player/assets/Fleche.png" id="2_ofxgm"]
[ext_resource type="AudioStream" uid="uid://ca5ip2v4sbw8r" path="res://world_assets/audio/384912__ali_6868__arrow-impact-3.wav" id="4_lo0oj"]
[ext_resource type="AudioStream" uid="uid://cl171ph84g5t2" path="res://world_assets/audio/384913__ali_6868__arrow-impact-2.wav" id="5_nl01e"]
[ext_resource type="AudioStream" uid="uid://ejdkgkgh1arq" path="res://world_assets/audio/384914__ali_6868__arrow-impact-1.wav" id="6_e3mw3"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d2qln"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_d2qln"]
size = Vector2(2, 2) size = Vector2(2, 2)
@ -10,6 +13,12 @@ size = Vector2(2, 2)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yaehf"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_yaehf"]
size = Vector2(12, 5) size = Vector2(12, 5)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_l8mgh"]
streams_count = 3
stream_0/stream = ExtResource("4_lo0oj")
stream_1/stream = ExtResource("5_nl01e")
stream_2/stream = ExtResource("6_e3mw3")
[node name="Arrow" type="RigidBody2D"] [node name="Arrow" type="RigidBody2D"]
collision_layer = 0 collision_layer = 0
collision_mask = 0 collision_mask = 0
@ -42,6 +51,11 @@ wait_time = 3.0
one_shot = true one_shot = true
ignore_time_scale = true ignore_time_scale = true
[node name="KillAudio" type="AudioStreamPlayer2D" parent="."]
stream = SubResource("AudioStreamRandomizer_l8mgh")
max_distance = 100.0
bus = &"SFX"
[connection signal="body_entered" from="." to="." method="_on_body_entered"] [connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"] [connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"]
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"] [connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]

View File

@ -6,8 +6,8 @@ class_name Damageable
var active = true var active = true
signal got_hit
signal die signal die
signal got_hit
func set_active(new_active: bool): func set_active(new_active: bool):
active = new_active active = new_active
@ -16,9 +16,9 @@ func damage(value: int = 0, direction: Vector2 = Vector2.UP):
if not active: if not active:
return return
got_hit.emit()
if hitback_velocity > 0: if hitback_velocity > 0:
get_parent().velocity = hitback_velocity * direction get_parent().velocity = hitback_velocity * direction
got_hit.emit()
health -= value health -= value
if health <= 0: if health <= 0:

View File

@ -5,17 +5,41 @@ bus/1/name = &"SFX"
bus/1/solo = false bus/1/solo = false
bus/1/mute = false bus/1/mute = false
bus/1/bypass_fx = false bus/1/bypass_fx = false
bus/1/volume_db = -3.32682 bus/1/volume_db = -12.4611
bus/1/send = &"Master" bus/1/send = &"Master"
bus/2/name = &"Ambiance" bus/2/name = &"Ambiance"
bus/2/solo = false bus/2/solo = false
bus/2/mute = false bus/2/mute = false
bus/2/bypass_fx = false bus/2/bypass_fx = false
bus/2/volume_db = -10.9863 bus/2/volume_db = -16.4004
bus/2/send = &"Master" bus/2/send = &"Master"
bus/3/name = &"Music" bus/3/name = &"Music"
bus/3/solo = false bus/3/solo = false
bus/3/mute = false bus/3/mute = false
bus/3/bypass_fx = false bus/3/bypass_fx = false
bus/3/volume_db = -6.25101 bus/3/volume_db = -16.4004
bus/3/send = &"Master" bus/3/send = &"Master"
bus/4/name = &"Gearup"
bus/4/solo = false
bus/4/mute = false
bus/4/bypass_fx = false
bus/4/volume_db = -6.25101
bus/4/send = &"Master"
bus/5/name = &"Steps"
bus/5/solo = false
bus/5/mute = false
bus/5/bypass_fx = false
bus/5/volume_db = -23.3524
bus/5/send = &"Master"
bus/6/name = &"Dialogue"
bus/6/solo = false
bus/6/mute = false
bus/6/bypass_fx = false
bus/6/volume_db = -10.9863
bus/6/send = &"Master"
bus/7/name = &"BadGuy"
bus/7/solo = false
bus/7/mute = false
bus/7/bypass_fx = false
bus/7/volume_db = -0.526013
bus/7/send = &"Master"

View File

@ -17,6 +17,7 @@ extends Node
@export var start_with_left = false @export var start_with_left = false
@export var left_picture: Texture2D @export var left_picture: Texture2D
@export var right_picture: Texture2D @export var right_picture: Texture2D
@onready var dialogue_player: AudioStreamPlayer = $DialoguePlayer
signal dialogue_ended signal dialogue_ended
@ -96,7 +97,8 @@ func _on_next_letter() -> void:
ui_flicker_timer.stop() ui_flicker_timer.stop()
e_ui_button.visible = false e_ui_button.visible = false
next_label.visible = false next_label.visible = false
dialogue_player.pitch_scale = randf_range(5, 6)
dialogue_player.play()
var next_letter = current_dialogue_split.get(0) var next_letter = current_dialogue_split.get(0)
current_dialogue_split.remove_at(0) current_dialogue_split.remove_at(0)
current_dialogue += next_letter current_dialogue += next_letter

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://bmng6wjt0paof"] [gd_scene load_steps=3 format=3 uid="uid://bmng6wjt0paof"]
[ext_resource type="Script" uid="uid://k2r3aatbbyie" path="res://dialogues/dialogue_manager.gd" id="1_6nn6f"] [ext_resource type="Script" uid="uid://k2r3aatbbyie" path="res://dialogues/dialogue_manager.gd" id="1_6nn6f"]
[ext_resource type="AudioStream" uid="uid://cx7g00rpjodv3" path="res://world_assets/audio/speech.wav" id="2_8cgcf"]
[node name="DialogueManager" type="Node"] [node name="DialogueManager" type="Node"]
script = ExtResource("1_6nn6f") script = ExtResource("1_6nn6f")
@ -13,5 +14,9 @@ ignore_time_scale = true
wait_time = 0.05 wait_time = 0.05
ignore_time_scale = true ignore_time_scale = true
[node name="DialoguePlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_8cgcf")
bus = &"Dialogue"
[connection signal="timeout" from="UIFlickerTimer" to="." method="toggle_ui"] [connection signal="timeout" from="UIFlickerTimer" to="." method="toggle_ui"]
[connection signal="timeout" from="TimeBetweenLetters" to="." method="_on_next_letter"] [connection signal="timeout" from="TimeBetweenLetters" to="." method="_on_next_letter"]

View File

@ -87,7 +87,7 @@ one_shot = true
stream = ExtResource("5_iblih") stream = ExtResource("5_iblih")
autoplay = true autoplay = true
max_distance = 400.0 max_distance = 400.0
bus = &"SFX" bus = &"BadGuy"
[connection signal="body_entered" from="TriggerHit" to="." method="_on_trigger_hit_body_entered"] [connection signal="body_entered" from="TriggerHit" to="." method="_on_trigger_hit_body_entered"]
[connection signal="timeout" from="TimeToFinishHit" to="." method="_on_time_to_finish_hit_timeout"] [connection signal="timeout" from="TimeToFinishHit" to="." method="_on_time_to_finish_hit_timeout"]

View File

@ -5,6 +5,8 @@ extends AnimatedSprite2D
@onready var wait_to_die: Timer = $WaitToDie @onready var wait_to_die: Timer = $WaitToDie
@onready var hitting: Timer = $Hitting @onready var hitting: Timer = $Hitting
@onready var wait_to_hit: Timer = $WaitToHit @onready var wait_to_hit: Timer = $WaitToHit
@onready var die_audio: AudioStreamPlayer = $DieAudio
@onready var hitsound: AudioStreamPlayer = $Hit
var is_dying = false var is_dying = false
@ -18,6 +20,7 @@ func hit():
hitbox.monitorable = true hitbox.monitorable = true
hitbox.monitoring = true hitbox.monitoring = true
play("hit") play("hit")
hitsound.play()
hitting.start() hitting.start()
func stop_hitting(): func stop_hitting():
@ -37,6 +40,7 @@ func _on_damageable_die() -> void:
hitbox_2.set_deferred("monitoring", false) hitbox_2.set_deferred("monitoring", false)
is_dying = true is_dying = true
play("die") play("die")
die_audio.play()
wait_to_die.start() wait_to_die.start()
func _on_wait_to_die_timeout() -> void: func _on_wait_to_die_timeout() -> void:

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=67 format=3 uid="uid://b2fyaj2fmrug7"] [gd_scene load_steps=71 format=3 uid="uid://b2fyaj2fmrug7"]
[ext_resource type="Texture2D" uid="uid://din26pdtyka1n" path="res://ennemy/Skeleton/Sprite Sheets/Skeleton Hit.png" id="1_yndcr"] [ext_resource type="Texture2D" uid="uid://din26pdtyka1n" path="res://ennemy/Skeleton/Sprite Sheets/Skeleton Hit.png" id="1_yndcr"]
[ext_resource type="Texture2D" uid="uid://bpxn5oa3r3121" path="res://ennemy/Skeleton/Sprite Sheets/Skeleton Dead.png" id="2_sx7nw"] [ext_resource type="Texture2D" uid="uid://bpxn5oa3r3121" path="res://ennemy/Skeleton/Sprite Sheets/Skeleton Dead.png" id="2_sx7nw"]
@ -7,6 +7,9 @@
[ext_resource type="Script" uid="uid://bhbn4pngdfk7w" path="res://damageable/damageable.gd" id="5_oqxir"] [ext_resource type="Script" uid="uid://bhbn4pngdfk7w" path="res://damageable/damageable.gd" id="5_oqxir"]
[ext_resource type="Script" uid="uid://b0ewbthpfsy7t" path="res://ennemy/skeleton.gd" id="5_sx7nw"] [ext_resource type="Script" uid="uid://b0ewbthpfsy7t" path="res://ennemy/skeleton.gd" id="5_sx7nw"]
[ext_resource type="PackedScene" uid="uid://7sqwi3lygb1u" path="res://damageable/hitbox.tscn" id="6_kopbd"] [ext_resource type="PackedScene" uid="uid://7sqwi3lygb1u" path="res://damageable/hitbox.tscn" id="6_kopbd"]
[ext_resource type="AudioStream" uid="uid://cwnf4q8286apo" path="res://world_assets/audio/446013__slavicmagic__sword-hit.wav" id="8_whaqf"]
[ext_resource type="AudioStream" uid="uid://k3nqsuybwrlf" path="res://world_assets/audio/swordhit2.wav" id="9_oqxir"]
[ext_resource type="AudioStream" uid="uid://c4crs3etujcdo" path="res://world_assets/audio/swordhit.wav" id="10_kopbd"]
[sub_resource type="AtlasTexture" id="AtlasTexture_yvsr8"] [sub_resource type="AtlasTexture" id="AtlasTexture_yvsr8"]
atlas = ExtResource("1_yndcr") atlas = ExtResource("1_yndcr")
@ -434,6 +437,11 @@ radius = 6.08276
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kq58d"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_kq58d"]
size = Vector2(6, 21) size = Vector2(6, 21)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_qeio8"]
streams_count = 2
stream_0/stream = ExtResource("9_oqxir")
stream_1/stream = ExtResource("10_kopbd")
[node name="Skeleton" type="AnimatedSprite2D"] [node name="Skeleton" type="AnimatedSprite2D"]
sprite_frames = SubResource("SpriteFrames_getpj") sprite_frames = SubResource("SpriteFrames_getpj")
animation = &"die" animation = &"die"
@ -471,6 +479,13 @@ one_shot = true
[node name="WaitToHit" type="Timer" parent="."] [node name="WaitToHit" type="Timer" parent="."]
wait_time = 3.0 wait_time = 3.0
[node name="DieAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("8_whaqf")
bus = &"SFX"
[node name="Hit" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamRandomizer_qeio8")
[connection signal="die" from="Hitbox2/Damageable" to="." method="_on_damageable_die"] [connection signal="die" from="Hitbox2/Damageable" to="." method="_on_damageable_die"]
[connection signal="timeout" from="WaitToDie" to="." method="_on_wait_to_die_timeout"] [connection signal="timeout" from="WaitToDie" to="." method="_on_wait_to_die_timeout"]
[connection signal="timeout" from="Hitting" to="." method="stop_hitting"] [connection signal="timeout" from="Hitting" to="." method="stop_hitting"]

21
main.gd
View File

@ -25,6 +25,8 @@ var active_camera: SuperCamera
@onready var red_hood_cutscene: AnimationPlayer = $RedHoodCutscene @onready var red_hood_cutscene: AnimationPlayer = $RedHoodCutscene
@onready var final_cutscene: AnimationPlayer = $FinalCutscene @onready var final_cutscene: AnimationPlayer = $FinalCutscene
@onready var ambiance: AudioStreamPlayer = $Ambiance
var ambiance_stream: AudioStreamInteractive
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
@ -32,8 +34,9 @@ func _ready() -> void:
if is_instance_of(child, SuperCamera): if is_instance_of(child, SuperCamera):
child.became_active.connect(on_camera_became_active) child.became_active.connect(on_camera_became_active)
#opening_cutscene.play("opening_cutscene") ambiance.get_stream_playback().switch_to_clip_by_name("Start")
#opening_fade_to_black.visible = true opening_cutscene.play("opening_cutscene")
opening_fade_to_black.visible = true
func on_camera_became_active(camera: SuperCamera): func on_camera_became_active(camera: SuperCamera):
active_camera = camera active_camera = camera
@ -52,9 +55,11 @@ func _process(delta: float) -> void:
background_close.global_position.x = active_camera.global_position.x * parallax_close background_close.global_position.x = active_camera.global_position.x * parallax_close
# foreground_far.global_position.x = active_camera.global_position.x * foreground # foreground_far.global_position.x = active_camera.global_position.x * foreground
@onready var dance_music: AudioStreamPlayer = $DanceMusic
func _on_start_dancing() -> void: func _on_start_dancing() -> void:
dance_cutscene.play("dance") dance_cutscene.play("dance")
ambiance.stop()
func restart_at_first_scene(): func restart_at_first_scene():
get_tree().change_scene_to_file("res://main.tscn") get_tree().change_scene_to_file("res://main.tscn")
@ -80,3 +85,15 @@ func _on_final_armor_dialogue_ended() -> void:
func _on_final_cinematic_body_entered(body: Node2D) -> void: func _on_final_cinematic_body_entered(body: Node2D) -> void:
final_cutscene.play("cutscene") final_cutscene.play("cutscene")
func _on_balade_ambiance_body_entered(body: Node2D) -> void:
ambiance.get_stream_playback().switch_to_clip_by_name("Forest")
func _on_squelettes_ambiance_body_entered(body: Node2D) -> void:
ambiance.get_stream_playback().switch_to_clip_by_name("Squelettes")
func _on_cave_ambiance_body_entered(body: Node2D) -> void:
ambiance.get_stream_playback().switch_to_clip_by_name("Cave")

172
main.tscn
View File

@ -1,4 +1,4 @@
[gd_scene load_steps=118 format=4 uid="uid://s1cx1gvt4bed"] [gd_scene load_steps=128 format=4 uid="uid://s1cx1gvt4bed"]
[ext_resource type="Script" uid="uid://cvtt52wodbopm" path="res://main.gd" id="1_272bh"] [ext_resource type="Script" uid="uid://cvtt52wodbopm" path="res://main.gd" id="1_272bh"]
[ext_resource type="PackedScene" uid="uid://yvp44oauis4n" path="res://player/player.tscn" id="1_ig7tw"] [ext_resource type="PackedScene" uid="uid://yvp44oauis4n" path="res://player/player.tscn" id="1_ig7tw"]
@ -25,6 +25,13 @@
[ext_resource type="Texture2D" uid="uid://dut0ru3y8rung" path="res://ennemy/Flammes.png" id="18_d13ii"] [ext_resource type="Texture2D" uid="uid://dut0ru3y8rung" path="res://ennemy/Flammes.png" id="18_d13ii"]
[ext_resource type="AudioStream" uid="uid://c0w61do2a1hbc" path="res://ennemy/black-magic-159868.mp3" id="19_0odxb"] [ext_resource type="AudioStream" uid="uid://c0w61do2a1hbc" path="res://ennemy/black-magic-159868.mp3" id="19_0odxb"]
[ext_resource type="PackedScene" uid="uid://b2fyaj2fmrug7" path="res://ennemy/skeleton.tscn" id="19_d13ii"] [ext_resource type="PackedScene" uid="uid://b2fyaj2fmrug7" path="res://ennemy/skeleton.tscn" id="19_d13ii"]
[ext_resource type="AudioStream" uid="uid://dfmfve4c3l4fb" path="res://world_assets/audio/564024__gertraut_hecher__harp-arpeggio-medieval-tune.wav" id="26_xuqvo"]
[ext_resource type="AudioStream" uid="uid://cqqa1wa2qs8ib" path="res://world_assets/audio/575585_gertraut_hecher_medieval_life_minstrels_and_jugglers.wav" id="27_qsp4k"]
[ext_resource type="AudioStream" uid="uid://ohxncjlv12wy" path="res://world_assets/audio/787351__gertraut_hecher__medieval-dance-saltarello.wav" id="28_kq58d"]
[ext_resource type="AudioStream" uid="uid://d2vbc5xbu67no" path="res://world_assets/audio/ambiance/forestStart.wav" id="29_seu75"]
[ext_resource type="AudioStream" uid="uid://cp2acg3q53jia" path="res://world_assets/audio/ambiance/forestBalade.wav" id="30_htxhm"]
[ext_resource type="AudioStream" uid="uid://bsosrbr0tgg25" path="res://world_assets/audio/ambiance/squelettes.mp3" id="31_jq2sk"]
[ext_resource type="AudioStream" uid="uid://o8kcbs7gk61y" path="res://world_assets/audio/ambiance/cave.wav" id="32_htxhm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ycdy4"] [sub_resource type="AtlasTexture" id="AtlasTexture_ycdy4"]
atlas = ExtResource("3_dg77c") atlas = ExtResource("3_dg77c")
@ -847,6 +854,30 @@ tracks/0/keys = {
"update": 0, "update": 0,
"values": [Color(0, 0, 0, 0)] "values": [Color(0, 0, 0, 0)]
} }
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("DanceMusic:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("DanceMusic:volume_db")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_2cqfq"] [sub_resource type="Animation" id="Animation_2cqfq"]
resource_name = "dance" resource_name = "dance"
@ -961,6 +992,30 @@ tracks/7/keys = {
"method": &"play" "method": &"play"
}] }]
} }
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("DanceMusic:playing")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("DanceMusic:volume_db")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(0, 2.99, 6, 8),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [0.0, 0.0, 0.0, -80.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yaehf"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_yaehf"]
_data = { _data = {
@ -1208,6 +1263,74 @@ _data = {
&"flee": SubResource("Animation_wy5fy") &"flee": SubResource("Animation_wy5fy")
} }
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_seu75"]
streams_count = 3
stream_0/stream = ExtResource("26_xuqvo")
stream_1/stream = ExtResource("27_qsp4k")
stream_2/stream = ExtResource("28_kq58d")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_htxhm"]
size = Vector2(14, 33)
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_4k2k6"]
clip_count = 4
clip_0/name = &"Start"
clip_0/stream = ExtResource("29_seu75")
clip_0/auto_advance = 0
clip_1/name = &"Forest"
clip_1/stream = ExtResource("30_htxhm")
clip_1/auto_advance = 0
clip_2/name = &"Squelettes"
clip_2/stream = ExtResource("31_jq2sk")
clip_2/auto_advance = 0
clip_3/name = &"Cave"
clip_3/stream = ExtResource("32_htxhm")
clip_3/auto_advance = 0
_transitions = {
Vector2i(0, 0): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 0
},
Vector2i(0, 1): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 1
},
Vector2i(1, 1): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 0
},
Vector2i(1, 2): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 1
},
Vector2i(2, 2): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 0
},
Vector2i(2, 3): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 1
},
Vector2i(3, 3): {
"fade_beats": 1.0,
"fade_mode": 3,
"from_time": 0,
"to_time": 0
}
}
[node name="Main" type="Node2D"] [node name="Main" type="Node2D"]
script = ExtResource("1_272bh") script = ExtResource("1_272bh")
@ -1351,7 +1474,7 @@ collision_mask = 4
shape = SubResource("RectangleShape2D_w48qg") shape = SubResource("RectangleShape2D_w48qg")
[node name="ArrowSpawner" parent="." instance=ExtResource("15_vivmo")] [node name="ArrowSpawner" parent="." instance=ExtResource("15_vivmo")]
position = Vector2(3392, -8) position = Vector2(3391, -11.485)
[node name="TriggerSecondNPCDialogue" type="Area2D" parent="."] [node name="TriggerSecondNPCDialogue" type="Area2D" parent="."]
position = Vector2(3455, -11) position = Vector2(3455, -11)
@ -1409,10 +1532,11 @@ autoplay = "default"
frame_progress = 0.37434 frame_progress = 0.37434
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Armoire"] [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Armoire"]
position = Vector2(0, 17)
stream = ExtResource("19_0odxb") stream = ExtResource("19_0odxb")
autoplay = true autoplay = true
max_distance = 400.0 max_distance = 400.0
bus = &"SFX" bus = &"BadGuy"
[node name="Firewall" type="AnimatedSprite2D" parent="."] [node name="Firewall" type="AnimatedSprite2D" parent="."]
position = Vector2(5386, -32) position = Vector2(5386, -32)
@ -1422,13 +1546,13 @@ autoplay = "idle"
frame_progress = 0.470971 frame_progress = 0.470971
[node name="Skeleton" parent="." instance=ExtResource("19_d13ii")] [node name="Skeleton" parent="." instance=ExtResource("19_d13ii")]
position = Vector2(3753, -16) position = Vector2(3764, -16)
[node name="Skeleton2" parent="." instance=ExtResource("19_d13ii")] [node name="Skeleton2" parent="." instance=ExtResource("19_d13ii")]
position = Vector2(3822, -16) position = Vector2(3841, -16)
[node name="Skeleton3" parent="." instance=ExtResource("19_d13ii")] [node name="Skeleton3" parent="." instance=ExtResource("19_d13ii")]
position = Vector2(3935, -16) position = Vector2(3934, -16)
[node name="TriggerFinalDialogue" type="Area2D" parent="."] [node name="TriggerFinalDialogue" type="Area2D" parent="."]
position = Vector2(5178, -11) position = Vector2(5178, -11)
@ -1639,6 +1763,39 @@ libraries = {
&"": SubResource("AnimationLibrary_qnost") &"": SubResource("AnimationLibrary_qnost")
} }
[node name="DanceMusic" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamRandomizer_seu75")
bus = &"Music"
[node name="BaladeAmbiance" type="Area2D" parent="."]
position = Vector2(347, -13)
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="BaladeAmbiance"]
position = Vector2(-18, -5.5)
shape = SubResource("RectangleShape2D_htxhm")
[node name="SquelettesAmbiance" type="Area2D" parent="."]
position = Vector2(2397, -14)
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="SquelettesAmbiance"]
position = Vector2(-18, -5.5)
shape = SubResource("RectangleShape2D_htxhm")
[node name="CaveAmbiance" type="Area2D" parent="."]
position = Vector2(4364, -13)
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="CaveAmbiance"]
position = Vector2(-18, -5.5)
shape = SubResource("RectangleShape2D_htxhm")
[node name="Ambiance" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamInteractive_4k2k6")
autoplay = true
bus = &"Ambiance"
[connection signal="dialogue_ended" from="OpeningDialogue" to="Player" method="_on_dialogue_manager_dialogue_ended"] [connection signal="dialogue_ended" from="OpeningDialogue" to="Player" method="_on_dialogue_manager_dialogue_ended"]
[connection signal="dialogue_ended" from="NPCFirstDialogue" to="ShieldChoice" method="start_choice"] [connection signal="dialogue_ended" from="NPCFirstDialogue" to="ShieldChoice" method="start_choice"]
[connection signal="accepted" from="ShieldChoice" to="NPCShieldDialogue" method="on_dialogue_started"] [connection signal="accepted" from="ShieldChoice" to="NPCShieldDialogue" method="on_dialogue_started"]
@ -1668,3 +1825,6 @@ libraries = {
[connection signal="dialogue_ended" from="FinalArmor" to="." method="_on_final_armor_dialogue_ended"] [connection signal="dialogue_ended" from="FinalArmor" to="." method="_on_final_armor_dialogue_ended"]
[connection signal="dialogue_ended" from="FinalArmor" to="Player" method="_on_final_armor_dialogue_ended"] [connection signal="dialogue_ended" from="FinalArmor" to="Player" method="_on_final_armor_dialogue_ended"]
[connection signal="body_entered" from="FinalCinematic" to="." method="_on_final_cinematic_body_entered"] [connection signal="body_entered" from="FinalCinematic" to="." method="_on_final_cinematic_body_entered"]
[connection signal="body_entered" from="BaladeAmbiance" to="." method="_on_balade_ambiance_body_entered"]
[connection signal="body_entered" from="SquelettesAmbiance" to="." method="_on_squelettes_ambiance_body_entered"]
[connection signal="body_entered" from="CaveAmbiance" to="." method="_on_cave_ambiance_body_entered"]

View File

@ -21,7 +21,7 @@ var gravity_modifier = 1
@onready var base: AnimatedSprite2D = $Base @onready var base: AnimatedSprite2D = $Base
var current_sprite: AnimatedSprite2D var current_sprite: AnimatedSprite2D
var is_in_cutscene = false # back to true on build var is_in_cutscene = true # back to true on build
var current_animation = "idle" var current_animation = "idle"
var is_hitting = false var is_hitting = false
@ -29,6 +29,14 @@ var has_shield = false
var has_sword = false var has_sword = false
var has_armor = false var has_armor = false
@onready var steps_player: AudioStreamPlayer = $StepsPlayer
@onready var gearup_armor: AudioStreamPlayer = $GearupArmor
@onready var gearup_sword: AudioStreamPlayer = $GearupSword
@onready var gearup_shield: AudioStreamPlayer = $GearupShield
@onready var sword_hit: AudioStreamPlayer = $SwordHit
@onready var got_hit_audio: AudioStreamPlayer = $GotHitAudio
func play_anim(): func play_anim():
current_sprite.play(current_animation) current_sprite.play(current_animation)
@ -115,6 +123,7 @@ func _physics_process(delta: float) -> void:
func hit(): func hit():
is_hitting = true is_hitting = true
sword_hit.play()
hitting.start() hitting.start()
hitbox.monitoring = true hitbox.monitoring = true
@ -139,6 +148,7 @@ func _on_npc_shield_dialogue_dialogue_ended() -> void:
current_sprite.play("idle") current_sprite.play("idle")
current_sprite.visible = true current_sprite.visible = true
has_shield = true has_shield = true
gearup_shield.play()
func _on_red_hood_sword_dialogue_dialogue_ended() -> void: func _on_red_hood_sword_dialogue_dialogue_ended() -> void:
set_in_play() set_in_play()
@ -147,8 +157,10 @@ func _on_red_hood_sword_dialogue_dialogue_ended() -> void:
current_sprite.play("idle") current_sprite.play("idle")
current_sprite.visible = true current_sprite.visible = true
has_sword = true has_sword = true
gearup_sword.play()
func _on_put_on_armor() -> void: func _on_put_on_armor() -> void:
gearup_armor.play()
current_sprite.visible = false current_sprite.visible = false
current_sprite = armor current_sprite = armor
current_sprite.play("power_up") current_sprite.play("power_up")
@ -161,3 +173,15 @@ func _on_final_armor_dialogue_ended() -> void:
func _on_trigger_final_dialogue_body_entered(body: Node2D) -> void: func _on_trigger_final_dialogue_body_entered(body: Node2D) -> void:
set_in_cutscene() set_in_cutscene()
func _on_step_sound_interval_timeout() -> void:
if velocity.x == 0:
return
if not is_on_floor():
return
steps_player.play()
func _on_damageable_got_hit() -> void:
got_hit_audio.play()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=79 format=3 uid="uid://yvp44oauis4n"] [gd_scene load_steps=91 format=3 uid="uid://yvp44oauis4n"]
[ext_resource type="Script" uid="uid://c1fqj3lba7wik" path="res://player/player.gd" id="1_yw30f"] [ext_resource type="Script" uid="uid://c1fqj3lba7wik" path="res://player/player.gd" id="1_yw30f"]
[ext_resource type="Texture2D" uid="uid://cjruk5xlt3tyn" path="res://ennemy/MechantVol.png" id="2_ebec5"] [ext_resource type="Texture2D" uid="uid://cjruk5xlt3tyn" path="res://ennemy/MechantVol.png" id="2_ebec5"]
@ -11,8 +11,18 @@
[ext_resource type="Texture2D" uid="uid://dsxvqsh3umw01" path="res://player/assets/RunCycle.png" id="5_boad6"] [ext_resource type="Texture2D" uid="uid://dsxvqsh3umw01" path="res://player/assets/RunCycle.png" id="5_boad6"]
[ext_resource type="PackedScene" uid="uid://djwoetcyvvofc" path="res://damageable/damageable.tscn" id="5_g6k8r"] [ext_resource type="PackedScene" uid="uid://djwoetcyvvofc" path="res://damageable/damageable.tscn" id="5_g6k8r"]
[ext_resource type="Shape2D" uid="uid://6rhdwj5jxbxn" path="res://player/player_collision.tres" id="5_qjkh3"] [ext_resource type="Shape2D" uid="uid://6rhdwj5jxbxn" path="res://player/player_collision.tres" id="5_qjkh3"]
[ext_resource type="Texture2D" uid="uid://bhrqdo0cadpf4" path="res://player/assets/IdleArmes.png" id="6_s7qer"]
[ext_resource type="Texture2D" uid="uid://dw6tn0grt2ajc" path="res://player/assets/WalkCycle.png" id="10_yllr7"] [ext_resource type="Texture2D" uid="uid://dw6tn0grt2ajc" path="res://player/assets/WalkCycle.png" id="10_yllr7"]
[ext_resource type="PackedScene" uid="uid://7sqwi3lygb1u" path="res://damageable/hitbox.tscn" id="11_2ieo8"] [ext_resource type="PackedScene" uid="uid://7sqwi3lygb1u" path="res://damageable/hitbox.tscn" id="11_2ieo8"]
[ext_resource type="AudioStream" uid="uid://cw85p1vga71gf" path="res://world_assets/audio/443275__loscolt890__regularfootstep001.wav" id="14_32hag"]
[ext_resource type="AudioStream" uid="uid://dui2a6u3ulit4" path="res://world_assets/audio/443279__loscolt890__regularfootstep003.wav" id="15_tqiix"]
[ext_resource type="AudioStream" uid="uid://b5r486lhi7jnj" path="res://world_assets/audio/443280__loscolt890__regularfootstep002.wav" id="16_e7oew"]
[ext_resource type="AudioStream" uid="uid://brkkvx06htfsi" path="res://world_assets/audio/gearuparmor.wav" id="17_c35mf"]
[ext_resource type="AudioStream" uid="uid://d2ic760ktymkc" path="res://world_assets/audio/gearupsword.wav" id="18_65viv"]
[ext_resource type="AudioStream" uid="uid://bx1m1b8l5j0cc" path="res://world_assets/audio/gearupshield.wav" id="19_x7c3f"]
[ext_resource type="AudioStream" uid="uid://k3nqsuybwrlf" path="res://world_assets/audio/swordhit2.wav" id="20_x7c3f"]
[ext_resource type="AudioStream" uid="uid://c4crs3etujcdo" path="res://world_assets/audio/swordhit.wav" id="21_bjvpn"]
[ext_resource type="AudioStream" uid="uid://cwnf4q8286apo" path="res://world_assets/audio/446013__slavicmagic__sword-hit.wav" id="22_bjvpn"]
[sub_resource type="AtlasTexture" id="AtlasTexture_3dxkp"] [sub_resource type="AtlasTexture" id="AtlasTexture_3dxkp"]
atlas = ExtResource("2_ebec5") atlas = ExtResource("2_ebec5")
@ -175,13 +185,13 @@ region = Rect2(128, 0, 32, 32)
atlas = ExtResource("4_8t03j") atlas = ExtResource("4_8t03j")
region = Rect2(160, 0, 32, 32) region = Rect2(160, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_2ieo8"] [sub_resource type="AtlasTexture" id="AtlasTexture_j3r50"]
atlas = ExtResource("2_hg6s5") atlas = ExtResource("6_s7qer")
region = Rect2(96, 0, 32, 32) region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ebec5"] [sub_resource type="AtlasTexture" id="AtlasTexture_utr5e"]
atlas = ExtResource("2_hg6s5") atlas = ExtResource("6_s7qer")
region = Rect2(288, 0, 32, 32) region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_yllr7"] [sub_resource type="AtlasTexture" id="AtlasTexture_yllr7"]
atlas = ExtResource("2_hg6s5") atlas = ExtResource("2_hg6s5")
@ -316,10 +326,10 @@ animations = [{
}, { }, {
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_2ieo8") "texture": SubResource("AtlasTexture_j3r50")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_ebec5") "texture": SubResource("AtlasTexture_utr5e")
}], }],
"loop": true, "loop": true,
"name": &"idle", "name": &"idle",
@ -571,6 +581,17 @@ animations = [{
[sub_resource type="CircleShape2D" id="CircleShape2D_ebec5"] [sub_resource type="CircleShape2D" id="CircleShape2D_ebec5"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_c35mf"]
streams_count = 3
stream_0/stream = ExtResource("14_32hag")
stream_1/stream = ExtResource("15_tqiix")
stream_2/stream = ExtResource("16_e7oew")
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_s7qer"]
streams_count = 2
stream_0/stream = ExtResource("20_x7c3f")
stream_1/stream = ExtResource("21_bjvpn")
[node name="Player" type="CharacterBody2D"] [node name="Player" type="CharacterBody2D"]
collision_layer = 3 collision_layer = 3
script = ExtResource("1_yw30f") script = ExtResource("1_yw30f")
@ -591,10 +612,8 @@ autoplay = "power_up"
visible = false visible = false
position = Vector2(0, -16) position = Vector2(0, -16)
sprite_frames = SubResource("SpriteFrames_jfgyi") sprite_frames = SubResource("SpriteFrames_jfgyi")
animation = &"hit" animation = &"idle"
autoplay = "idle" autoplay = "idle"
frame = 5
frame_progress = 1.0
[node name="Shield" type="AnimatedSprite2D" parent="."] [node name="Shield" type="AnimatedSprite2D" parent="."]
visible = false visible = false
@ -630,4 +649,34 @@ damage = 10
position = Vector2(16, -10) position = Vector2(16, -10)
shape = SubResource("CircleShape2D_ebec5") shape = SubResource("CircleShape2D_ebec5")
[node name="StepsPlayer" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamRandomizer_c35mf")
bus = &"Steps"
[node name="GearupArmor" type="AudioStreamPlayer" parent="."]
stream = ExtResource("17_c35mf")
bus = &"Gearup"
[node name="GearupSword" type="AudioStreamPlayer" parent="."]
stream = ExtResource("18_65viv")
bus = &"Gearup"
[node name="GearupShield" type="AudioStreamPlayer" parent="."]
stream = ExtResource("19_x7c3f")
bus = &"Gearup"
[node name="SwordHit" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamRandomizer_s7qer")
bus = &"SFX"
[node name="StepSoundInterval" type="Timer" parent="."]
wait_time = 0.5
autostart = true
[node name="GotHitAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("22_bjvpn")
bus = &"SFX"
[connection signal="got_hit" from="Damageable" to="." method="_on_damageable_got_hit"]
[connection signal="timeout" from="Hitting" to="." method="_on_hitting_timeout"] [connection signal="timeout" from="Hitting" to="." method="_on_hitting_timeout"]
[connection signal="timeout" from="StepSoundInterval" to="." method="_on_step_sound_interval_timeout"]

BIN
world_assets/audio/446013__slavicmagic__sword-hit.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cwnf4q8286apo"
path="res://.godot/imported/446013__slavicmagic__sword-hit.wav-855cd710e9d0137dad496c6b33c60516.sample"
[deps]
source_file="res://world_assets/audio/446013__slavicmagic__sword-hit.wav"
dest_files=["res://.godot/imported/446013__slavicmagic__sword-hit.wav-855cd710e9d0137dad496c6b33c60516.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

BIN
world_assets/audio/ambiance/cave.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://o8kcbs7gk61y"
path="res://.godot/imported/cave.wav-071e4e9db8b82e78f5761bb71d5d3a50.sample"
[deps]
source_file="res://world_assets/audio/ambiance/cave.wav"
dest_files=["res://.godot/imported/cave.wav-071e4e9db8b82e78f5761bb71d5d3a50.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

BIN
world_assets/audio/ambiance/forestBalade.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cp2acg3q53jia"
path="res://.godot/imported/forestBalade.wav-9617cba8117af19ba773ed0a8684bf46.sample"
[deps]
source_file="res://world_assets/audio/ambiance/forestBalade.wav"
dest_files=["res://.godot/imported/forestBalade.wav-9617cba8117af19ba773ed0a8684bf46.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

BIN
world_assets/audio/ambiance/forestStart.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d2vbc5xbu67no"
path="res://.godot/imported/forestStart.wav-2520218bd0752b21dd94fed54c0e8eb5.sample"
[deps]
source_file="res://world_assets/audio/ambiance/forestStart.wav"
dest_files=["res://.godot/imported/forestStart.wav-2520218bd0752b21dd94fed54c0e8eb5.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

BIN
world_assets/audio/ambiance/squelettes.mp3 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bsosrbr0tgg25"
path="res://.godot/imported/squelettes.mp3-9027dfbd5e5cfc4a67500f4d603f2764.mp3str"
[deps]
source_file="res://world_assets/audio/ambiance/squelettes.mp3"
dest_files=["res://.godot/imported/squelettes.mp3-9027dfbd5e5cfc4a67500f4d603f2764.mp3str"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

BIN
world_assets/audio/speech.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cx7g00rpjodv3"
path="res://.godot/imported/speech.wav-bc0a9d9ada1c2a9d6bbebfb9544b3b3b.sample"
[deps]
source_file="res://world_assets/audio/speech.wav"
dest_files=["res://.godot/imported/speech.wav-bc0a9d9ada1c2a9d6bbebfb9544b3b3b.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2