ignore this commit naming because it isn't real and cannot hurt you

This commit is contained in:
Jan van der Weide 2025-03-19 13:03:31 +01:00
parent 4da7e28cb5
commit e7cf1d3b95
19 changed files with 547 additions and 416 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ config.log
.sconf_temp .sconf_temp
engine/.github engine/.github
builds

View file

@ -1,10 +1,11 @@
build: build:
cd engine/ && scons target=editor symbols=yes optimization=debug dev_build=yes linker=mold use_llvm=yes compiledb=yes cd engine/ && scons target=editor symbols=yes optimization=debug dev_build=yes linker=mold use_llvm=yes compiledb=yes
run: build build-release:
engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --editor --path project cd engine/ && scons target=template_release
initialize-template projectname: run-editor: build
sed -i -e "s/PROJECT/{{projectname}}/g" ./engine/modules/PROJECT/register_types.h ./engine/modules/PROJECT/register_types.cpp ./project/project.godot engine/bin/godot.*.editor.dev.*.llvm --editor --path project
mv ./engine/modules/PROJECT ./engine/modules/{{projectname}}
run-game: build
engine/bin/godot.*.editor.dev.*.llvm --path project

1
project/coin/coin.gd.uid Normal file
View file

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

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=11 format=3 uid="uid://6uilf6rad880"] [gd_scene load_steps=11 format=3 uid="uid://6uilf6rad880"]
[ext_resource type="Script" path="res://coin/coin.gd" id="1"] [ext_resource type="Script" uid="uid://blm3ff6od7ov" path="res://coin/coin.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://bio1crwbvrmc2" path="res://coin/coin.png" id="2"] [ext_resource type="Texture2D" uid="uid://bio1crwbvrmc2" path="res://coin/coin.png" id="2"]
[ext_resource type="AudioStream" uid="uid://cy7lxrapbqu1r" path="res://audio/sound_coin.wav" id="3"] [ext_resource type="AudioStream" uid="uid://cy7lxrapbqu1r" path="res://audio/sound_coin.wav" id="3"]
[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="4"] [ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="4"]
@ -91,8 +91,8 @@ tracks/4/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_4atuj"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_4atuj"]
_data = { _data = {
"spin": SubResource("1"), &"spin": SubResource("1"),
"taken": SubResource("2") &"taken": SubResource("2")
} }
[sub_resource type="CircleShape2D" id="3"] [sub_resource type="CircleShape2D" id="3"]

View file

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

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=14 format=3 uid="uid://daqqtote00syu"] [gd_scene load_steps=14 format=3 uid="uid://daqqtote00syu"]
[ext_resource type="Script" path="res://enemy/enemy.gd" id="1_hjwkx"] [ext_resource type="Script" uid="uid://c0sd74o2db7vf" path="res://enemy/enemy.gd" id="1_hjwkx"]
[ext_resource type="Texture2D" uid="uid://crrmmbu8k46tl" path="res://enemy/enemy.png" id="2_org2d"] [ext_resource type="Texture2D" uid="uid://crrmmbu8k46tl" path="res://enemy/enemy.png" id="2_org2d"]
[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="3_7unrb"] [ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="3_7unrb"]
[ext_resource type="AudioStream" uid="uid://cfssio7r2t7wq" path="res://audio/sound_hit.wav" id="4_5rkwm"] [ext_resource type="AudioStream" uid="uid://cfssio7r2t7wq" path="res://audio/sound_hit.wav" id="4_5rkwm"]
@ -129,10 +129,10 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ay0tp"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_ay0tp"]
_data = { _data = {
"RESET": SubResource("Animation_a7qal"), &"RESET": SubResource("Animation_a7qal"),
"explode": SubResource("2"), &"explode": SubResource("2"),
"idle": SubResource("3"), &"idle": SubResource("3"),
"walk": SubResource("4") &"walk": SubResource("4")
} }
[sub_resource type="CircleShape2D" id="5"] [sub_resource type="CircleShape2D" id="5"]

View file

@ -0,0 +1,66 @@
[preset.0]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../Physics-Based Platformer 2D.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"

339
project/level.tscn Normal file

File diff suppressed because one or more lines are too long

View file

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

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://dlfwkokoudcwv"] [gd_scene load_steps=7 format=3 uid="uid://dlfwkokoudcwv"]
[ext_resource type="Script" path="res://player/bullet.gd" id="1"] [ext_resource type="Script" uid="uid://c1urgusujdgrc" path="res://player/bullet.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="2"] [ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="2"]
[sub_resource type="CanvasItemMaterial" id="1"] [sub_resource type="CanvasItemMaterial" id="1"]
@ -52,7 +52,7 @@ tracks/2/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hkd2b"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_hkd2b"]
_data = { _data = {
"shutdown": SubResource("3") &"shutdown": SubResource("3")
} }
[node name="Bullet" type="RigidBody2D"] [node name="Bullet" type="RigidBody2D"]

View file

@ -25,6 +25,8 @@ var floor_h_velocity: float = 0.0
var airborne_time: float = 1e20 var airborne_time: float = 1e20
var shoot_time: float = 1e20 var shoot_time: float = 1e20
@export var player_number: int
@onready var sound_jump := $SoundJump as AudioStreamPlayer2D @onready var sound_jump := $SoundJump as AudioStreamPlayer2D
@onready var sound_shoot := $SoundShoot as AudioStreamPlayer2D @onready var sound_shoot := $SoundShoot as AudioStreamPlayer2D
@onready var sprite := $Sprite2D as Sprite2D @onready var sprite := $Sprite2D as Sprite2D
@ -41,14 +43,10 @@ func _integrate_forces(state: PhysicsDirectBodyState2D) -> void:
var new_siding_left := siding_left var new_siding_left := siding_left
# Get player input. # Get player input.
var move_left := Input.is_action_pressed(&"move_left") var move_left := Input.is_action_pressed(&"move_left_%d" % player_number)
var move_right := Input.is_action_pressed(&"move_right") var move_right := Input.is_action_pressed(&"move_right_%d" % player_number)
var jump := Input.is_action_pressed(&"jump") var jump := Input.is_action_pressed(&"jump_%d" % player_number)
var shoot := Input.is_action_pressed(&"shoot") var shoot := Input.is_action_pressed(&"shoot_%d" % player_number)
var spawn := Input.is_action_just_pressed(&"spawn")
if spawn:
_spawn_enemy_above.call_deferred()
# Deapply prev floor velocity. # Deapply prev floor velocity.
velocity.x -= floor_h_velocity velocity.x -= floor_h_velocity

View file

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

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=20 format=3 uid="uid://bbxsp4gp554vh"] [gd_scene load_steps=20 format=3 uid="uid://bbxsp4gp554vh"]
[ext_resource type="Script" path="res://player/player.gd" id="1"] [ext_resource type="Script" uid="uid://v2qm1uhymhi1" path="res://player/player.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://dh57uloeigwj6" path="res://player/player.webp" id="2_675nc"] [ext_resource type="Texture2D" uid="uid://dh57uloeigwj6" path="res://player/player.webp" id="2_675nc"]
[ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="3"] [ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="3"]
[ext_resource type="AudioStream" uid="uid://gw2a4ii0oby2" path="res://audio/sound_shoot.wav" id="8"] [ext_resource type="AudioStream" uid="uid://gw2a4ii0oby2" path="res://audio/sound_shoot.wav" id="8"]
@ -178,16 +178,16 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_30623"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_30623"]
_data = { _data = {
"crouch": SubResource("3"), &"crouch": SubResource("3"),
"falling": SubResource("4"), &"falling": SubResource("4"),
"falling_weapon": SubResource("5"), &"falling_weapon": SubResource("5"),
"idle": SubResource("6"), &"idle": SubResource("6"),
"idle_weapon": SubResource("7"), &"idle_weapon": SubResource("7"),
"jumping": SubResource("8"), &"jumping": SubResource("8"),
"jumping_weapon": SubResource("9"), &"jumping_weapon": SubResource("9"),
"run": SubResource("10"), &"run": SubResource("10"),
"run_weapon": SubResource("11"), &"run_weapon": SubResource("11"),
"standing_weapon_ready": SubResource("12") &"standing_weapon_ready": SubResource("12")
} }
[sub_resource type="SeparationRayShape2D" id="13"] [sub_resource type="SeparationRayShape2D" id="13"]
@ -199,8 +199,8 @@ mass = 1.5
physics_material_override = SubResource("1") physics_material_override = SubResource("1")
lock_rotation = true lock_rotation = true
custom_integrator = true custom_integrator = true
max_contacts_reported = 4
contact_monitor = true contact_monitor = true
max_contacts_reported = 4
script = ExtResource("1") script = ExtResource("1")
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
@ -214,24 +214,19 @@ self_modulate = Color(1, 1, 1, 0.26702)
position = Vector2(10, 1.5) position = Vector2(10, 1.5)
rotation = -1.45648 rotation = -1.45648
emitting = false emitting = false
texture = ExtResource("3")
lifetime = 0.3 lifetime = 0.3
one_shot = true one_shot = true
explosiveness = 1.0 explosiveness = 1.0
texture = ExtResource("3")
spread = 65.84 spread = 65.84
gravity = Vector2(0, -15) gravity = Vector2(0, -15)
color_ramp = SubResource("2") color_ramp = SubResource("2")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
"": SubResource("AnimationLibrary_30623") &"": SubResource("AnimationLibrary_30623")
} }
[node name="Camera2D" type="Camera2D" parent="."]
zoom = Vector2(2, 2)
limit_left = 0
limit_top = 0
[node name="BulletShoot" type="Marker2D" parent="."] [node name="BulletShoot" type="Marker2D" parent="."]
position = Vector2(15, 2) position = Vector2(15, 2)

View file

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://4dckerlybom4"]
[ext_resource type="Script" uid="uid://cbboxhq703t1l" path="res://window.gd" id="1_j7b7i"]
[node name="Window" type="Window"]
auto_translate_mode = 1
position = Vector2i(0, 36)
script = ExtResource("1_j7b7i")

View file

@ -17,13 +17,15 @@ but can be more difficult to handle, as they require
manual modification of the RigidBody3D velocity." manual modification of the RigidBody3D velocity."
config/tags=PackedStringArray("2d", "demo", "official", "physics", "tilemap") config/tags=PackedStringArray("2d", "demo", "official", "physics", "tilemap")
run/main_scene="res://stage.tscn" run/main_scene="res://stage.tscn"
config/features=PackedStringArray("4.3") config/features=PackedStringArray("4.4")
config/icon="res://icon.webp" config/icon="res://icon.webp"
[display] [display]
window/size/viewport_width=800 window/size/viewport_width=800
window/size/viewport_height=480 window/size/viewport_height=480
window/size/resizable=false
window/subwindows/embed_subwindows=false
window/stretch/mode="canvas_items" window/stretch/mode="canvas_items"
window/stretch/aspect="keep_height" window/stretch/aspect="keep_height"
window/stretch/scale_mode="integer" window/stretch/scale_mode="integer"
@ -53,41 +55,44 @@ texture={
[input] [input]
jump={ jump_1={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
] ]
} }
move_left={ move_left_1={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
] ]
} }
move_right={ move_right_1={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
] ]
} }
shoot={ shoot_1={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":7,"pressure":0.0,"pressed":false,"script":null)
] ]
} }
spawn={ jump_2={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":false,"script":null) ]
}
move_left_2={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_right_2={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
shoot_2={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
] ]
} }

File diff suppressed because one or more lines are too long

View file

@ -1,11 +1,11 @@
[gd_scene load_steps=2 format=2] [gd_scene load_steps=2 format=3 uid="uid://d087bijl7cw33"]
[ext_resource path="res://tiles_demo.png" type="Texture2D" id=1] [ext_resource type="Texture2D" uid="uid://dbcdt0wqr3gd3" path="res://tiles_demo.png" id="1"]
[node name="TilesetEdit" type="Node2D"] [node name="TilesetEdit" type="Node2D"]
[node name="Floor" type="Sprite2D" parent="."] [node name="Floor" type="Sprite2D" parent="."]
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(0, 0, 32, 32) region_rect = Rect2(0, 0, 32, 32)
[node name="Collision" type="StaticBody2D" parent="Floor"] [node name="Collision" type="StaticBody2D" parent="Floor"]
@ -15,7 +15,7 @@ polygon = PackedVector2Array(16, -12, 16, 16, -16, 16, -16, -12)
[node name="Edge" type="Sprite2D" parent="."] [node name="Edge" type="Sprite2D" parent="."]
position = Vector2(32, 0) position = Vector2(32, 0)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(32, 0, 32, 32) region_rect = Rect2(32, 0, 32, 32)
[node name="Collision" type="StaticBody2D" parent="Edge"] [node name="Collision" type="StaticBody2D" parent="Edge"]
@ -25,7 +25,7 @@ polygon = PackedVector2Array(-16, -12, 12, -12, 12, 16, -16, 16)
[node name="Wall" type="Sprite2D" parent="."] [node name="Wall" type="Sprite2D" parent="."]
position = Vector2(32, 32) position = Vector2(32, 32)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(32, 32, 32, 32) region_rect = Rect2(32, 32, 32, 32)
[node name="Collision" type="StaticBody2D" parent="Wall"] [node name="Collision" type="StaticBody2D" parent="Wall"]
@ -35,7 +35,7 @@ polygon = PackedVector2Array(-16, -16, 12, -16, 12, 16, -16, 16)
[node name="WallDeco" type="Sprite2D" parent="."] [node name="WallDeco" type="Sprite2D" parent="."]
position = Vector2(48, 64) position = Vector2(48, 64)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(160, 64, 64, 32) region_rect = Rect2(160, 64, 64, 32)
[node name="Collision" type="StaticBody2D" parent="WallDeco"] [node name="Collision" type="StaticBody2D" parent="WallDeco"]
@ -45,7 +45,7 @@ polygon = PackedVector2Array(-32, -16, -4, -16, -4, 16, -32, 16)
[node name="Corner" type="Sprite2D" parent="."] [node name="Corner" type="Sprite2D" parent="."]
position = Vector2(32, 96) position = Vector2(32, 96)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(32, 64, 32, 32) region_rect = Rect2(32, 64, 32, 32)
[node name="Collision" type="StaticBody2D" parent="Corner"] [node name="Collision" type="StaticBody2D" parent="Corner"]
@ -55,7 +55,7 @@ polygon = PackedVector2Array(-16, -16, 12, -16, 16, -12, 16, 16, -16, 16)
[node name="Flowers" type="Sprite2D" parent="."] [node name="Flowers" type="Sprite2D" parent="."]
position = Vector2(64, 96) position = Vector2(64, 96)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(96, 96, 32, 32) region_rect = Rect2(96, 96, 32, 32)
[node name="Collision" type="StaticBody2D" parent="Flowers"] [node name="Collision" type="StaticBody2D" parent="Flowers"]
@ -65,7 +65,7 @@ polygon = PackedVector2Array(-16, 16, 16, 16, 16, -12, -16, -12)
[node name="TreeBase" type="Sprite2D" parent="."] [node name="TreeBase" type="Sprite2D" parent="."]
position = Vector2(96, 96) position = Vector2(96, 96)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(128, 96, 32, 32) region_rect = Rect2(128, 96, 32, 32)
[node name="Collision" type="StaticBody2D" parent="TreeBase"] [node name="Collision" type="StaticBody2D" parent="TreeBase"]
@ -75,27 +75,27 @@ polygon = PackedVector2Array(-16, 16, 16, 16, 16, -12, -16, -12)
[node name="TreeMid" type="Sprite2D" parent="."] [node name="TreeMid" type="Sprite2D" parent="."]
position = Vector2(96, 64) position = Vector2(96, 64)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(128, 64, 32, 32) region_rect = Rect2(128, 64, 32, 32)
[node name="TreeMid2" type="Sprite2D" parent="."] [node name="TreeMid2" type="Sprite2D" parent="."]
position = Vector2(96, 32) position = Vector2(96, 32)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(128, 32, 32, 32) region_rect = Rect2(128, 32, 32, 32)
[node name="TreeTop" type="Sprite2D" parent="."] [node name="TreeTop" type="Sprite2D" parent="."]
position = Vector2(96, 0) position = Vector2(96, 0)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(128, 0, 32, 32) region_rect = Rect2(128, 0, 32, 32)
[node name="Solid" type="Sprite2D" parent="."] [node name="Solid" type="Sprite2D" parent="."]
position = Vector2(0, 32) position = Vector2(0, 32)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(0, 32, 32, 32) region_rect = Rect2(0, 32, 32, 32)
[node name="Ceiling" type="Sprite2D" parent="."] [node name="Ceiling" type="Sprite2D" parent="."]
position = Vector2(0, 64) position = Vector2(0, 64)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(192, 32, 32, 32) region_rect = Rect2(192, 32, 32, 32)
[node name="Collision" type="StaticBody2D" parent="Ceiling"] [node name="Collision" type="StaticBody2D" parent="Ceiling"]
@ -105,7 +105,7 @@ polygon = PackedVector2Array(16, -16, 16, 16, -16, 16, -16, -16)
[node name="Ramp" type="Sprite2D" parent="."] [node name="Ramp" type="Sprite2D" parent="."]
position = Vector2(128, 112) position = Vector2(128, 112)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(64, 64, 32, 64) region_rect = Rect2(64, 64, 32, 64)
[node name="Collision" type="StaticBody2D" parent="Ramp"] [node name="Collision" type="StaticBody2D" parent="Ramp"]
@ -115,7 +115,7 @@ polygon = PackedVector2Array(-16, -28, 16, 4, 16, 32, -16, 32)
[node name="CeilingWall" type="Sprite2D" parent="."] [node name="CeilingWall" type="Sprite2D" parent="."]
position = Vector2(0, 96) position = Vector2(0, 96)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(224, 32, 32, 32) region_rect = Rect2(224, 32, 32, 32)
[node name="Collision" type="StaticBody2D" parent="CeilingWall"] [node name="Collision" type="StaticBody2D" parent="CeilingWall"]
@ -125,7 +125,7 @@ polygon = PackedVector2Array(-16, -16, 12, -16, 12, 16, -16, 16)
[node name="PlatformFloor" type="Sprite2D" parent="."] [node name="PlatformFloor" type="Sprite2D" parent="."]
position = Vector2(0, 128) position = Vector2(0, 128)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(64, 0, 32, 32) region_rect = Rect2(64, 0, 32, 32)
[node name="Collision" type="StaticBody2D" parent="PlatformFloor"] [node name="Collision" type="StaticBody2D" parent="PlatformFloor"]
@ -135,7 +135,7 @@ polygon = PackedVector2Array(16, -12, 16, 12, -16, 12, -16, -12)
[node name="PlatformEdge" type="Sprite2D" parent="."] [node name="PlatformEdge" type="Sprite2D" parent="."]
position = Vector2(32, 128) position = Vector2(32, 128)
texture = ExtResource( 1 ) texture = ExtResource("1")
region_rect = Rect2(96, 0, 32, 32) region_rect = Rect2(96, 0, 32, 32)
[node name="Collision" type="StaticBody2D" parent="PlatformEdge"] [node name="Collision" type="StaticBody2D" parent="PlatformEdge"]

12
project/window.gd Normal file
View file

@ -0,0 +1,12 @@
extends Window
@export var player: RigidBody2D
@onready var camera: Camera2D = get_node("Camera2D")
func _ready() -> void:
var world = get_node("../Level").find_world_2d()
world_2d = world
func _process(delta: float) -> void:
camera.position = player.position

1
project/window.gd.uid Normal file
View file

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