This commit is contained in:
Debugman committed 2026-10-16 21:37:07 -05:00
1 parent e808431fc2
commit e440224fd8
10 files changed
+89 -17

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+43
View File
@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpdxs6gjmexgh"
path="res://.godot/imported/background.png-694afb2807fe739c9f0954541e14cf0b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/background.png"
dest_files=["res://.godot/imported/background.png-694afb2807fe739c9f0954541e14cf0b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/high_quality_mode=0
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
mipmaps/preserve_alpha_test_coverage=false
mipmaps/alpha_test_threshold=0.5
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 441 B

+1 -1
View File
@@ -40,4 +40,4 @@ 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
detect_3d/compress_to=0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 450 B

+1 -1
View File
@@ -40,4 +40,4 @@ 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
detect_3d/compress_to=0
+29 -9
View File
@@ -1,20 +1,31 @@
extends CharacterBody2D
const SPEED = 400.0
const SPEED = 380.0
const GRAVITY_MULT = 0.8
const JUMP_VELOCITY = -410.0
const CAMERA_SMOOTHING_SPEED = 0.5
var fall_timer = 0.0
var teleport_cooldown = 0
var jumps = 0
var death_threshold = 1000
func _ready() -> void:
pass
func refresh_jump(new_jumps):
if jumps:
jumps = new_jumps
else:
jumps = 1
teleport_cooldown = 0
func on_teleport():
refresh_jump(1)
teleport_cooldown = 1
$Camera2D.position_smoothing_enabled = true
func _process(delta: float) -> void:
if Input.is_action_just_pressed("jump"):
if is_on_floor():
@@ -38,19 +49,28 @@ func _process(delta: float) -> void:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
print("PLAYER X POSITION: " + str(position.y))
if position.y >= death_threshold:
print("SLASH KILL")
get_tree().reload_current_scene()
fall_timer += 1*delta
if is_on_floor():
fall_timer = 0
jumps = 1
teleport_cooldown = 0
refresh_jump(1)
#%Player2D.get_node("Camera2D").position_smoothing_speed = %Player2D.CAMERA_SMOOTHING_SPEED
if is_on_wall():
jumps = 1
teleport_cooldown = 0
refresh_jump(1)
#%Player2D.get_node("Camera2D").position_smoothing_speed = %Player2D.CAMERA_SMOOTHING_SPEED
if fall_timer>3:
get_tree().reload_current_scene()
if is_on_ceiling():
refresh_jump(1)
if fall_timer > 3:
pass
#get_tree().reload_current_scene()
func _physics_process(delta: float) -> void:
+11 -1
View File
@@ -2,6 +2,7 @@
[ext_resource type="Script" uid="uid://cojhnj15psd2x" path="res://player_2d.gd" id="1_sy00s"]
[ext_resource type="Texture2D" uid="uid://ccxq1fh72bsdk" path="res://art/player.png" id="2_p3026"]
[ext_resource type="Texture2D" uid="uid://dpdxs6gjmexgh" path="res://art/background.png" id="3_p3026"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fj7yv"]
size = Vector2(10, 16)
@@ -9,12 +10,21 @@ size = Vector2(10, 16)
[node name="Player2D" type="CharacterBody2D" unique_id=889851478]
script = ExtResource("1_sy00s")
[node name="Parallax2D" type="Parallax2D" parent="." unique_id=270393374]
repeat_size = Vector2(1, 1)
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D" unique_id=1267606565]
scale = Vector2(100, 100)
texture = ExtResource("3_p3026")
[node name="Camera2D" type="Camera2D" parent="." unique_id=962368438]
zoom = Vector2(1.65, 1.65)
process_callback = 0
position_smoothing_enabled = true
position_smoothing_speed = 0.5
position_smoothing_speed = 3.0
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=77404965]
texture_filter = 1
texture = ExtResource("2_p3026")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1294571021]
+1
View File
@@ -185,4 +185,5 @@ joypads/ignore_joypad_on_unfocused_application=true
[rendering]
rendering_device/driver.windows="d3d12"
renderer/rendering_method="gl_compatibility"
lights_and_shadows/multi_bounce_occlusion/enabled=true
+3 -5
View File
@@ -2,6 +2,7 @@ extends Node2D
@export var paired_teleporter: String
var checked_teleport
var telecam_speed_mult = 4
func _ready() -> void:
add_to_group("TELEPORTERS")
@@ -20,11 +21,8 @@ func _on_contact(body) -> void:
#print("PASSED OVER TELEPORTER")
#get_tree().call_group("TELEPORTERS","check_for_pair")
for teleporter in get_tree().get_nodes_in_group("TELEPORTERS"):
print("PAIRED" + str(teleporter) + teleporter.paired_teleporter)
print("SELF" + str(self) + teleporter.paired_teleporter)
if teleporter != self:
if teleporter.paired_teleporter == paired_teleporter and %Player2D.teleport_cooldown == 0:
%Player2D.get_node("Camera2D").position_smoothing_speed = 1
%Player2D.get_node("Camera2D").position_smoothing_enabled = false
body.set_position(teleporter.get_position())
%Player2D.teleport_cooldown = 1
%Player2D.get_node("Camera2D").position_smoothing_speed = %Player2D.CAMERA_SMOOTHING_SPEED
%Player2D.on_teleport()