From ab79ace226a41bde31db26c89d98d9e3ee9b3403 Mon Sep 17 00:00:00 2001 From: Lilith Schier Date: Sat, 2 May 2026 08:33:08 +0200 Subject: [PATCH] little work --- player/player.aseprite | Bin 8877 -> 15676 bytes player/player.aseprite.import | 10 +- player/player.gd | 45 ++++--- player/player.tscn | 222 ++++++++++++++++++++++------------ 4 files changed, 179 insertions(+), 98 deletions(-) diff --git a/player/player.aseprite b/player/player.aseprite index 84dd89b996dd17359bf47b69e696b570c347c7b3..efdf7f8a17367e1753af90825a38bf38d6881176 100644 GIT binary patch delta 5618 zcmeI$dsI_bz6Wp^tJtbU+m59Q#!kmN77L064X$B2ItCk3ni;5T?LgWqE+_uV{ zQ9z4|JTp`&wFtpN2oRDZa)&Gx2=YjPBt#5w2q8&hNCM|@&c4C6_qMa<-oNi3-GA+M zc2=@i&e@;y{rze_XiazW4{&gJQu)#qr?eFxEp>3fOv@cUb#QQ4ekHePNt=D*vc6#J znzaSH9cfWZ9G2KG{Aw(5h=@*PCY^P1aQf9%`*i8^g^05!Qf(+c3{Uuuum6cJHB0z=jd9W=lJ&}tG=@TCT4Pcz9~oh=g$>9Uh57v$En3kB3e%5B(v}`U$Mnnc!|2E3VJa)~PIeB|UvS^ctok}C6NKFL@|6|C(TFJIJ4 zjHFN>w-iOb2eZ&@nNEf#84#U!fYa4WaxgdBph%7Brmde(bJ=ELzwe#^Yk++GMg#Oj z=BAEMVsqM|*M!}iTktkr*mkiNiJuUo#QPX{EM{H%EJ_;=PUPtEREf zGaz4XY=Q=LC6N+pq3;&3XQ=ThS~Qi24;qFVCyMh^o4=Sdl4ZOZ7Dexcu127K#+Jxu z0?|yqjS?Nt2NI$mFO(5e;B^U>pWnWkkm&08Wc!U?y%8VzCfTodys&dy3gV4>gh5(< zM)yD7G1i8q+15|P{CG~CE;CVQZS#v4XVp=)bbVzKQZpVW4HXFgfxk9!R70lbP69`U z7Mz~L{^`MXI4a}P1N}kDR9a%Wds$#k`kpR-n&L`eVavHpJ-aC)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f$S#Hsb(Jo;| z1=t@a1x!7;e>z%<{79t3V&h=7fp3w*iM;2!VUc`b6I0LH0FsX;z~ZJ6RXyvt! z7_ZmD`>=I}Hc=lx8=59*5SL{_JXdEh@jGf|ekZNOrGQ$4Hkgx}O5f}u<5^+kFzNxfs z4Oaz46mEXLuvSNXddd)JyIr6fOEB_FKMfB5Ks=M`E88pg|3bYxkNHdIy^wf*-9*uR zzfsI+jk!?{YD`5`MNRCNY)R*-HO7K{6f`FPk0JjWb$7cJ@2;K95kGEtj-lH zBzsvl5I`7&!}QP2f?fG?<~?<@zQhD?p~=tYa3J3}4E zqoM&jCd%&kKw^g+MW+wMk)rtliz+AKoBe1DDu)-;hwZc-(-j&EczPtO(1;l-O6x*Y yP*-m@Dzv}dwNmXSk+2<1(n<0(WC_`Y9ve<+z%DB7g7F>rhWmcDWt@i}p7}2)Wn+l| diff --git a/player/player.aseprite.import b/player/player.aseprite.import index 2c8b79d..4e0b46b 100644 --- a/player/player.aseprite.import +++ b/player/player.aseprite.import @@ -1,7 +1,7 @@ [remap] -importer="aseprite_wizard.plugin.spriteframes" -type="SpriteFrames" +importer="aseprite_wizard.plugin.static-texture" +type="PortableCompressedTexture2D" uid="uid://d0dy3j0qdycqf" path="res://.godot/imported/player.aseprite-704c4b9b828702113ecb71676625aeb4.res" @@ -14,8 +14,8 @@ dest_files=["res://.godot/imported/player.aseprite-704c4b9b828702113ecb71676625a layer/exclude_layers_pattern="" layer/only_visible_layers=true -sheet/sheet_type="packed" +layer/split_layers=false +first_frame_only=false +sheet/sheet_type="horizontal" sheet/sheet_columns=12 -sheet/frame_padding=0 sheet/scale=1 -animation/round_fps=true diff --git a/player/player.gd b/player/player.gd index 8b3bb13..1c5fc94 100644 --- a/player/player.gd +++ b/player/player.gd @@ -22,6 +22,12 @@ var jump_ascent_speed := 200.0 var late_jump_time_limit := 0.15 @export_custom(PROPERTY_HINT_NONE, "suffix:px/s") var slash_speed_boost := 90.0 +## The angle difference from perfect left/right that still counts. +@export_range(0, 360, 0.1, "radians_as_degrees") +var side_input_angle := PI / 4 +## The angle difference from perfect down that still counts. +@export_range(0, 360, 0.1, "radians_as_degrees") +var down_input_angle := PI / 4 var _max_input_buffer_time_usec: get(): @@ -31,6 +37,7 @@ var _is_jumping := false var _jump_allowed_time := 0.0 var _current_direction := Vector2.ZERO var _is_facing_right := true +@onready var _playback: AnimationNodeStateMachinePlayback = %AnimationTree["parameters/playback"] var _input_buffer: Array[BufferedInput] = [] @@ -41,10 +48,6 @@ class BufferedInput: var time: int -func _ready() -> void: - %Body.play() - - func _unhandled_input(event: InputEvent) -> void: if event.is_echo(): return @@ -52,14 +55,12 @@ func _unhandled_input(event: InputEvent) -> void: or event.is_action(&"move_right") or event.is_action(&"move_up") or event.is_action(&"move_down") ): - _current_direction = Vector2( - Input.get_axis(&"move_left", &"move_right"), - Input.get_axis(&"move_up", &"move_down"), + _current_direction = Input.get_vector( + &"move_left", + &"move_right", + &"move_up", + &"move_down", ) - if _current_direction.x < 0: - _is_facing_right = false - elif _current_direction.x > 0: - _is_facing_right = true if event.is_action(&"jump") or event.is_action(&"attack"): var buffered_input := BufferedInput.new() buffered_input.direction = _current_direction @@ -70,13 +71,18 @@ func _unhandled_input(event: InputEvent) -> void: func _physics_process(delta: float) -> void: + if _current_direction.x < 0: + _is_facing_right = false + elif _current_direction.x > 0: + _is_facing_right = true + # Walking on the floor if is_on_floor(): if sign(velocity.x) != sign(_current_direction.x): velocity.x *= grounded_speed_stop_decay ** delta else: velocity.x *= grounded_speed_decay ** delta - var target_vel_x := _current_direction.x * walk_max_speed + var target_vel_x: float = sign(_current_direction.x) * walk_max_speed var is_walking := target_vel_x != 0 if not is_walking or abs(velocity.x) < walk_max_speed: velocity.x = move_toward( @@ -127,12 +133,6 @@ func _is_holding_wall() -> bool: func _process(_delta: float) -> void: handle_buffered_inputs() %Body.scale.x = 1 if _is_facing_right else -1 - if _is_holding_wall(): - %Body.play(&"wall_grab") - elif is_on_floor() and _current_direction.x != 0.0: - %Body.play(&"walk") - else: - %Body.play(&"idle") func handle_buffered_inputs() -> void: @@ -151,7 +151,7 @@ func handle_buffered_inputs() -> void: # Grounded jump if (input.event.is_pressed() and _jump_allowed_time > 0 - and (not is_on_floor() or input.direction.y <= 0) ): + and (not is_on_floor() or not is_input_vec_down(input.direction)) ): input_found = true _jump_allowed_time = 0 _jump_ascent_remaining_time = jump_ascent_max_time @@ -172,8 +172,15 @@ func handle_buffered_inputs() -> void: elif input.event.is_action_pressed(&"attack"): input_found = true velocity.x += (1 if _is_facing_right else -1) * slash_speed_boost + _playback.travel(&"attack") + _input_buffer = _input_buffer.slice(i + 1) + break $AnimationPlayer.play("slash") if input_found: _input_buffer = _input_buffer.slice(i + 1) break + + +func is_input_vec_down(vec: Vector2) -> bool: + return abs(vec.angle_to(Vector2.DOWN)) < down_input_angle and vec.length() > 0.1 diff --git a/player/player.tscn b/player/player.tscn index b890d6c..b20d0a9 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,98 +1,166 @@ [gd_scene format=3 uid="uid://ce2k04khaub8n"] [ext_resource type="Script" uid="uid://bx500kvj301vt" path="res://player/player.gd" id="1_g1dw6"] -[ext_resource type="SpriteFrames" uid="uid://d0dy3j0qdycqf" path="res://player/player.aseprite" id="2_yw30f"] +[ext_resource type="Texture2D" uid="uid://d0dy3j0qdycqf" path="res://player/player.aseprite" id="2_yw30f"] [ext_resource type="Texture2D" uid="uid://blw6f2ktsrcmg" path="res://player/hair.aseprite" id="3_qjkh3"] [ext_resource type="Script" uid="uid://b7shvbf7iv6an" path="res://spring2d.gd" id="4_yw30f"] -[ext_resource type="Script" uid="uid://bk0k3j7th00wu" path="res://player/ribbon.gd" id="5_qjkh3"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_e2o6t"] radius = 4.0 height = 14.0 -[sub_resource type="Animation" id="Animation_g6k8r"] +[sub_resource type="Animation" id="Animation_yw30f"] +resource_name = "RESET" length = 0.001 step = 0.016666668 -tracks/0/type = "bezier" +tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("Body/Ribbon:position:x") +tracks/0/path = NodePath("Body:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"handle_modes": PackedInt32Array(2), -"points": PackedFloat32Array(1, -0.1666675, 0, 0.1666675, 0), -"times": PackedFloat32Array(0) -} -tracks/1/type = "bezier" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Body/Ribbon:position:y") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"handle_modes": PackedInt32Array(2), -"points": PackedFloat32Array(1, -0.1666675, 0, 0.1666675, 0), -"times": PackedFloat32Array(0) -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Body/Ribbon:new_segments_damage") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [false] +"values": [0] } [sub_resource type="Animation" id="Animation_qjkh3"] -resource_name = "slash" -length = 0.20000167 -step = 0.016666668 -tracks/0/type = "bezier" +resource_name = "idle" +length = 1.0000017 +loop_mode = 1 +step = 0.1 +tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("Body/Ribbon:position:x") +tracks/0/path = NodePath("Body:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"handle_modes": PackedInt32Array(0, 2, 2, 2, 2, 2, 2, 2, 0), -"points": PackedFloat32Array(3, 0, 0, 0.027242973, 2.1666667, 5, -6.0920916e-05, 0.02146086, 0.002777778, -0.9785392, -5, -0.002777778, 0.5833334, 0.002777778, -0.5833334, -3, -0.002777778, -0.75, 0.0027777783, 0.75000006, 21, -0.0027777783, -2.2500002, 0.0027777776, 2.2499998, 46, -0.0027777776, 0.45238093, 0.016666668, -2.7142859, 9, -0.016666668, 5.7148743, 0.005692142, -1.9517924, 2, -0.005555558, 1.4640074, 0.00013658404, -0.035992794, 0, -0.0029143642, 0.16666667, 0, 0), -"times": PackedFloat32Array(-0.00036552548, 0, 0.016666668, 0.033333335, 0.050000004, 0.06666667, 0.16666667, 0.20000002, 0.20081952) -} -tracks/1/type = "bezier" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Body/Ribbon:position:y") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"handle_modes": PackedInt32Array(0, 2, 2, 2, 2, 2, 2, 2, 0), -"points": PackedFloat32Array(2, 0, 0, 0.027242973, -0.33333334, 5, -6.0920916e-05, 0, 0.002777778, 0, 3, -0.002777778, 0.6666667, 0.002777778, -0.6666667, -4, -0.002777778, 0.49999997, 0.0027777783, -0.5, -6, -0.0027777783, -0.33333337, 0.0027777776, 0.33333328, 0, -0.0027777776, -0.23809522, 0.016666668, 1.4285715, 8, -0.016666668, 0, 0.005692142, 0, 3, -0.005555558, 1.3013397, 0.00013658404, -0.03199359, 0, -0.0029143642, -0.16666667, 0, 0), -"times": PackedFloat32Array(-0.00036552548, 0, 0.016666668, 0.033333335, 0.050000004, 0.06666667, 0.16666667, 0.20000002, 0.20081952) -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Body/Ribbon:new_segments_damage") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.016666668, 0.16666667), -"transitions": PackedFloat32Array(1, 1, 1), +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), "update": 1, -"values": [false, true, false] +"values": [0] } -[sub_resource type="AnimationLibrary" id="AnimationLibrary_g6k8r"] -_data = { -&"RESET": SubResource("Animation_g6k8r"), -&"slash": SubResource("Animation_qjkh3") +[sub_resource type="Animation" id="Animation_g6k8r"] +resource_name = "slash" +length = 0.20000167 +step = 0.05 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [6] } +[sub_resource type="Animation" id="Animation_boad6"] +resource_name = "walk" +length = 0.400005 +loop_mode = 1 +step = 0.1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3] +} + +[sub_resource type="Animation" id="Animation_rgyib"] +resource_name = "wall_hold" +length = 1.0000017 +loop_mode = 1 +step = 0.1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Body:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [5] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_rgyib"] +_data = { +&"RESET": SubResource("Animation_yw30f"), +&"idle": SubResource("Animation_qjkh3"), +&"slash": SubResource("Animation_g6k8r"), +&"walk": SubResource("Animation_boad6"), +&"wall_hold": SubResource("Animation_rgyib") +} + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qjkh3"] +animation = &"slash" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_yw30f"] +animation = &"idle" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g6k8r"] +animation = &"walk" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_boad6"] +animation = &"wall_hold" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_boad6"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rgyib"] +break_loop_at_end = true + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_hg6s5"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8t03j"] +advance_mode = 2 +advance_expression = "is_on_floor() and _current_direction.x != 0.0" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2ieo8"] +break_loop_at_end = true +advance_mode = 2 +advance_expression = "not is_on_floor() or _current_direction.x == 0.0" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ebec5"] +advance_expression = "_is_on_wall()" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yllr7"] +advance_mode = 2 +advance_expression = "_is_holding_wall()" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kb6p2"] +advance_mode = 2 +advance_expression = "not _is_holding_wall()" + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_yllr7"] +allow_transition_to_self = true +states/attack/node = SubResource("AnimationNodeAnimation_qjkh3") +states/attack/position = Vector2(604.5, 41.5) +states/idle/node = SubResource("AnimationNodeAnimation_yw30f") +states/idle/position = Vector2(428.5, 88.5) +states/walk/node = SubResource("AnimationNodeAnimation_g6k8r") +states/walk/position = Vector2(628.5, 203.5) +states/wall_hold/node = SubResource("AnimationNodeAnimation_boad6") +states/wall_hold/position = Vector2(362.82965, 231.5) +transitions = ["attack", "idle", SubResource("AnimationNodeStateMachineTransition_boad6"), "idle", "attack", SubResource("AnimationNodeStateMachineTransition_rgyib"), "Start", "idle", SubResource("AnimationNodeStateMachineTransition_hg6s5"), "idle", "walk", SubResource("AnimationNodeStateMachineTransition_8t03j"), "walk", "idle", SubResource("AnimationNodeStateMachineTransition_2ieo8"), "walk", "attack", SubResource("AnimationNodeStateMachineTransition_ebec5"), "idle", "wall_hold", SubResource("AnimationNodeStateMachineTransition_yllr7"), "wall_hold", "idle", SubResource("AnimationNodeStateMachineTransition_kb6p2")] +graph_offset = Vector2(-59.670364, -27) + [node name="Player" type="CharacterBody2D" unique_id=500011307] physics_interpolation_mode = 1 collision_layer = 2 @@ -107,16 +175,21 @@ shape = SubResource("CapsuleShape2D_e2o6t") [node name="Camera2D" type="Camera2D" parent="." unique_id=1975474809] limit_enabled = false -[node name="Body" type="AnimatedSprite2D" parent="." unique_id=559621433] +[node name="Body" type="Sprite2D" parent="." unique_id=567060128] unique_name_in_owner = true -sprite_frames = ExtResource("2_yw30f") -animation = &"idle" -autoplay = "idle" +texture = ExtResource("2_yw30f") +hframes = 7 metadata/_aseprite_wizard_interface_config_ = { -"animation_section": true, +"animation_section": false, "layer_section": false, "output_section": false, "pending_changes": { +"convert_fps_field": 60.0, +"convert_ms_field": 16.0, +"convert_to_fps": false, +"i_mode": 0, +"keep_anim_length": false, +"player": "", "source": "res://player/player.aseprite" }, "slice_section": false @@ -142,14 +215,15 @@ script = ExtResource("4_yw30f") max_offset = Vector2(1, 2) [node name="Hair" type="Sprite2D" parent="Body/Spring2D" unique_id=796557000] -unique_name_in_owner = true position = Vector2(-2, 2) texture = ExtResource("3_qjkh3") -[node name="Ribbon" type="Node2D" parent="Body" unique_id=45519559] -position = Vector2(1, 1) -script = ExtResource("5_qjkh3") -color = Color(0.49411765, 0.76862746, 0.75686276, 1) - [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1251324400] -libraries/ = SubResource("AnimationLibrary_g6k8r") +libraries/ = SubResource("AnimationLibrary_rgyib") + +[node name="AnimationTree" type="AnimationTree" parent="AnimationPlayer" unique_id=1839424284] +unique_name_in_owner = true +root_node = NodePath("%AnimationTree/../..") +tree_root = SubResource("AnimationNodeStateMachine_yllr7") +advance_expression_base_node = NodePath("../..") +anim_player = NodePath("..")