From 080401b9a3f44048f40923e1e8b9cb3c2a4ee4a7 Mon Sep 17 00:00:00 2001 From: AXVIII3 <76608488+AXVIII3@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:56:18 +0530 Subject: [PATCH 1/4] Final Player Movement \w Animations --- Assets/Sprites/Jesus/Jesus Back.png | Bin 0 -> 597 bytes Assets/Sprites/Jesus/Jesus Back.png.import | 34 +++++ Assets/Sprites/Jesus/Jesus Front.png | Bin 0 -> 714 bytes Assets/Sprites/Jesus/Jesus Front.png.import | 34 +++++ Assets/Sprites/Jesus/Jesus Left.png | Bin 0 -> 665 bytes Assets/Sprites/Jesus/Jesus Left.png.import | 34 +++++ Assets/Sprites/Jesus/Jesus Spritesheet.png | Bin 0 -> 7347 bytes .../Jesus/Jesus Spritesheet.png.import | 34 +++++ Assets/Sprites/Jesus/Shadow.png | Bin 0 -> 145 bytes Assets/Sprites/Jesus/Shadow.png.import | 34 +++++ Scenes/PlayerMovement.tscn | 138 ++++++++++++++++-- Scripts/PlayerController.gd | 48 ++++-- project.godot | 2 +- 13 files changed, 335 insertions(+), 23 deletions(-) create mode 100644 Assets/Sprites/Jesus/Jesus Back.png create mode 100644 Assets/Sprites/Jesus/Jesus Back.png.import create mode 100644 Assets/Sprites/Jesus/Jesus Front.png create mode 100644 Assets/Sprites/Jesus/Jesus Front.png.import create mode 100644 Assets/Sprites/Jesus/Jesus Left.png create mode 100644 Assets/Sprites/Jesus/Jesus Left.png.import create mode 100644 Assets/Sprites/Jesus/Jesus Spritesheet.png create mode 100644 Assets/Sprites/Jesus/Jesus Spritesheet.png.import create mode 100644 Assets/Sprites/Jesus/Shadow.png create mode 100644 Assets/Sprites/Jesus/Shadow.png.import diff --git a/Assets/Sprites/Jesus/Jesus Back.png b/Assets/Sprites/Jesus/Jesus Back.png new file mode 100644 index 0000000000000000000000000000000000000000..51840ac9422391d0688f8bd0417d9afd7f565161 GIT binary patch literal 597 zcmV-b0;>IqP)Px%4@pEpRA@u(m_10uFcg4$=&T?j2>vXNf(TB6LU9yVZxLN}5ae)ha8wYKLvU~w zTyzyjDd^xRf}_(p2rh0eDwS7wlBUUfFKv&OBVCSO)4VTVUSHBSf{Kqu#qk3V;0<^K z-hh*Vv#q6=D_q;>cTRnZ8cPD}U{a9!1LPS!+K^Zv4HOA3h4290fH&X`^tOS*r5MU- zk#g(|aM+y7toH*$gWMLtdOa7w=ht_p!^yE>X9!7f=romtU;qG4Zl06>@w{>X0HShX zdUZcB^m2WW{7Og98c@AQQIyIL2!?^xc2gV8n>{!hONpQHYFaQQulQC~_?2EHtROAYvjvV!u0fL$jlV{+_&S0-&ryNsnJsg zL;&3Ax!|=2&@E)9fHEK%Jyi=#kE8K1v_agqcSOYr8c|hLElOelm*8CiaMACQh++d} z0xa}B1^tVyB(?~^H8^LW{s6EcQJ3Sg4X{sv3Xmr_R|`CVHy}1pBmt#6BXUnzDZu(; zN4)Y;4Y@74)j-bz=r1U&0esJg%_^vVUpx9YZh8fOn;3~lFZWWjf-9eCs@RuPylHo3 jCiQ_r{dS;t?9%oRlFpn^sg!$G00000NkvXXu0mjfcGvmr literal 0 HcmV?d00001 diff --git a/Assets/Sprites/Jesus/Jesus Back.png.import b/Assets/Sprites/Jesus/Jesus Back.png.import new file mode 100644 index 0000000..b6bde28 --- /dev/null +++ b/Assets/Sprites/Jesus/Jesus Back.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ct2del6b6jorm" +path="res://.godot/imported/Jesus Back.png-6132a4979edf4d1442fefae322c4ce7c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Jesus/Jesus Back.png" +dest_files=["res://.godot/imported/Jesus Back.png-6132a4979edf4d1442fefae322c4ce7c.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 diff --git a/Assets/Sprites/Jesus/Jesus Front.png b/Assets/Sprites/Jesus/Jesus Front.png new file mode 100644 index 0000000000000000000000000000000000000000..2f4f5ffb46945897a9fc9a68d043ab8fde1ad7c4 GIT binary patch literal 714 zcmV;*0yX`KP)Px%gh@m}RA@u(m_10tP!PvcbXJfe2%?LlB7&m+@7|*uIwoSo1>&|LV(PD{V4kiT|et;z2qZ$$wViibZTnb?gP}?j==3(oyqkLyl zK@1RQm|LYFP5^9-BMd^M2H?hVWBOe83_##{4v<;_kkTY~Tv(g~m}Y_VB;*QY4xno` z2*pEXk{{kP4kKvCx*X6cks9Erx~$Cmv59fTmaZ`+X~T*F0Pz0tsTiD{E=ofmtdqze z32<`T^FxC`nF9cj&1jZ-Z&ZNl{yH-`xG66fLovT`;IAo_O2z~?<^YBQ76Jf##zCNQ zq?AB}C}|ZyG9o~?+a1hpRRix|+E?E5^< zND7e(pjl96vPPtZ20iKq&O&1fdaq=R0XjDE&yN;Qy7#GK@(&a0LLyS4N&f5TmPg-}bKpP!$pZ=&AtSunj}z091c*61q@8m&E@AAZae}gNbz` z;%(428FPTl6rk1MqzY`4FjD|N%n~WUTPYsbbX72Q(Fhd_J=z(MWbh{aZHPPJVHNLj wn(0m_HfxPPPSL>L`eNu0Ec)L8hp<`u1AIzHUvk$q!vFvP07*qoM6N<$f^x_$LjV8( literal 0 HcmV?d00001 diff --git a/Assets/Sprites/Jesus/Jesus Front.png.import b/Assets/Sprites/Jesus/Jesus Front.png.import new file mode 100644 index 0000000..f35491f --- /dev/null +++ b/Assets/Sprites/Jesus/Jesus Front.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c03lntytfivr1" +path="res://.godot/imported/Jesus Front.png-b78bfa6c3ed674009555f7ab3f93e778.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Jesus/Jesus Front.png" +dest_files=["res://.godot/imported/Jesus Front.png-b78bfa6c3ed674009555f7ab3f93e778.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 diff --git a/Assets/Sprites/Jesus/Jesus Left.png b/Assets/Sprites/Jesus/Jesus Left.png new file mode 100644 index 0000000000000000000000000000000000000000..fba652ff02c4ec1a41ac63f83d84a9e677ab9b9c GIT binary patch literal 665 zcmV;K0%rY*P)Px%Q%OWYRA@u(nK4TPK@f%S&_7|JRXPmF@kpimsmCYhse~s(5@qkS? zfNAIIwmBtYDS!aDI0aHaGg(0)oN6F30Fd|Rz8*|IsRH@sd2cp1DJ8a&9OF=OAf(C09;MyJPVoDw1h zxZO)_Fj+BL00-M!L0{7uZX0d3LKG=L@BQ#VzX3Riz=Ajc?fR}wr0(~{>O~~ZSOd1= z!_`~>RwkZ85Y7PTx7t>cI)KbmS2a0+=>Qrk00oJwfLe^AIiOQQS9MYwsCrHSkknL| zsR5uiB%;8;09+0ygy^dRsRNjP|L_x4!1+>YYeQEH#v1_q?@0l82<{HGv!-{tUk*)V z-Oq4ataB0K#YF-jiFF3pTU%iNtWtkjOJe^4{OyQ-dp8co00000NkvXXu0mjf$}|)k literal 0 HcmV?d00001 diff --git a/Assets/Sprites/Jesus/Jesus Left.png.import b/Assets/Sprites/Jesus/Jesus Left.png.import new file mode 100644 index 0000000..34a5751 --- /dev/null +++ b/Assets/Sprites/Jesus/Jesus Left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cn4kqa1p845wl" +path="res://.godot/imported/Jesus Left.png-2949c2879ed5f5e8def57f2eb1498de4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Jesus/Jesus Left.png" +dest_files=["res://.godot/imported/Jesus Left.png-2949c2879ed5f5e8def57f2eb1498de4.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 diff --git a/Assets/Sprites/Jesus/Jesus Spritesheet.png b/Assets/Sprites/Jesus/Jesus Spritesheet.png new file mode 100644 index 0000000000000000000000000000000000000000..3d67761e0ea3f162fe9265323c092315313bd96b GIT binary patch literal 7347 zcmeI0`6E0RA&r zV_TM`0|0~!gR;&R*Hp?_1`=#*W(d6Mk(dVn3Ewlu26i`Gm!BFWUNy;#&++!Z*>9;S z3oB_1)J%r;cw%G%9bt|A&8GF$=hfA0kGk|Ji}+ac7(9OL8+|vU2uh>MA3dw`!ob*T z_N6mSwl+B5*2u%&<2^}q>%F#MplnalZo_;}SA>7-{{AfKz}DL*54M)SOG^;hNpJ?2 z|2IIwAq*hqqQCu<%noo&L%0B#4*<{5Cc;R=pGrLNV3!t0c ziSJV50n@RwnI5$eIlVz{IohVMx0x+k9)IBn_0nCS6 zEso-W0P(uKH(fCpAZF~uzdpqTfG^lSvf~T@D6I2)`L;rUihH>-ue%_?|CSHv6DDsd z>xXO3em$;v+7IpN_eN=7f-qPxPH|8$Xgxo~!(&1ku8T-hKow6-%$(_$d%z9UT~x?G z6blb2;?(B~p%mj-6?KIL3lu&HZn<7MFNIpq4TH~{6!DPL^U{%nyzmqg4GSr10M=tb zg50U%;!xZ#F3mW-{blaLjm^A@Ofw~k5}9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3& zGdbjiF`j*@G4VH^qioIt^5y@j*dOwcwGfxW@h-6gV@~5~Q)v3Xv3SSb*ivH=gi%*x z5;XemnKUSVCjOr8jne&^(b}7RzDB1Go*p6VL5;cF7p*w#UzR168{m`7iTy3^DvSxz zw3p+-&#SHue6a9c#ygpwJGxk&vnTARsPA~)k=1vhDG=miN_vpRM(8+IzU9`&CV%MY zMLU!ZEF3?elQFK}OU>1i+b)!5Ww(h!Va z`yUJBC`z&$@*^#D@{jb-z}1%3OBW!CCX%WkQiB2!l((1c;YP=*=HIDn=@biy;Hb_ie*}v=dmQ80Uk>H2$hGVAD-a?FJkiLDsbur0Ohpp!4xd2t0u^QCe{(3G zg~7K-?PV8tuJSy&aA{@;Ncve~{|W9!Eek5j6p;j`%C<+@!JfP#mN;Lz)%jR@x|+21 zuto#SXECrP`J3mvV;J+mD!#UkNuCb|hW&jgvJD#N`Obw9tX-SqL}w!kGbq6|4uHJx z+F?kbzqjju>7z~OKo!YfA}KfBwO*E0GYl9F0kq!?|FodZl{t``>-S=(1#$cQUlLB` zgz&0-xrv`H9gP@5(PA3f)>M*b*7Ak*r^R?3%c>o;`%Crqr`#q~{+#@Smpr2B+R;mU zUW*T&d9PjVF-DyYn7NRCY5tAY7AVJB-C&;-ecC5n!=p}EA#*W literal 0 HcmV?d00001 diff --git a/Assets/Sprites/Jesus/Shadow.png.import b/Assets/Sprites/Jesus/Shadow.png.import new file mode 100644 index 0000000..dbfe369 --- /dev/null +++ b/Assets/Sprites/Jesus/Shadow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cubc3m81pdyvq" +path="res://.godot/imported/Shadow.png-e182ddfbb5e0bd7753fe3ec1e6b362c7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/Jesus/Shadow.png" +dest_files=["res://.godot/imported/Shadow.png-e182ddfbb5e0bd7753fe3ec1e6b362c7.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 diff --git a/Scenes/PlayerMovement.tscn b/Scenes/PlayerMovement.tscn index ac57954..d13fce9 100644 --- a/Scenes/PlayerMovement.tscn +++ b/Scenes/PlayerMovement.tscn @@ -1,35 +1,151 @@ -[gd_scene load_steps=5 format=3 uid="uid://ccgpsim5nfxd6"] +[gd_scene load_steps=12 format=3 uid="uid://ccgpsim5nfxd6"] [ext_resource type="Script" path="res://Scripts/PlayerController.gd" id="1_x3102"] -[ext_resource type="Texture2D" uid="uid://c6n0go8l4gaak" path="res://Assets/Sprites/Jesus_Left_Idle.png" id="2_48vut"] [ext_resource type="TileSet" uid="uid://b7cqbf6xdbeal" path="res://Assets/Test_Tileset.tres" id="3_0at2g"] [ext_resource type="Script" path="res://Scripts/MapGenerator.gd" id="4_8st0q"] +[ext_resource type="Texture2D" uid="uid://bl7vfn05ul1vu" path="res://Assets/Sprites/Jesus/Jesus Spritesheet.png" id="4_e5cec"] -[node name="Node2D" type="Node2D"] +[sub_resource type="Animation" id="Animation_kdxam"] +resource_name = "Idle" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Player Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} -[node name="TileMap" type="TileMap" parent="."] +[sub_resource type="Animation" id="Animation_dwpep"] +resource_name = "MoveDown" +length = 0.8 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Player Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2, 0.4, 0.6), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3] +} + +[sub_resource type="Animation" id="Animation_2jvl5"] +resource_name = "MoveLeft" +length = 0.8 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Player Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2, 0.4, 0.6), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [12, 13, 14, 15] +} + +[sub_resource type="Animation" id="Animation_4ig1u"] +resource_name = "MoveRight" +length = 0.8 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Player Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2, 0.4, 0.6), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [4, 5, 6, 7] +} + +[sub_resource type="Animation" id="Animation_pswkh"] +resource_name = "MoveUp" +length = 0.8 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Player Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2, 0.4, 0.6), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [8, 9, 10, 11] +} + +[sub_resource type="Animation" id="Animation_o3hln"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Player Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_bi1h3"] +_data = { +"Idle": SubResource("Animation_kdxam"), +"MoveDown": SubResource("Animation_dwpep"), +"MoveLeft": SubResource("Animation_2jvl5"), +"MoveRight": SubResource("Animation_4ig1u"), +"MoveUp": SubResource("Animation_pswkh"), +"RESET": SubResource("Animation_o3hln") +} + +[node name="Player Movement" type="Node2D"] + +[node name="Map Generator" type="TileMap" parent="."] tile_set = ExtResource("3_0at2g") cell_quadrant_size = 8 collision_visibility_mode = 1 format = 2 script = ExtResource("4_8st0q") -[node name="CharacterBody2D" type="CharacterBody2D" parent="."] +[node name="Player" type="CharacterBody2D" parent="." node_paths=PackedStringArray("animation_player")] position = Vector2(512, 300) scale = Vector2(0.25, 0.25) script = ExtResource("1_x3102") -speed = 80 +animation_player = NodePath("Player Animator") -[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"] -texture = ExtResource("2_48vut") +[node name="Player Sprite" type="Sprite2D" parent="Player"] +position = Vector2(0, -20) +texture = ExtResource("4_e5cec") +hframes = 4 +vframes = 4 -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="CharacterBody2D"] -polygon = PackedVector2Array(16, 32, -14, 32, -14, -22, 16, -22) +[node name="Player Collider" type="CollisionPolygon2D" parent="Player"] +polygon = PackedVector2Array(12, 32, -16, 32, -16, -24, 12, -24) -[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"] +[node name="Player Camera" type="Camera2D" parent="Player"] zoom = Vector2(10, 10) position_smoothing_enabled = true drag_horizontal_enabled = true drag_vertical_enabled = true editor_draw_limits = true editor_draw_drag_margin = true + +[node name="Player Animator" type="AnimationPlayer" parent="Player"] +libraries = { +"": SubResource("AnimationLibrary_bi1h3") +} diff --git a/Scripts/PlayerController.gd b/Scripts/PlayerController.gd index f167eb8..9706185 100644 --- a/Scripts/PlayerController.gd +++ b/Scripts/PlayerController.gd @@ -1,24 +1,50 @@ extends CharacterBody2D -@export var speed = 100 -@export_range(0, 1) var damping_factor := 0.6 +# Serialized Variables +@export var speed = 20 +@export_range(0, 1) var dampning_function = 0.6 +@export var animation_player : AnimationPlayer + +# Engine Callbacks +func _physics_process(delta : float): + move_player(delta) + pass + + + +# Getting player input into a vector func get_move_vector(): var input_direction = Input.get_vector("move_left", "move_right", "move_up", "move_down").normalized() return input_direction + + +# Calculates the players velocity based on input and moves it func move_player(delta : float): + # Damp Players Velocity if no Input if get_move_vector() == Vector2.ZERO: - # Damp Players Velocity if no Input - self.velocity = self.velocity * (1 - min(1, damping_factor * 60 * delta)) + self.velocity = self.velocity * (1 - min(1, dampning_function * 60 * delta)) + + # Set Player's velocity to the Input direction with a magnitude of Speed synced with frame rate else: - # Set Players Velocity to the Input Direction in the Players Speed - self.velocity = get_move_vector() * speed * delta * 60 - - # Update The Players Physics Calculations + self.velocity = get_move_vector().normalized() * speed * delta * 60 + + # Animate the player + animate_player_movement() + + # Finally, update the Player's physics calculations self.move_and_slide() pass -func _physics_process(delta : float): - move_player(delta) - pass + + +func animate_player_movement(): + var move_vector = get_move_vector() + match move_vector: + Vector2.ZERO: animation_player.play("Idle") + Vector2.LEFT: animation_player.play("MoveLeft") + Vector2.RIGHT: animation_player.play("MoveRight") + Vector2.UP: animation_player.play("MoveUp") + Vector2.DOWN: animation_player.play("MoveDown") + _: animation_player.play("Idle") diff --git a/project.godot b/project.godot index 148a2ef..5397ca5 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="HoppyEaster" -run/main_scene="res://Scenes/Movement.tscn" +run/main_scene="res://Scenes/PlayerMovement.tscn" config/features=PackedStringArray("4.0", "GL Compatibility") config/icon="res://icon.svg" From e833b82dd4036dee73f945da20dc8ee0cba9cad9 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Fri, 7 Apr 2023 19:52:50 +0200 Subject: [PATCH 2/4] Cleanup of Code --- Scripts/PlayerController.gd | 39 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/Scripts/PlayerController.gd b/Scripts/PlayerController.gd index 9706185..310a71a 100644 --- a/Scripts/PlayerController.gd +++ b/Scripts/PlayerController.gd @@ -1,46 +1,32 @@ extends CharacterBody2D -# Serialized Variables @export var speed = 20 -@export_range(0, 1) var dampning_function = 0.6 +@export_range(0, 1) var damping_factor = 0.6 @export var animation_player : AnimationPlayer - -# Engine Callbacks func _physics_process(delta : float): - move_player(delta) + update_player_movement(delta) pass - - -# Getting player input into a vector -func get_move_vector(): +func get_move_input_vector() -> Vector2: var input_direction = Input.get_vector("move_left", "move_right", "move_up", "move_down").normalized() return input_direction - - -# Calculates the players velocity based on input and moves it -func move_player(delta : float): - # Damp Players Velocity if no Input - if get_move_vector() == Vector2.ZERO: - self.velocity = self.velocity * (1 - min(1, dampning_function * 60 * delta)) +func update_player_movement(delta : float): + var input = get_move_input_vector() - # Set Player's velocity to the Input direction with a magnitude of Speed synced with frame rate - else: - self.velocity = get_move_vector().normalized() * speed * delta * 60 + # Damp Movement if not moving, Accelerate if Moving + var is_moving = input != Vector2.ZERO + self.velocity = input * speed * delta * 60 if is_moving else self.velocity * (1 - min(1, damping_factor * 60 * delta)) - # Animate the player - animate_player_movement() + update_player_animation() - # Finally, update the Player's physics calculations + # Update Objects Physics calculations self.move_and_slide() pass - - -func animate_player_movement(): - var move_vector = get_move_vector() +func update_player_animation(): + var move_vector = get_move_input_vector() match move_vector: Vector2.ZERO: animation_player.play("Idle") Vector2.LEFT: animation_player.play("MoveLeft") @@ -48,3 +34,4 @@ func animate_player_movement(): Vector2.UP: animation_player.play("MoveUp") Vector2.DOWN: animation_player.play("MoveDown") _: animation_player.play("Idle") + pass From b1e63481fe1a3f8d809a4d6f66cf19f530821f50 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Fri, 7 Apr 2023 19:55:29 +0200 Subject: [PATCH 3/4] Remove no longer needed file --- Assets/Sprites/Jesus_Left_Idle.png | Bin 641 -> 0 bytes Assets/Sprites/Jesus_Left_Idle.png.import | 34 ---------------------- 2 files changed, 34 deletions(-) delete mode 100644 Assets/Sprites/Jesus_Left_Idle.png delete mode 100644 Assets/Sprites/Jesus_Left_Idle.png.import diff --git a/Assets/Sprites/Jesus_Left_Idle.png b/Assets/Sprites/Jesus_Left_Idle.png deleted file mode 100644 index 4082dd7546dc404958a4d14a2c48f6658d2894b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 641 zcmV-{0)G98P)q+JLb0HuLPZfpq;o-(x=KeW)KNi1M<*Qw z7dID`%0Em=(t$c}^n?xXJ zQ5!OSHWN}|BHk4OCUm6)BII%;Y!=QfrM0o;vl@v|P<(zD7&GmC96E(EAaOIft{BOAd*PtgHJ?z7k3_9 zLxTg_$*|`<3Y>feqCu~|rdhpSZ^EUD?J%LL_97-0H~ss=`4(#NAowN}Jpg4e4G=R? zk>CVPNTpJ(HGBnl-G5`oh1yTYt7X_@rHUTcV#1Z6C@`MQXyY&>Knaowbw;uU%oq7y zfF_{I-Xt@W$5bLR0atKNAV>)m0h9SCpPV%TmuPFnr9zgK3e3+I(?-KUOM&&(Wv2`2 zd|-Vd5^*>+f{Ife+*<^8j!&7~io@=FfVuu#H32NRl%o67`2$qbVGwgtY>0NJRX bZDYRybItKwhRaT>00000NkvXXu0mjf7-bZy diff --git a/Assets/Sprites/Jesus_Left_Idle.png.import b/Assets/Sprites/Jesus_Left_Idle.png.import deleted file mode 100644 index 7e997b4..0000000 --- a/Assets/Sprites/Jesus_Left_Idle.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://c6n0go8l4gaak" -path="res://.godot/imported/Jesus_Left_Idle.png-591d029c8d8b8b573a2665b70cf0e031.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Assets/Sprites/Jesus_Left_Idle.png" -dest_files=["res://.godot/imported/Jesus_Left_Idle.png-591d029c8d8b8b573a2665b70cf0e031.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 From 8e03e10593322f75997399a1149600b84368b43b Mon Sep 17 00:00:00 2001 From: AXVIII3 <76608488+AXVIII3@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:02:56 +0530 Subject: [PATCH 4/4] Diagonal Movement Fix and Textures --- Scripts/PlayerController.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Scripts/PlayerController.gd b/Scripts/PlayerController.gd index 310a71a..584f977 100644 --- a/Scripts/PlayerController.gd +++ b/Scripts/PlayerController.gd @@ -33,5 +33,11 @@ func update_player_animation(): Vector2.RIGHT: animation_player.play("MoveRight") Vector2.UP: animation_player.play("MoveUp") Vector2.DOWN: animation_player.play("MoveDown") - _: animation_player.play("Idle") + _: handle_diagonal_animations(move_vector) + pass + +func handle_diagonal_animations(dir : Vector2): + if (dir.y > 0 and dir.x < 0) or (dir.y < 0 and dir.x < 0): animation_player.play("MoveLeft") + elif (dir.y > 0 and dir.x > 0) or (dir.y < 0 and dir.x > 0): animation_player.play("MoveRight") + else: animation_player.play("Idle") pass