From 10d9c1a45ef2425e2571e00817ba61bf96cd59e9 Mon Sep 17 00:00:00 2001 From: ChronoFrost115 Date: Sun, 3 Aug 2025 01:00:40 -0400 Subject: [PATCH 1/3] 1AM jump testing --- Scripts/player.gd | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Scripts/player.gd b/Scripts/player.gd index 14c0e80..abad471 100644 --- a/Scripts/player.gd +++ b/Scripts/player.gd @@ -176,8 +176,10 @@ func _physics_process(delta: float) -> void: velocity.x = sign(velocity.x) * SLIDE_SPEED # Keep constant speed during slide if slide_timer <= 0: #FRICTION_GROUND = 0.5 - set_player_velocity_with_ground_friction() + #set_player_velocity_with_ground_friction() is_sliding = false + velocity.x = sign(direction_vector) * MOVE_SPEED + print("speed reset") if is_on_floor(): @@ -323,3 +325,14 @@ func get_active_projectile_count() -> int: if child is BlasterShot: count += 1 return count + +#print every second +var time_accumulator := 0.0 + +func _process(delta): + time_accumulator += delta + if time_accumulator >= 0.1: + print("x: %s",velocity.x) + print("y: %s",velocity.y) + time_accumulator = 0.0 + From 7460f70cc5a463dc9974fbf21e5767c1f16d7432 Mon Sep 17 00:00:00 2001 From: ChronoFrost115 Date: Sun, 3 Aug 2025 01:16:50 -0400 Subject: [PATCH 2/3] Gravity calc fix coyote time jumps were gimped due to gravity being calculated incorrectly. --- Scenes/Game Scenes/Spawn.tscn | 2 +- Scripts/player.gd | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Scenes/Game Scenes/Spawn.tscn b/Scenes/Game Scenes/Spawn.tscn index dc2b11d..89f9096 100644 --- a/Scenes/Game Scenes/Spawn.tscn +++ b/Scenes/Game Scenes/Spawn.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=4 uid="uid://co62uqlkvifpg"] +[gd_scene load_steps=18 format=4 uid="uid://bab8q3lwp3q54"] [ext_resource type="Script" uid="uid://mtv4jj62dn53" path="res://Scripts/player.gd" id="1_t5m8g"] [ext_resource type="PackedScene" uid="uid://cixx5dbanxem1" path="res://Scenes/Scene Assets/blastershot.tscn" id="2_rxqr3"] diff --git a/Scripts/player.gd b/Scripts/player.gd index abad471..c087d2a 100644 --- a/Scripts/player.gd +++ b/Scripts/player.gd @@ -298,7 +298,6 @@ func jump() -> void: func _on_coyote_timer_timeout() -> void: jump_available = false - velocity.y += GRAVITY func cut_jump_short () -> void: velocity.y += timer.time_left * JUMP_CUT_MULTIPLIER @@ -331,8 +330,8 @@ var time_accumulator := 0.0 func _process(delta): time_accumulator += delta - if time_accumulator >= 0.1: - print("x: %s",velocity.x) - print("y: %s",velocity.y) + if time_accumulator >= 0.01 and (GRAVITY != 30): + #print("x: %s",velocity.x) + print(GRAVITY) time_accumulator = 0.0 From 99cc63b936e444f0ac5847fa64254bfd27ddf910 Mon Sep 17 00:00:00 2001 From: ChronoFrost115 Date: Sun, 3 Aug 2025 01:19:17 -0400 Subject: [PATCH 3/3] removed debug lines --- Scripts/player.gd | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Scripts/player.gd b/Scripts/player.gd index c087d2a..94d308d 100644 --- a/Scripts/player.gd +++ b/Scripts/player.gd @@ -324,14 +324,3 @@ func get_active_projectile_count() -> int: if child is BlasterShot: count += 1 return count - -#print every second -var time_accumulator := 0.0 - -func _process(delta): - time_accumulator += delta - if time_accumulator >= 0.01 and (GRAVITY != 30): - #print("x: %s",velocity.x) - print(GRAVITY) - time_accumulator = 0.0 -