5 Commits

Author SHA1 Message Date
3450c463f9 feat: arrows and stuff
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 2m22s
2025-08-02 15:51:29 +02:00
e3545a5087 feat: new dialogue with NPC
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 2m5s
2025-08-02 12:16:27 +02:00
712d2a41ea feat: parallax and more environment
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 2m19s
2025-08-02 11:50:59 +02:00
5c9add1fe4 feat: new hit anim 2025-08-01 17:58:25 +02:00
f914032f8f feat: nouveau dialogue
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 2m6s
2025-08-01 17:46:36 +02:00
24 changed files with 516 additions and 45 deletions

36
arrow/arrow.gd Normal file
View File

@ -0,0 +1,36 @@
extends RigidBody2D
@onready var area_2d: Area2D = $Area2D
@onready var kill_after: Timer = $KillAfter
@export var speed = 100
@export var rotation_speed = 1
@export var jump_strength_on_death = 100
var is_moving = true
var first_frame_available = true
func _ready() -> void:
freeze = true
func _physics_process(delta: float) -> void:
if is_moving:
position.x -= speed
else:
freeze = false
area_2d.monitoring = false
area_2d.monitorable = false
linear_velocity.x = 0
linear_velocity += get_gravity() * delta
angular_velocity = rotation_speed
if first_frame_available:
apply_impulse(Vector2.UP * jump_strength_on_death)
first_frame_available = false
func _on_kill_after_timeout() -> void:
queue_free()
func _on_body_entered(body: Node) -> void:
is_moving = false
kill_after.start()

1
arrow/arrow.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://127t4dvlp6tv

48
arrow/arrow.tscn Normal file
View File

@ -0,0 +1,48 @@
[gd_scene load_steps=6 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://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"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d2qln"]
size = Vector2(2, 2)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yaehf"]
size = Vector2(12, 5)
[node name="Arrow" type="RigidBody2D"]
collision_layer = 0
collision_mask = 0
freeze_mode = 1
linear_velocity = Vector2(-100, 0)
script = ExtResource("1_d2qln")
speed = 1
rotation_speed = 10
jump_strength_on_death = 500
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_d2qln")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_ofxgm")
region_rect = Rect2(717, 6, 35, 9)
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 5
script = ExtResource("2_d2qln")
hitback_direction = Vector2(-1, -1)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(1, 0.5)
shape = SubResource("RectangleShape2D_yaehf")
[node name="KillAfter" type="Timer" parent="."]
wait_time = 3.0
one_shot = true
ignore_time_scale = true
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"]
[connection signal="timeout" from="KillAfter" to="." method="_on_kill_after_timeout"]

10
arrow/arrow_spawner.gd Normal file
View File

@ -0,0 +1,10 @@
extends Node2D
@export var arrow_scene: PackedScene
@onready var spawn_timing: Timer = $SpawnTiming
func _on_spawn_timing_timeout() -> void:
var arrow: Node2D = arrow_scene.instantiate()
arrow.global_position = global_position
add_sibling(arrow)

View File

@ -0,0 +1 @@
uid://bej0paudsyd7h

14
arrow/arrow_spawner.tscn Normal file
View File

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://c5tp7c70qkxe3"]
[ext_resource type="Script" uid="uid://bej0paudsyd7h" path="res://arrow/arrow_spawner.gd" id="1_7je20"]
[ext_resource type="PackedScene" uid="uid://4bfkbcr7v8tj" path="res://arrow/arrow.tscn" id="2_ek028"]
[node name="ArrowSpawner" type="Node2D"]
script = ExtResource("1_7je20")
arrow_scene = ExtResource("2_ek028")
[node name="SpawnTiming" type="Timer" parent="."]
wait_time = 3.0
autostart = true
[connection signal="timeout" from="SpawnTiming" to="." method="_on_spawn_timing_timeout"]

View File

@ -9,6 +9,7 @@ size = Vector2(630, 340)
script = ExtResource("1_f5lvx")
[node name="Area2D" type="Area2D" parent="."]
visible = false
collision_layer = 0
collision_mask = 2
@ -16,6 +17,8 @@ collision_mask = 2
shape = SubResource("RectangleShape2D_7mycd")
[node name="Camera2D" type="Camera2D" parent="."]
position_smoothing_enabled = true
position_smoothing_speed = 30.0
[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_body_exited"]

View File

@ -106,3 +106,7 @@ func _on_next_letter() -> void:
next_label.visible = true
ui_flicker_timer.start()
func _on_body_entered_trigger_dialogue(body: Node2D) -> void:
on_dialogue_started()

21
main.gd
View File

@ -9,14 +9,26 @@ var active_camera: SuperCamera
@onready var opening_cutscene: AnimationPlayer = $OpeningCutscene
@onready var background_far: TileMapLayer = $BackgroundFar
@onready var background_middle: TileMapLayer = $BackgroundMiddle
@onready var background_close: TileMapLayer = $BackgroundClose
@onready var foreground_far: TileMapLayer = $ForegroundFar
@export_group("Parallax")
@export var parallax_far = 0.1
@export var parallax_middle = 0.3
@export var parallax_close = 0.5
@export var foreground = 0.8
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
for child in get_children():
if is_instance_of(child, SuperCamera):
child.became_active.connect(on_camera_became_active)
opening_cutscene.play("opening_cutscene")
opening_fade_to_black.visible = true
#opening_cutscene.play("opening_cutscene")
#opening_fade_to_black.visible = true
func on_camera_became_active(camera: SuperCamera):
active_camera = camera
@ -28,3 +40,8 @@ func _process(delta: float) -> void:
bubbles_back.global_position.x = active_camera.global_position.x
bubbles_interior.global_position.x = active_camera.global_position.x
background_far.global_position.x = active_camera.global_position.x * parallax_far
background_middle.global_position.x = active_camera.global_position.x * parallax_middle
background_close.global_position.x = active_camera.global_position.x * parallax_close
foreground_far.global_position.x = active_camera.global_position.x * foreground

156
main.tscn

File diff suppressed because one or more lines are too long

BIN
player/assets/Bouclier.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfxgjrja1ah60"
path="res://.godot/imported/Bouclier.png-e7c965646f348bf410efb0824b431e45.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Bouclier.png"
dest_files=["res://.godot/imported/Bouclier.png-e7c965646f348bf410efb0824b431e45.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

BIN
player/assets/Défense.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcyawv770lkhp"
path="res://.godot/imported/Défense.png-c9911fdbdfe0bbcdb6f1b11801052875.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Défense.png"
dest_files=["res://.godot/imported/Défense.png-c9911fdbdfe0bbcdb6f1b11801052875.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

BIN
player/assets/Epee.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://db3oaynrhd7wg"
path="res://.godot/imported/Epee.png-2f948674a42be1d4f0f32c5289e9c5d8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Epee.png"
dest_files=["res://.godot/imported/Epee.png-2f948674a42be1d4f0f32c5289e9c5d8.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

BIN
player/assets/Fleche.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://lhq6h8f81qrr"
path="res://.godot/imported/Fleche.png-fd23037ecccb3463f4413f9430b058a1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Fleche.png"
dest_files=["res://.godot/imported/Fleche.png-fd23037ecccb3463f4413f9430b058a1.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

BIN
player/assets/Outch.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwn548x0n4bpd"
path="res://.godot/imported/Outch.png-fb0d67fa327c4c83d19c4122b53475dc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Outch.png"
dest_files=["res://.godot/imported/Outch.png-fb0d67fa327c4c83d19c4122b53475dc.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

BIN
player/assets/Stab .png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2rfo6ilwusak"
path="res://.godot/imported/Stab .png-066cf9b96545ad05213c48d15dd6666a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Stab .png"
dest_files=["res://.godot/imported/Stab .png-066cf9b96545ad05213c48d15dd6666a.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

View File

@ -16,7 +16,7 @@ var gravity_modifier = 1
var animated_sprites = []
var is_in_cutscene = true
var is_in_cutscene = false # back to true on build
var current_animation = "idle"
func play_anim():
@ -55,6 +55,8 @@ func _ready() -> void:
func _physics_process(delta: float) -> void:
play_anim()
if is_in_cutscene:
play_anim_idle()
velocity.x = move_toward(velocity.x, 0, speed)
move_and_slide()
return
@ -63,9 +65,9 @@ func _physics_process(delta: float) -> void:
velocity += get_gravity() * delta * gravity_modifier
var direction := Input.get_axis("move_left", "move_right")
if direction > 0:
if direction > 0 and is_on_floor():
look_right()
if direction < 0:
if direction < 0 and is_on_floor():
look_left()
@ -89,3 +91,6 @@ func _physics_process(delta: float) -> void:
func _on_dialogue_manager_dialogue_ended() -> void:
set_in_play()
func _on_trigger_dialogue_body_entered(body: Node2D) -> void:
set_in_cutscene()

View File

@ -1,29 +1,21 @@
[gd_scene load_steps=32 format=3 uid="uid://yvp44oauis4n"]
[gd_scene load_steps=30 format=3 uid="uid://yvp44oauis4n"]
[ext_resource type="Script" uid="uid://c1fqj3lba7wik" path="res://player/player.gd" id="1_yw30f"]
[ext_resource type="SpriteFrames" uid="uid://i6035vm5ited" path="res://player/armored_spritesheet.tres" id="2_qjkh3"]
[ext_resource type="Texture2D" uid="uid://dg1okdxx73qx2" path="res://player/assets/itch hurt 2 sheet-Sheet.png" id="3_g6k8r"]
[ext_resource type="Texture2D" uid="uid://dwn548x0n4bpd" path="res://player/assets/Outch.png" id="3_rgyib"]
[ext_resource type="Texture2D" uid="uid://dr5ypp4q8n2xm" path="res://player/assets/DebutIdle.png" id="4_rgyib"]
[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="Shape2D" uid="uid://6rhdwj5jxbxn" path="res://player/player_collision.tres" id="5_qjkh3"]
[ext_resource type="Texture2D" uid="uid://dw6tn0grt2ajc" path="res://player/assets/WalkCycle.png" id="5_rgyib"]
[sub_resource type="AtlasTexture" id="AtlasTexture_boad6"]
atlas = ExtResource("3_g6k8r")
region = Rect2(80, 0, 80, 80)
[sub_resource type="AtlasTexture" id="AtlasTexture_rgyib"]
atlas = ExtResource("3_g6k8r")
region = Rect2(160, 0, 80, 80)
[sub_resource type="AtlasTexture" id="AtlasTexture_hg6s5"]
atlas = ExtResource("3_g6k8r")
region = Rect2(240, 0, 80, 80)
atlas = ExtResource("3_rgyib")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_8t03j"]
atlas = ExtResource("3_g6k8r")
region = Rect2(320, 0, 80, 80)
atlas = ExtResource("3_rgyib")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_wodsf"]
atlas = ExtResource("4_rgyib")
@ -101,20 +93,14 @@ region = Rect2(352, 0, 32, 32)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_boad6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rgyib")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hg6s5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8t03j")
}],
"loop": false,
"loop": true,
"name": &"got_hit",
"speed": 10.0
"speed": 8.0
}, {
"frames": [{
"duration": 1.0,
@ -205,9 +191,9 @@ autoplay = "idle"
[node name="Base" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -16)
sprite_frames = SubResource("SpriteFrames_mmwog")
animation = &"jump"
animation = &"got_hit"
autoplay = "idle"
frame_progress = 0.808295
frame_progress = 0.993718
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false