diff --git a/.gitignore b/.gitignore index 50335d9..916ac9d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ export_credentials.cfg .mono/ data_*/ mono_crash.*.json + +export + diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..aa0ddd8 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,110 @@ +[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="export/Windows/test.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=true +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +shader_baker/enabled=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}'" + +[preset.1] + +name="Linux" +platform="Linux" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="export/Linux/test" +patches=PackedStringArray() +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=true +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +shader_baker/enabled=false +binary_format/architecture="x86_64" +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="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" diff --git a/game/characters/player.gd b/game/characters/player.gd new file mode 100644 index 0000000..2d0f23e --- /dev/null +++ b/game/characters/player.gd @@ -0,0 +1,105 @@ +class_name Player +extends CharacterBody2D + + +const ANIMATION_IDLE = "idle" +const ANIMATION_LOOK_AROUND_1 = "look_around_1" +const ANIMATION_LOOK_AROUND_2 = "look_around_2" +const ANIMATION_WALK_LEFT = "walk_left" +const ANIMATION_WALK_RIGHT = "walk_right" +const ANIMATION_FALL_DOWN = "fall_down" +const ANIMATION_FALL_DOWN_LEFT = "fall_down_left" +const ANIMATION_FALL_DOWN_RIGHT = "fall_down_right" +const ANIMATION_FALL_UP = "fall_up" +const ANIMATION_FALL_UP_LEFT = "fall_up_left" +const ANIMATION_FALL_UP_RIGHT = "fall_up_right" + +const LOOK_AROUND_CHANCE = 25 + + +@export_range(0.0, 1000.0) var max_speed := 160 +@export_range(0.0, 1000.0) var acceleration := 600.0 +@export_range(0.0, 1000.0) var jump_velocity := 320.0 +@export_range(0.0, 10.0) var switch_time := 1.0 + + +@onready var sprite : AnimatedSprite2D = $AnimatedSprite2D +@onready var collision_switcher : CollisionSwitcher = $CollisionSwitcher + + +func _ready() -> void: + collision_switcher.material = sprite.material + + +func _physics_process(delta: float) -> void: + if not is_on_floor(): + velocity += get_gravity() * delta + + if Input.is_action_just_pressed("jump") and is_on_floor(): + velocity.y = -jump_velocity + + var direction := Input.get_axis("move_left", "move_right") + if direction: + velocity.x = move_toward(velocity.x, direction * max_speed, acceleration * delta) + else: + velocity.x = move_toward(velocity.x, 0, acceleration * delta) + + _update_animation() + move_and_slide() + + +func _input(event: InputEvent) -> void: + if event.is_action_pressed("switch_color"): + collision_switcher.switch_color(switch_time) + + +func _update_animation() -> void: + var animation := _get_animation() + if sprite.animation != animation: + sprite.play(animation) + + +func _get_animation() -> String: + if is_on_floor(): + if velocity.x > 0: + return ANIMATION_WALK_RIGHT + elif velocity.x < 0: + return ANIMATION_WALK_LEFT + else: + if is_zero_approx(velocity.x): + if velocity.y > 0: + return ANIMATION_FALL_DOWN + else: + return ANIMATION_FALL_UP + if velocity.x > 0: + if velocity.y > 0: + return ANIMATION_FALL_DOWN_RIGHT + else: + return ANIMATION_FALL_UP_RIGHT + elif velocity.x < 0: + if velocity.y > 0: + return ANIMATION_FALL_DOWN_LEFT + else: + return ANIMATION_FALL_UP_LEFT + + if sprite.animation in [ANIMATION_LOOK_AROUND_1, ANIMATION_LOOK_AROUND_2]: + return sprite.animation + + return ANIMATION_IDLE + + +func _on_animation_finished() -> void: + match sprite.animation: + ANIMATION_LOOK_AROUND_1, ANIMATION_LOOK_AROUND_2: + sprite.play(ANIMATION_IDLE) + + +func _on_animation_looped() -> void: + match sprite.animation: + ANIMATION_IDLE: + if randi_range(1, 100) <= LOOK_AROUND_CHANCE: + _play_look_around_animation() + + +func _play_look_around_animation() -> void: + sprite.play(ANIMATION_LOOK_AROUND_1 if randi_range(1, 2) == 1 else ANIMATION_LOOK_AROUND_2) diff --git a/game/characters/player.gd.uid b/game/characters/player.gd.uid new file mode 100644 index 0000000..cec832a --- /dev/null +++ b/game/characters/player.gd.uid @@ -0,0 +1 @@ +uid://bb8kc32sggrn2 diff --git a/game/characters/player.tscn b/game/characters/player.tscn new file mode 100644 index 0000000..799d555 --- /dev/null +++ b/game/characters/player.tscn @@ -0,0 +1,323 @@ +[gd_scene load_steps=39 format=3 uid="uid://dtcad8tdx78tg"] + +[ext_resource type="Script" uid="uid://bb8kc32sggrn2" path="res://game/characters/player.gd" id="1_xln5q"] +[ext_resource type="Shader" uid="uid://lqq1mg6l1qqe" path="res://game/shaders/black_n_white.gdshader" id="2_i05k5"] +[ext_resource type="PackedScene" uid="uid://5qlocc0yu8ug" path="res://game/collision_switcher.tscn" id="2_j06tb"] +[ext_resource type="Texture2D" uid="uid://bjccaucrio6ht" path="res://images/characters/player.png" id="2_n6ad3"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_i05k5"] +shader = ExtResource("2_i05k5") +shader_parameter/black_color = Color(0, 0, 0, 1) +shader_parameter/white_color = Color(1, 1, 1, 1) +shader_parameter/switch_colors = false +shader_parameter/threshold = 0.5 +shader_parameter/speed = 5.0 +shader_parameter/intensity = 1.0 +shader_parameter/scale = 20.0 + +[sub_resource type="AtlasTexture" id="AtlasTexture_457no"] +atlas = ExtResource("2_n6ad3") +region = Rect2(128, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ly4f6"] +atlas = ExtResource("2_n6ad3") +region = Rect2(128, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_htqrf"] +atlas = ExtResource("2_n6ad3") +region = Rect2(128, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vkuli"] +atlas = ExtResource("2_n6ad3") +region = Rect2(160, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hrxdh"] +atlas = ExtResource("2_n6ad3") +region = Rect2(160, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gjv0h"] +atlas = ExtResource("2_n6ad3") +region = Rect2(160, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n6ad3"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i05k5"] +atlas = ExtResource("2_n6ad3") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mrbkc"] +atlas = ExtResource("2_n6ad3") +region = Rect2(64, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_166ew"] +atlas = ExtResource("2_n6ad3") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kepaj"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v8w1g"] +atlas = ExtResource("2_n6ad3") +region = Rect2(128, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ss7fc"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_14vf2"] +atlas = ExtResource("2_n6ad3") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rfvyr"] +atlas = ExtResource("2_n6ad3") +region = Rect2(96, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v6e46"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qikhv"] +atlas = ExtResource("2_n6ad3") +region = Rect2(32, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xtgne"] +atlas = ExtResource("2_n6ad3") +region = Rect2(64, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qvokx"] +atlas = ExtResource("2_n6ad3") +region = Rect2(96, 96, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cc0lq"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 128, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dw7uy"] +atlas = ExtResource("2_n6ad3") +region = Rect2(32, 128, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ecm54"] +atlas = ExtResource("2_n6ad3") +region = Rect2(64, 128, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0l1kh"] +atlas = ExtResource("2_n6ad3") +region = Rect2(96, 128, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_c3gpp"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_myk4l"] +atlas = ExtResource("2_n6ad3") +region = Rect2(32, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kwrpx"] +atlas = ExtResource("2_n6ad3") +region = Rect2(64, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0n461"] +atlas = ExtResource("2_n6ad3") +region = Rect2(96, 32, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bgbv2"] +atlas = ExtResource("2_n6ad3") +region = Rect2(0, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h5vay"] +atlas = ExtResource("2_n6ad3") +region = Rect2(32, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4u621"] +atlas = ExtResource("2_n6ad3") +region = Rect2(64, 64, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tqwgk"] +atlas = ExtResource("2_n6ad3") +region = Rect2(96, 64, 32, 32) + +[sub_resource type="SpriteFrames" id="SpriteFrames_v8w1g"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_457no") +}], +"loop": true, +"name": &"fall_down", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_ly4f6") +}], +"loop": true, +"name": &"fall_down_left", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_htqrf") +}], +"loop": true, +"name": &"fall_down_right", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_vkuli") +}], +"loop": true, +"name": &"fall_up", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_hrxdh") +}], +"loop": true, +"name": &"fall_up_left", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_gjv0h") +}], +"loop": true, +"name": &"fall_up_right", +"speed": 5.0 +}, { +"frames": [{ +"duration": 3.0, +"texture": SubResource("AtlasTexture_n6ad3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i05k5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mrbkc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_166ew") +}, { +"duration": 4.0, +"texture": SubResource("AtlasTexture_kepaj") +}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{ +"duration": 2.0, +"texture": SubResource("AtlasTexture_v8w1g") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ss7fc") +}, { +"duration": 2.0, +"texture": SubResource("AtlasTexture_14vf2") +}], +"loop": false, +"name": &"look_around_1", +"speed": 5.0 +}, { +"frames": [{ +"duration": 2.0, +"texture": SubResource("AtlasTexture_rfvyr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ss7fc") +}, { +"duration": 2.0, +"texture": SubResource("AtlasTexture_v8w1g") +}], +"loop": false, +"name": &"look_around_2", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_v6e46") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qikhv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xtgne") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qvokx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cc0lq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dw7uy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ecm54") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0l1kh") +}], +"loop": true, +"name": &"walk_left", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_c3gpp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_myk4l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kwrpx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0n461") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bgbv2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h5vay") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4u621") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tqwgk") +}], +"loop": true, +"name": &"walk_right", +"speed": 10.0 +}] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_xln5q"] +radius = 4.0 + +[node name="Player" type="CharacterBody2D"] +collision_layer = 129 +collision_mask = 113 +script = ExtResource("1_xln5q") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_i05k5") +sprite_frames = SubResource("SpriteFrames_v8w1g") +animation = &"fall_up" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 1) +shape = SubResource("CapsuleShape2D_xln5q") + +[node name="CollisionSwitcher" parent="." node_paths=PackedStringArray("object") instance=ExtResource("2_j06tb")] +object = NodePath("..") + +[node name="Camera2D" type="Camera2D" parent="."] +position_smoothing_enabled = true + +[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"] +[connection signal="animation_looped" from="AnimatedSprite2D" to="." method="_on_animation_looped"] diff --git a/game/collision_switcher.gd b/game/collision_switcher.gd new file mode 100644 index 0000000..efcc609 --- /dev/null +++ b/game/collision_switcher.gd @@ -0,0 +1,131 @@ +class_name CollisionSwitcher +extends Node + + +enum Collisions { + GREY_WORLD = 1 << 0, + GREY_ENEMY = 1 << 4, + + BLACK_WORLD = 1 << 1, + BLACK_ENEMY = 1 << 2, + BLACK_PLAYER = 1 << 3, + + WHITE_WORLD = 1 << 5, + WHITE_ENEMY = 1 << 6, + WHITE_PLAYER = 1 << 7, + + GREY = GREY_WORLD | GREY_ENEMY, + BLACK = BLACK_WORLD | BLACK_ENEMY | BLACK_PLAYER, + WHITE = WHITE_WORLD | WHITE_ENEMY | WHITE_PLAYER, +} + +enum State { + Black, + White, + TransitionToBlack, + TransitionToWhite, +} + + +const COLLISION_WHITE_SHIFT = 4 + +const MAX_INTENSITY = 1.0 + +const SHADER_SWITCH_COLORS = "shader_parameter/switch_colors" +const SHADER_INTENSITY = "shader_parameter/intensity" + + +@export var object : CollisionObject2D + +@export var state := _state: + set(value): + if (_state != value): + _state = value + get(): + return _state + + +var material : Material: + set(value): + material = value + _apply_color() + +var _state : State = State.White: + set(value): + _state = value + _apply_color() + +var _intensity_tween : Tween + +var _grey_layer := 0 +var _color_layer := 0 + +var _grey_mask := 0 +var _color_mask := 0 + + +func _ready() -> void: + _grey_layer = _get_grey_collision(object.collision_layer) + _color_layer = _get_color_collision(object.collision_layer) + + _grey_mask = _get_grey_collision(object.collision_mask) + _color_mask = _get_color_collision(object.collision_mask) + + +func switch_color(time: float = 0.0) -> void: + if _intensity_tween != null and _intensity_tween.is_running(): return + + if is_zero_approx(time): + _state = State.Black if _state == State.White else State.White + else: + _state = State.TransitionToBlack if _state == State.White else State.TransitionToWhite + + _intensity_tween = create_tween() + _intensity_tween.tween_method(_set_shader_internsity, 0.0, MAX_INTENSITY, time) + _intensity_tween.finished.connect(_update_state) + + +func _get_grey_collision(collision: int) -> int: + return collision & Collisions.GREY + + +func _get_color_collision(collision: int) -> int: + var black_collision := collision & Collisions.BLACK + var white_collision := (collision & Collisions.WHITE) >> COLLISION_WHITE_SHIFT + return black_collision | white_collision + + +func _set_shader_internsity(value: float) -> void: + material.set(SHADER_INTENSITY, value) + + +func _update_state() -> void: + match _state: + State.TransitionToBlack: + state = State.Black + State.TransitionToWhite: + state = State.White + + +func _apply_color() -> void: + var layer := 0 + var mask := 0 + + match _state: + State.Black: + layer = _grey_layer | _color_layer + mask = _grey_mask | _color_mask + State.White: + layer = _grey_layer | (_color_layer << COLLISION_WHITE_SHIFT) + mask = _grey_mask | (_color_mask << COLLISION_WHITE_SHIFT) + State.TransitionToBlack, State.TransitionToWhite: + layer = _grey_layer | _color_layer | (_color_layer << COLLISION_WHITE_SHIFT) + mask = _grey_mask | _color_mask | (_color_mask << COLLISION_WHITE_SHIFT) + + object.collision_layer = layer + object.collision_mask = mask + + + if material != null: + var is_black := _state == State.Black or _state == State.TransitionToBlack + material.set(SHADER_SWITCH_COLORS, is_black) diff --git a/game/collision_switcher.gd.uid b/game/collision_switcher.gd.uid new file mode 100644 index 0000000..6a5bbda --- /dev/null +++ b/game/collision_switcher.gd.uid @@ -0,0 +1 @@ +uid://cwdy67a7t021g diff --git a/game/collision_switcher.tscn b/game/collision_switcher.tscn new file mode 100644 index 0000000..4234460 --- /dev/null +++ b/game/collision_switcher.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://5qlocc0yu8ug"] + +[ext_resource type="Script" uid="uid://cwdy67a7t021g" path="res://game/collision_switcher.gd" id="1_imm5a"] + +[node name="CollisionSwitcher" type="Node"] +script = ExtResource("1_imm5a") diff --git a/game/levels/abstract_level.gd b/game/levels/abstract_level.gd index e251cf8..a88774e 100644 --- a/game/levels/abstract_level.gd +++ b/game/levels/abstract_level.gd @@ -1 +1,2 @@ +class_name AbstractLevel extends Node2D diff --git a/game/levels/abstract_level.tscn b/game/levels/abstract_level.tscn index 65d3d69..56adcd8 100644 --- a/game/levels/abstract_level.tscn +++ b/game/levels/abstract_level.tscn @@ -1,6 +1,383 @@ -[gd_scene load_steps=2 format=3 uid="uid://mpsu4g2b5h3a"] +[gd_scene load_steps=13 format=3 uid="uid://mpsu4g2b5h3a"] [ext_resource type="Script" uid="uid://c737mx0kxva7i" path="res://game/levels/abstract_level.gd" id="1_o2mui"] +[ext_resource type="PackedScene" uid="uid://dtcad8tdx78tg" path="res://game/characters/player.tscn" id="2_r0ht6"] +[ext_resource type="Texture2D" uid="uid://due8mmt5ww1sf" path="res://images/level/walls.png" id="3_fnnmn"] +[ext_resource type="Material" uid="uid://dojhoc6ljpt1a" path="res://game/materials/gray_walls.tres" id="3_pi5fd"] +[ext_resource type="Material" uid="uid://d2o2o1w8kb51g" path="res://game/materials/white_walls.tres" id="5_6b8cu"] +[ext_resource type="Material" uid="uid://bhksbugqhxxa0" path="res://game/materials/black_walls.tres" id="6_x8k35"] -[node name="Level" type="Node2D"] +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_pi5fd"] +texture = ExtResource("3_fnnmn") +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -8, -8, 8, -3, 8, -3, -3, 8, -3, 8, -8) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -8, -3) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, 3, 8, 3, 8, 8, 3, 8) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, -3, 3, -3, 8, -8, 8) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, 3, 8) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, -3, 3, -3) +4:1/0 = 0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-3, -8, -3, -3, -8, -3, -8, -8) +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, -8, 8, 8, -8, 8, -8, 3, 3, 3, 3, -8) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:2/0 = 0 +6:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:3/0 = 0 +0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -8, -3) +1:3/0 = 0 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -3, 8, -3, 8, -8) +2:3/0 = 0 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +3:3/0 = 0 +3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, -8, 8, 8, 8, 8, 3) +4:3/0 = 0 +4:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:3/0 = 0 +5:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:3/0 = 0 +6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 3, 8, 8, 8, 8, -8) +6:4/0 = 0 +6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +5:5/0 = 0 +5:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +4:5/0 = 0 +4:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 3, 3, -8, 3, -8, 8, 8, 8, 8, -8) +3:5/0 = 0 +3:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +2:5/0 = 0 +2:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, -8, 8, -8, 3, 3, 3) +1:5/0 = 0 +1:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +0:5/0 = 0 +0:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, -8, 8, -8, 3, 3, 3) +0:4/0 = 0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +1:4/0 = 0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -3, -3, -3, 8, -8, 8) +2:4/0 = 0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +3:4/0 = 0 +3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -3, -3, -3, 8, -8, 8) +4:4/0 = 0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +5:4/0 = 0 +5:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, 3, 8) +0:6/0 = 0 +0:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +1:6/0 = 0 +1:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +2:6/0 = 0 +2:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:2/0 = 0 +7:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:2/0 = 0 +8:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:3/0 = 0 +8:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:3/0 = 0 +7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:4/0 = 0 +7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:4/0 = 0 +8:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:5/0 = 0 +8:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:5/0 = 0 +7:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) + +[sub_resource type="TileSet" id="TileSet_r0ht6"] +physics_layer_0/collision_layer = 1 +physics_layer_0/collision_mask = 0 +sources/0 = SubResource("TileSetAtlasSource_pi5fd") + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_l0xih"] +texture = ExtResource("3_fnnmn") +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -8, -8, 8, -3, 8, -3, -3, 8, -3, 8, -8) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -8, -3) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, 3, 8, 3, 8, 8, 3, 8) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, -3, 3, -3, 8, -8, 8) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, 3, 8) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, -3, 3, -3) +4:1/0 = 0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-3, -8, -3, -3, -8, -3, -8, -8) +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, -8, 8, 8, -8, 8, -8, 3, 3, 3, 3, -8) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:2/0 = 0 +6:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:3/0 = 0 +0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -8, -3) +1:3/0 = 0 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -3, 8, -3, 8, -8) +2:3/0 = 0 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +3:3/0 = 0 +3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, -8, 8, 8, 8, 8, 3) +4:3/0 = 0 +4:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:3/0 = 0 +5:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:3/0 = 0 +6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 3, 8, 8, 8, 8, -8) +6:4/0 = 0 +6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +5:5/0 = 0 +5:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +4:5/0 = 0 +4:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 3, 3, -8, 3, -8, 8, 8, 8, 8, -8) +3:5/0 = 0 +3:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +2:5/0 = 0 +2:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, -8, 8, -8, 3, 3, 3) +1:5/0 = 0 +1:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +0:5/0 = 0 +0:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, -8, 8, -8, 3, 3, 3) +0:4/0 = 0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +1:4/0 = 0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -3, -3, -3, 8, -8, 8) +2:4/0 = 0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +3:4/0 = 0 +3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -3, -3, -3, 8, -8, 8) +4:4/0 = 0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +5:4/0 = 0 +5:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, 3, 8) +0:6/0 = 0 +0:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +1:6/0 = 0 +1:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +2:6/0 = 0 +2:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:2/0 = 0 +7:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:2/0 = 0 +8:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:3/0 = 0 +8:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:3/0 = 0 +7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:4/0 = 0 +7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:4/0 = 0 +8:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:5/0 = 0 +8:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:5/0 = 0 +7:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) + +[sub_resource type="TileSet" id="TileSet_b7vts"] +physics_layer_0/collision_layer = 2 +physics_layer_0/collision_mask = 0 +sources/0 = SubResource("TileSetAtlasSource_l0xih") + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_x8k35"] +texture = ExtResource("3_fnnmn") +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -8, -8, 8, -3, 8, -3, -3, 8, -3, 8, -8) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -8, -3) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, 3, 8, 3, 8, 8, 3, 8) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, -3, 3, -3, 8, -8, 8) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, 3, 8) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, -3, 3, -3) +4:1/0 = 0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-3, -8, -3, -3, -8, -3, -8, -8) +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, -8, 8, 8, -8, 8, -8, 3, 3, 3, 3, -8) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:2/0 = 0 +6:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:3/0 = 0 +0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -8, -3) +1:3/0 = 0 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -3, 8, -3, 8, -8) +2:3/0 = 0 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +3:3/0 = 0 +3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, -8, 8, 8, 8, 8, 3) +4:3/0 = 0 +4:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:3/0 = 0 +5:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +6:3/0 = 0 +6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 3, 8, 8, 8, 8, -8) +6:4/0 = 0 +6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +5:5/0 = 0 +5:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +4:5/0 = 0 +4:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 3, 3, -8, 3, -8, 8, 8, 8, 8, -8) +3:5/0 = 0 +3:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +2:5/0 = 0 +2:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, -8, 8, -8, 3, 3, 3) +1:5/0 = 0 +1:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 3, 8, 3, 8, 8, -8, 8) +0:5/0 = 0 +0:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, -8, 8, -8, 3, 3, 3) +0:4/0 = 0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +1:4/0 = 0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -3, -3, -3, 8, -8, 8) +2:4/0 = 0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, 3, 8, 3, -3, -8, -3) +3:4/0 = 0 +3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, -3, -3, -3, -3, 8, -8, 8) +4:4/0 = 0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -3, -8, -3, 8, -8, 8) +5:4/0 = 0 +5:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(3, -8, 8, -8, 8, 8, 3, 8) +0:6/0 = 0 +0:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +1:6/0 = 0 +1:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +2:6/0 = 0 +2:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 3, 8, 3, 8, 8, -8, 8) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:2/0 = 0 +7:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:2/0 = 0 +8:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:3/0 = 0 +8:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:3/0 = 0 +7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:4/0 = 0 +7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:4/0 = 0 +8:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +8:5/0 = 0 +8:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +7:5/0 = 0 +7:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) + +[sub_resource type="TileSet" id="TileSet_l0xih"] +physics_layer_0/collision_layer = 32 +physics_layer_0/collision_mask = 0 +sources/0 = SubResource("TileSetAtlasSource_x8k35") + +[node name="AbstractLevel" type="Node2D"] script = ExtResource("1_o2mui") + +[node name="Objects" type="Node2D" parent="."] + +[node name="Player" parent="." instance=ExtResource("2_r0ht6")] + +[node name="Tiles" type="Node2D" parent="."] + +[node name="GrayWalls" type="TileMapLayer" parent="Tiles"] +material = ExtResource("3_pi5fd") +tile_set = SubResource("TileSet_r0ht6") + +[node name="BlackWalls" type="TileMapLayer" parent="Tiles"] +material = ExtResource("6_x8k35") +tile_set = SubResource("TileSet_b7vts") + +[node name="WhiteWalls" type="TileMapLayer" parent="Tiles"] +material = ExtResource("5_6b8cu") +tile_set = SubResource("TileSet_l0xih") diff --git a/game/levels/level_1.gd b/game/levels/level_1.gd new file mode 100644 index 0000000..98ecccd --- /dev/null +++ b/game/levels/level_1.gd @@ -0,0 +1,2 @@ +class_name Level1 +extends AbstractLevel diff --git a/game/levels/level_1.gd.uid b/game/levels/level_1.gd.uid new file mode 100644 index 0000000..513c3c7 --- /dev/null +++ b/game/levels/level_1.gd.uid @@ -0,0 +1 @@ +uid://b04km0lbc108u diff --git a/game/levels/level_1.tscn b/game/levels/level_1.tscn new file mode 100644 index 0000000..965b192 --- /dev/null +++ b/game/levels/level_1.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=7 format=4 uid="uid://bmn74wc2vophn"] + +[ext_resource type="PackedScene" uid="uid://mpsu4g2b5h3a" path="res://game/levels/abstract_level.tscn" id="1_15okj"] +[ext_resource type="Script" uid="uid://b04km0lbc108u" path="res://game/levels/level_1.gd" id="2_hj65a"] +[ext_resource type="PackedScene" uid="uid://b3kyqvuxmfn8f" path="res://game/objects/fireplace.tscn" id="3_tuvkr"] +[ext_resource type="PackedScene" uid="uid://pw8xqtpauy57" path="res://game/objects/tutorial/jump_kbd.tscn" id="4_crrvt"] +[ext_resource type="PackedScene" uid="uid://cemhsfdru4pv6" path="res://game/objects/tutorial/movement_kbd.tscn" id="5_rifvl"] +[ext_resource type="PackedScene" uid="uid://deo60sij43ibm" path="res://game/objects/tutorial/switch_kbd.tscn" id="6_l6jt4"] + +[node name="Level1" instance=ExtResource("1_15okj")] +script = ExtResource("2_hj65a") + +[node name="Fireplace" parent="Objects" index="0" instance=ExtResource("3_tuvkr")] +position = Vector2(452, -48) + +[node name="JumpKbd" parent="Objects" index="1" instance=ExtResource("4_crrvt")] +position = Vector2(346, -74) + +[node name="MovementKbd" parent="Objects" index="2" instance=ExtResource("5_rifvl")] +position = Vector2(65, 1) + +[node name="SwitchKbd" parent="Objects" index="3" instance=ExtResource("6_l6jt4")] +position = Vector2(692, -72) + +[node name="GrayWalls" parent="Tiles" index="0"] +tile_map_data = PackedByteArray("AAD9/wEAAAABAAAAAAD+/wEAAAABAAAAAAD//wEAAAABAAAAAAAAAAEAAAABAAAAAAABAAEAAAABAAAAAAACAAEAAAABAAAAAAD8/wEAAAADAAEAAAD8/wAAAAACAAEAAAD8////AAACAAEAAAD8//7/AAACAAEAAAD8//3/AAACAAEAAAADAAEAAAABAAAAAAAEAAEAAAABAAAAAAAFAAEAAAABAAAAAAAGAAEAAAABAAAAAAAHAAEAAAABAAAAAAAIAAEAAAABAAAAAAAJAAEAAAABAAAAAAAKAAEAAAABAAAAAAALAAEAAAABAAAAAAAMAAEAAAABAAAAAAANAAEAAAABAAAAAAAOAAEAAAABAAAAAAAPAAEAAAABAAAAAAAQAAEAAAABAAAAAAARAAEAAAABAAAAAAASAAEAAAABAAAAAAATAAEAAAAEAAEAAAATAAAAAAAAAAEAAAATAP//AAAAAAEAAAATAP7/AAAAAAAAAAAUAP7/AAABAAAAAAAVAP7/AAABAAAAAAAWAP7/AAABAAAAAAAXAP7/AAABAAAAAAAYAP7/AAABAAAAAAAZAP7/AAABAAAAAAAaAP7/AAABAAAAAAAbAP7/AAABAAAAAAAcAP7/AAABAAAAAAAdAP7/AAABAAAAAAAeAP7/AAABAAAAAAAfAP7/AAABAAAAAAAgAP7/AAABAAAAAAAhAP7/AAABAAAAAAAiAP7/AAABAAAAAAAjAP7/AAABAAAAAAAkAP7/AAABAAAAAAAlAP7/AAABAAAAAAAmAP7/AAABAAAAAAAnAP7/AAABAAAAAAAoAP7/AAABAAAAAAApAP7/AAABAAAAAAAqAP7/AAABAAAAAAArAP7/AAABAAAAAAAsAP7/AAABAAAAAAAtAP7/AAABAAAAAAAuAP7/AAABAAAAAAAvAP7/AAABAAAAAAAwAP7/AAABAAAAAAAxAP7/AAABAAAAAAAyAP7/AAABAAAAAAAzAP7/AAABAAAAAAA0AP7/AAABAAAAAAA1AP7/AAABAAAAAAA2AP7/AAABAAAAAAA3AP7/AAABAAAAAAA4AP7/AAABAAAAAABEAP7/AAAEAAEAAABEAP3/AAAAAAEAAABEAPz/AAAAAAEAAABEAPv/AAAAAAEAAABEAPr/AAAAAAEAAAA5AP7/AAABAAAAAAA6AP7/AAABAAAAAAA7AP7/AAABAAAAAAA8AP7/AAABAAAAAAA9AP7/AAABAAAAAAA+AP7/AAABAAAAAABCAP7/AAABAAAAAABDAP7/AAABAAAAAABHAAMAAAAAAAEAAABHAAQAAAAAAAEAAABHAAUAAAAAAAEAAABHAAYAAAAAAAEAAAA5AAMAAAACAAEAAAA5AAQAAAACAAEAAAA5AAUAAAACAAEAAAA5AAYAAAACAAEAAAA5AAcAAAADAAEAAABHAAcAAAAEAAEAAABGAAcAAAABAAAAAABFAAcAAAABAAAAAABEAAcAAAABAAAAAABDAAcAAAABAAAAAABCAAcAAAABAAAAAABBAAcAAAABAAAAAABAAAcAAAABAAAAAAA/AAcAAAABAAAAAAA+AAcAAAABAAAAAAA9AAcAAAABAAAAAAA8AAcAAAABAAAAAAA7AAcAAAABAAAAAAA6AAcAAAABAAAAAAA/AP7/AAAIAAAAAABBAP7/AAAHAAAAAAA=") + +[node name="BlackWalls" parent="Tiles" index="1"] +tile_map_data = PackedByteArray("AABAAP7/AAAEAAIAAAA=") + +[node name="WhiteWalls" parent="Tiles" index="2"] +tile_map_data = PackedByteArray("AAAwAP3/AAAAAAEAAAAwAPz/AAAAAAEAAAAwAPv/AAAAAAEAAAAwAPr/AAAAAAEAAAAwAPn/AAAAAAEAAAAwAPj/AAAAAAEAAAAwAPf/AAAAAAEAAAD8//z/AAACAAEAAAD8//v/AAACAAEAAAD8//r/AAACAAEAAAD8//n/AAACAAEAAAD8//j/AAACAAEAAAD8//f/AAACAAEAAAD8//b/AAADAAAAAAD9//b/AAABAAIAAAD+//b/AAABAAIAAAD///b/AAABAAIAAAAAAPb/AAABAAIAAAABAPb/AAABAAIAAAACAPb/AAABAAIAAAADAPb/AAABAAIAAAAEAPb/AAABAAIAAAAFAPb/AAABAAIAAAAGAPb/AAABAAIAAAAHAPb/AAABAAIAAAAIAPb/AAABAAIAAAAJAPb/AAABAAIAAAAKAPb/AAABAAIAAAALAPb/AAABAAIAAAAMAPb/AAABAAIAAAANAPb/AAABAAIAAAAOAPb/AAABAAIAAAAPAPb/AAABAAIAAAAQAPb/AAABAAIAAAARAPb/AAABAAIAAAASAPb/AAABAAIAAAATAPb/AAABAAIAAAAUAPb/AAABAAIAAAAVAPb/AAABAAIAAAAWAPb/AAABAAIAAAAXAPb/AAABAAIAAAAYAPb/AAABAAIAAAAZAPb/AAABAAIAAAAaAPb/AAABAAIAAAAbAPb/AAABAAIAAAAcAPb/AAABAAIAAAAdAPb/AAABAAIAAAAeAPb/AAABAAIAAAAfAPb/AAABAAIAAAAgAPb/AAABAAIAAAAhAPb/AAABAAIAAAAiAPb/AAABAAIAAAAjAPb/AAABAAIAAAAkAPb/AAABAAIAAAAlAPb/AAABAAIAAAAmAPb/AAABAAIAAAAnAPb/AAABAAIAAAAoAPb/AAABAAIAAAApAPb/AAABAAIAAAAqAPb/AAABAAIAAAArAPb/AAABAAIAAAAsAPb/AAABAAIAAAAtAPb/AAABAAIAAAAuAPb/AAABAAIAAAAvAPb/AAABAAIAAAAwAPb/AAABAAYAAAAxAPb/AAABAAIAAAAyAPb/AAABAAIAAAAzAPb/AAABAAIAAAA0APb/AAABAAIAAAA1APb/AAABAAIAAAA2APb/AAABAAIAAAA3APb/AAABAAIAAAA4APb/AAABAAIAAAA5APb/AAABAAIAAAA6APb/AAABAAIAAAA7APb/AAABAAIAAAA8APb/AAABAAIAAAA9APb/AAABAAIAAAA+APb/AAABAAIAAAA/APb/AAABAAIAAABAAPb/AAABAAIAAABEAPn/AAAAAAEAAABEAPj/AAAAAAEAAABEAPf/AAAAAAEAAABEAPb/AAAEAAAAAABBAPb/AAABAAIAAABCAPb/AAABAAIAAABDAPb/AAABAAIAAAA+AP7/AAADAAAAAABCAP7/AAAEAAAAAAA+AP//AAACAAIAAABCAP//AAAAAAIAAAA9AP//AAABAAIAAAA8AP//AAABAAIAAAA7AP//AAABAAIAAAA6AP//AAABAAIAAABDAP//AAABAAIAAABEAP//AAABAAIAAABFAP//AAABAAIAAABGAP//AAABAAIAAAA5AP//AAADAAAAAABHAP//AAAEAAAAAAA5AAAAAAACAAEAAAA5AAEAAAACAAEAAAA5AAIAAAACAAEAAABHAAAAAAAAAAEAAABHAAEAAAAAAAEAAABHAAIAAAAAAAEAAAA=") diff --git a/game/materials/black_walls.tres b/game/materials/black_walls.tres new file mode 100644 index 0000000..f65d709 --- /dev/null +++ b/game/materials/black_walls.tres @@ -0,0 +1,13 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bhksbugqhxxa0"] + +[ext_resource type="Shader" uid="uid://lqq1mg6l1qqe" path="res://game/shaders/black_n_white.gdshader" id="1_sq141"] + +[resource] +shader = ExtResource("1_sq141") +shader_parameter/black_color = Color(0, 0, 0, 1) +shader_parameter/white_color = Color(1, 1, 1, 1) +shader_parameter/switch_colors = true +shader_parameter/threshold = 0.5 +shader_parameter/speed = 5.0 +shader_parameter/intensity = 1.0 +shader_parameter/scale = 20.0 diff --git a/game/materials/gray_walls.tres b/game/materials/gray_walls.tres new file mode 100644 index 0000000..57fe018 --- /dev/null +++ b/game/materials/gray_walls.tres @@ -0,0 +1,13 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dojhoc6ljpt1a"] + +[ext_resource type="Shader" uid="uid://lqq1mg6l1qqe" path="res://game/shaders/black_n_white.gdshader" id="1_rnyyp"] + +[resource] +shader = ExtResource("1_rnyyp") +shader_parameter/black_color = Color(0, 0, 0, 1) +shader_parameter/white_color = Color(1, 1, 1, 1) +shader_parameter/switch_colors = false +shader_parameter/threshold = 0.5 +shader_parameter/speed = 2.000000095 +shader_parameter/intensity = 0.50000002375 +shader_parameter/scale = 15.0000007125 diff --git a/game/materials/white_walls.tres b/game/materials/white_walls.tres new file mode 100644 index 0000000..2a245f1 --- /dev/null +++ b/game/materials/white_walls.tres @@ -0,0 +1,13 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://d2o2o1w8kb51g"] + +[ext_resource type="Shader" uid="uid://lqq1mg6l1qqe" path="res://game/shaders/black_n_white.gdshader" id="1_1yg6n"] + +[resource] +shader = ExtResource("1_1yg6n") +shader_parameter/black_color = Color(0, 0, 0, 1) +shader_parameter/white_color = Color(1, 1, 1, 1) +shader_parameter/switch_colors = false +shader_parameter/threshold = 0.5 +shader_parameter/speed = 5.0 +shader_parameter/intensity = 1.0 +shader_parameter/scale = 20.0 diff --git a/game/menu/main_menu.gd b/game/menu/main_menu.gd index b06300b..7dbcb58 100644 --- a/game/menu/main_menu.gd +++ b/game/menu/main_menu.gd @@ -22,7 +22,7 @@ func _setup_neighbors() -> void: func _on_start_button_pressed() -> void: - pass + get_tree().change_scene_to_file("res://game/levels/level_1.tscn") func _on_options_button_pressed() -> void: diff --git a/game/menu/main_menu.tscn b/game/menu/main_menu.tscn index 93bd3f4..966aa37 100644 --- a/game/menu/main_menu.tscn +++ b/game/menu/main_menu.tscn @@ -14,15 +14,6 @@ grow_vertical = 2 theme = ExtResource("2_qnvmd") script = ExtResource("1_5d27k") -[node name="ColorRect" type="ColorRect" parent="."] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -color = Color(0, 0, 0, 1) - [node name="MarginContainer" type="MarginContainer" parent="."] layout_mode = 1 anchors_preset = 15 diff --git a/game/menu/options_menu.tscn b/game/menu/options_menu.tscn index 07d42ac..fb7901c 100644 --- a/game/menu/options_menu.tscn +++ b/game/menu/options_menu.tscn @@ -19,15 +19,6 @@ grow_vertical = 2 theme = ExtResource("2_e2bp2") script = ExtResource("1_lq2ks") -[node name="ColorRect" type="ColorRect" parent="."] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -color = Color(0, 0, 0, 1) - [node name="MarginContainer" type="MarginContainer" parent="."] layout_mode = 1 anchors_preset = 15 diff --git a/game/objects/b_w_object.gd b/game/objects/b_w_object.gd deleted file mode 100644 index 43b43c6..0000000 --- a/game/objects/b_w_object.gd +++ /dev/null @@ -1,10 +0,0 @@ -class_name BWObject -extends Node2D - - -@export var is_colored := true -@export var is_white := true - - -func invert() -> void: - is_white = not is_white diff --git a/game/objects/b_w_object.gd.uid b/game/objects/b_w_object.gd.uid deleted file mode 100644 index 74f0f23..0000000 --- a/game/objects/b_w_object.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://b7qut5xhc5hxo diff --git a/game/objects/b_w_object.tscn b/game/objects/b_w_object.tscn deleted file mode 100644 index 7f69fce..0000000 --- a/game/objects/b_w_object.tscn +++ /dev/null @@ -1,10 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://bgtb7602a2260"] - -[ext_resource type="Script" uid="uid://b7qut5xhc5hxo" path="res://game/objects/b_w_object.gd" id="1_jpa1b"] - -[node name="BlackAndWhiteObject" type="Node2D"] -script = ExtResource("1_jpa1b") - -[node name="Black" type="Node2D" parent="."] - -[node name="White" type="Node2D" parent="."] diff --git a/game/objects/bookstand.tscn b/game/objects/bookstand.tscn new file mode 100644 index 0000000..e0b55e5 --- /dev/null +++ b/game/objects/bookstand.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://dx1yasi8wlaye"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_nvgb0"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_opqiy"] +atlas = ExtResource("1_nvgb0") +region = Rect2(48, 0, 16, 32) + +[node name="Bookstand" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_opqiy") diff --git a/game/objects/cabinet.tscn b/game/objects/cabinet.tscn new file mode 100644 index 0000000..1bb7c66 --- /dev/null +++ b/game/objects/cabinet.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://dopjsft0y8mw5"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_57t4w"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_sqimt"] +atlas = ExtResource("1_57t4w") +region = Rect2(128, 32, 32, 32) + +[node name="Cabinet" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_sqimt") diff --git a/game/objects/chair.tscn b/game/objects/chair.tscn new file mode 100644 index 0000000..1f02261 --- /dev/null +++ b/game/objects/chair.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://b8pvlnpdnfmd0"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_rse2u"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_1kw05"] +atlas = ExtResource("1_rse2u") +region = Rect2(176, 0, 16, 32) + +[node name="Chair" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_1kw05") diff --git a/game/objects/fireplace.tscn b/game/objects/fireplace.tscn new file mode 100644 index 0000000..bdd6e31 --- /dev/null +++ b/game/objects/fireplace.tscn @@ -0,0 +1,59 @@ +[gd_scene load_steps=9 format=3 uid="uid://b3kyqvuxmfn8f"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_xghly"] +[ext_resource type="Shader" uid="uid://lqq1mg6l1qqe" path="res://game/shaders/black_n_white.gdshader" id="2_4nvxe"] + +[sub_resource type="GDScript" id="GDScript_4nvxe"] +script/source = "extends Node2D + + +func _ready() -> void: + $AnimatedSprite2D.play(\"default\") +" + +[sub_resource type="AtlasTexture" id="AtlasTexture_2ho61"] +atlas = ExtResource("1_xghly") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2ho61"] +shader = ExtResource("2_4nvxe") +shader_parameter/black_color = Color(0, 0, 0, 1) +shader_parameter/white_color = Color(1, 1, 1, 1) +shader_parameter/switch_colors = false +shader_parameter/threshold = 0.5 +shader_parameter/speed = 5.0000002375 +shader_parameter/intensity = 0.50000002375 +shader_parameter/scale = 75.0000035625 + +[sub_resource type="AtlasTexture" id="AtlasTexture_6xx0h"] +atlas = ExtResource("1_xghly") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b1qtt"] +atlas = ExtResource("1_xghly") +region = Rect2(32, 16, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_f0x6e"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6xx0h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b1qtt") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[node name="Fireplace" type="Node2D"] +script = SubResource("GDScript_4nvxe") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_2ho61") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +material = SubResource("ShaderMaterial_2ho61") +position = Vector2(0, 8) +sprite_frames = SubResource("SpriteFrames_f0x6e") diff --git a/game/objects/moon.tscn b/game/objects/moon.tscn new file mode 100644 index 0000000..9ea0865 --- /dev/null +++ b/game/objects/moon.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://betmooym3gxqx"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_x2hio"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_1c3a2"] +atlas = ExtResource("1_x2hio") +region = Rect2(160, 32, 32, 32) + +[node name="Moon" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_1c3a2") diff --git a/game/objects/painting_h_l.tscn b/game/objects/painting_h_l.tscn new file mode 100644 index 0000000..f08e93c --- /dev/null +++ b/game/objects/painting_h_l.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://crccdk7wmuqig"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_a62d7"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_qwmf4"] +atlas = ExtResource("1_a62d7") +region = Rect2(0, 32, 48, 32) + +[node name="PaintingHL" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_qwmf4") diff --git a/game/objects/painting_h_s.tscn b/game/objects/painting_h_s.tscn new file mode 100644 index 0000000..892a7a8 --- /dev/null +++ b/game/objects/painting_h_s.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://c0bk5sk661hi1"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_u3qkd"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_vssfe"] +atlas = ExtResource("1_u3qkd") +region = Rect2(48, 32, 32, 32) + +[node name="PaintingHS" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_vssfe") diff --git a/game/objects/painting_v_l.tscn b/game/objects/painting_v_l.tscn new file mode 100644 index 0000000..1268991 --- /dev/null +++ b/game/objects/painting_v_l.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://d330w1ygg6uxy"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_v74mh"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_hq5lq"] +atlas = ExtResource("1_v74mh") +region = Rect2(96, 0, 32, 48) + +[node name="PaintingVL" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_hq5lq") diff --git a/game/objects/painting_v_s.tscn b/game/objects/painting_v_s.tscn new file mode 100644 index 0000000..a47c6b3 --- /dev/null +++ b/game/objects/painting_v_s.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://bo7756lp68bl1"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_1hdr2"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_0ynw1"] +atlas = ExtResource("1_1hdr2") +region = Rect2(64, 0, 32, 32) + +[node name="PaintingVS" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_0ynw1") diff --git a/game/objects/table.tscn b/game/objects/table.tscn new file mode 100644 index 0000000..9b80c82 --- /dev/null +++ b/game/objects/table.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://bdwbdnbenueu1"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_qacj7"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_runce"] +atlas = ExtResource("1_qacj7") +region = Rect2(128, 0, 48, 32) + +[node name="Table" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_runce") diff --git a/game/objects/tutorial/interaction_kbd.tscn b/game/objects/tutorial/interaction_kbd.tscn new file mode 100644 index 0000000..780e0bf --- /dev/null +++ b/game/objects/tutorial/interaction_kbd.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://bgs6j6ak5qnq1"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_0act5"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_pnn6n"] +atlas = ExtResource("1_0act5") +region = Rect2(48, 96, 32, 32) + +[node name="InteractionKbd" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_pnn6n") diff --git a/game/objects/tutorial/interaction_pad.tscn b/game/objects/tutorial/interaction_pad.tscn new file mode 100644 index 0000000..4826763 --- /dev/null +++ b/game/objects/tutorial/interaction_pad.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://c0cae3bivcnal"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_fjtec"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_ow2w5"] +atlas = ExtResource("1_fjtec") +region = Rect2(112, 96, 32, 32) + +[node name="InteractionPad" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_ow2w5") diff --git a/game/objects/tutorial/jump_kbd.tscn b/game/objects/tutorial/jump_kbd.tscn new file mode 100644 index 0000000..ed6eaf7 --- /dev/null +++ b/game/objects/tutorial/jump_kbd.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://pw8xqtpauy57"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_gth0n"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_wa8xe"] +atlas = ExtResource("1_gth0n") +region = Rect2(0, 96, 48, 32) + +[node name="JumpKbd" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_wa8xe") diff --git a/game/objects/tutorial/jump_pad.tscn b/game/objects/tutorial/jump_pad.tscn new file mode 100644 index 0000000..aa244d8 --- /dev/null +++ b/game/objects/tutorial/jump_pad.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://3372ayctb2ed"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_206pc"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_6w0xc"] +atlas = ExtResource("1_206pc") +region = Rect2(80, 96, 32, 32) + +[node name="JumpPad" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_6w0xc") diff --git a/game/objects/tutorial/movement_kbd.tscn b/game/objects/tutorial/movement_kbd.tscn new file mode 100644 index 0000000..856e2f2 --- /dev/null +++ b/game/objects/tutorial/movement_kbd.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://cemhsfdru4pv6"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_pa6ll"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_v0og1"] +atlas = ExtResource("1_pa6ll") +region = Rect2(0, 64, 48, 32) + +[node name="MovementKbd" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_v0og1") diff --git a/game/objects/tutorial/movement_pad.tscn b/game/objects/tutorial/movement_pad.tscn new file mode 100644 index 0000000..a34a2ab --- /dev/null +++ b/game/objects/tutorial/movement_pad.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://tipop68pyrf7"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_crf2r"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_00r84"] +atlas = ExtResource("1_crf2r") +region = Rect2(80, 48, 32, 48) + +[node name="MovementPad" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_00r84") diff --git a/game/objects/tutorial/switch_kbd.tscn b/game/objects/tutorial/switch_kbd.tscn new file mode 100644 index 0000000..589bc4a --- /dev/null +++ b/game/objects/tutorial/switch_kbd.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://deo60sij43ibm"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_t6r5l"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_lviuj"] +atlas = ExtResource("1_t6r5l") +region = Rect2(48, 64, 32, 32) + +[node name="SwitchKbd" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_lviuj") diff --git a/game/objects/tutorial/switch_pad.tscn b/game/objects/tutorial/switch_pad.tscn new file mode 100644 index 0000000..d1f11eb --- /dev/null +++ b/game/objects/tutorial/switch_pad.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://f70xseggdimg"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_d2iw1"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_nyhjv"] +atlas = ExtResource("1_d2iw1") +region = Rect2(112, 64, 32, 32) + +[node name="SwitchPad" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_nyhjv") diff --git a/game/objects/wardrobe.tscn b/game/objects/wardrobe.tscn new file mode 100644 index 0000000..6d90330 --- /dev/null +++ b/game/objects/wardrobe.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://cvhovmnl050os"] + +[ext_resource type="Texture2D" uid="uid://ddm4gc2g3aj2i" path="res://images/level/objects.png" id="1_610bq"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_wbqlk"] +atlas = ExtResource("1_610bq") +region = Rect2(144, 80, 32, 48) + +[node name="Wardrobe" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("AtlasTexture_wbqlk") diff --git a/game/shaders/black_n_white.gdshader b/game/shaders/black_n_white.gdshader new file mode 100644 index 0000000..2d492d9 --- /dev/null +++ b/game/shaders/black_n_white.gdshader @@ -0,0 +1,57 @@ +shader_type canvas_item; + +uniform vec4 black_color : source_color = vec4(0.0, 0.0, 0.0, 1.0); +uniform vec4 white_color : source_color = vec4(1.0, 1.0, 1.0, 1.0); +uniform bool switch_colors = false; +uniform float threshold : hint_range(0.0, 1.0) = 0.5; +uniform float speed : hint_range(0.0, 10.0) = 5.0; +uniform float intensity : hint_range(0.0, 1.0) = 1.0; +uniform float scale : hint_range(0.0, 100.0) = 20.0; + +float rand(vec2 coord) { + return fract(sin(dot(coord, vec2(12.9898, 78.233))) * 43758.5453); +} + +float cellular(vec2 coord) { + vec2 i = floor(coord); + vec2 f = fract(coord); + + float min_dist = 1.0; + + for (int y = -1; y <= 1; y++) { + for (int x = -1; x <= 1; x++) { + vec2 neighbor = vec2(float(x), float(y)); + vec2 point = vec2(rand(i + neighbor), rand(i + neighbor + vec2(1000.0))); + point = 0.5 * sin(TIME * speed + 6.2831 * point); + vec2 diff = neighbor + point - f; + float dist = length(diff); + min_dist = min(min_dist, dist); + } + } + + return min_dist; +} + +void fragment() { + if (COLOR.a != 0.0) { + float l = dot(COLOR.rgb, vec3(0.2126, 0.7152, 0.0722)); + + bool is_black = l < threshold; + if (switch_colors) { + is_black = !is_black; + } + if (intensity < 1.0) { + vec2 coord = UV * scale; + if (cellular(coord) > intensity) { + is_black = !is_black; + } + } + + if (is_black) { + COLOR = black_color; + } + else { + COLOR = white_color; + } + } +} diff --git a/game/shaders/black_n_white.gdshader.uid b/game/shaders/black_n_white.gdshader.uid new file mode 100644 index 0000000..f153cda --- /dev/null +++ b/game/shaders/black_n_white.gdshader.uid @@ -0,0 +1 @@ +uid://lqq1mg6l1qqe diff --git a/images/characters/player.png b/images/characters/player.png new file mode 100644 index 0000000..b3a4cf9 --- /dev/null +++ b/images/characters/player.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39e023f253f00b74564f78c15e6b7c19e8109a6477fab58fcfa7a564545cbffb +size 1537 diff --git a/images/characters/player.png.import b/images/characters/player.png.import new file mode 100644 index 0000000..3acabd0 --- /dev/null +++ b/images/characters/player.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bjccaucrio6ht" +path="res://.godot/imported/player.png-5f49332281133e69aa5109551396d05d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://images/characters/player.png" +dest_files=["res://.godot/imported/player.png-5f49332281133e69aa5109551396d05d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +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 +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=1 diff --git a/images/fonts/font16.png b/images/fonts/font16.png index 658a949..a5148be 100644 --- a/images/fonts/font16.png +++ b/images/fonts/font16.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5fe6bf53384e1050b2ca8e6e3fb6274d94f2d1a4b5a9c98e3173a00a38ebb6c -size 2090 +oid sha256:467a994296a476b43cd25c3ada9c26e61f064f89d259810ac751f74967e41e98 +size 2029 diff --git a/images/fonts/font8.png b/images/fonts/font8.png index af50f6d..6ed647e 100644 --- a/images/fonts/font8.png +++ b/images/fonts/font8.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7228f928f062c70f925192d4eb2bb04d52425f75961e396d6bcf3dbdc255516 -size 841 +oid sha256:91f9a244b4d35b0f1fde6117931dd5ff9cbdc1fc86ed6b7933e695880c4b3085 +size 781 diff --git a/images/level/objects.png b/images/level/objects.png new file mode 100644 index 0000000..d20150e --- /dev/null +++ b/images/level/objects.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5302f45b5099f9adbe5d64702637d5683a50554ad9ea8df85ae01a7ffde9111d +size 1350 diff --git a/images/level/objects.png.import b/images/level/objects.png.import new file mode 100644 index 0000000..5d896b9 --- /dev/null +++ b/images/level/objects.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddm4gc2g3aj2i" +path="res://.godot/imported/objects.png-f7154094cfbaa01e307043cb6ee75c2e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://images/level/objects.png" +dest_files=["res://.godot/imported/objects.png-f7154094cfbaa01e307043cb6ee75c2e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +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 +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=1 diff --git a/images/level/pickups.png b/images/level/pickups.png new file mode 100644 index 0000000..954c39b --- /dev/null +++ b/images/level/pickups.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88a93d46a1115b6c2f06987da713ef2df7c2dcf48e00ca73b0434bf8fd6aa564 +size 218 diff --git a/images/level/pickups.png.import b/images/level/pickups.png.import new file mode 100644 index 0000000..03ad269 --- /dev/null +++ b/images/level/pickups.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ybf6pbve48lv" +path="res://.godot/imported/pickups.png-2122b44151a10fa1fe59c411e1430552.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://images/level/pickups.png" +dest_files=["res://.godot/imported/pickups.png-2122b44151a10fa1fe59c411e1430552.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +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 +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=1 diff --git a/images/level/walls.png b/images/level/walls.png new file mode 100644 index 0000000..eda0ecf --- /dev/null +++ b/images/level/walls.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d12f371252bdf4a77554b1f8be200f907c7b31deca152882df2de5aab09f34b9 +size 842 diff --git a/images/level/walls.png.import b/images/level/walls.png.import new file mode 100644 index 0000000..d172fc4 --- /dev/null +++ b/images/level/walls.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://due8mmt5ww1sf" +path="res://.godot/imported/walls.png-37a3ca517acd966878c86ac131ff4ba1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://images/level/walls.png" +dest_files=["res://.godot/imported/walls.png-37a3ca517acd966878c86ac131ff4ba1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +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 +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=1 diff --git a/project.godot b/project.godot index 3473822..51ff1fa 100644 --- a/project.godot +++ b/project.godot @@ -13,6 +13,7 @@ config_version=5 config/name="OneBitGameJam8" run/main_scene="uid://c4iica45gnke0" config/features=PackedStringArray("4.5", "GL Compatibility") +boot_splash/bg_color=Color(0, 0, 0, 1) config/icon="res://icon.svg" [autoload] @@ -20,6 +21,10 @@ config/icon="res://icon.svg" SettingsManager="*res://game/managers/settings_manager.tscn" SoundManager="*res://game/managers/sound_manager.tscn" +[debug] + +gdscript/warnings/untyped_declaration=1 + [display] window/size/viewport_width=640 @@ -75,6 +80,79 @@ ui_down={ , 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) ] } +move_left={ +"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":97,"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(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) +] +} +move_right={ +"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) +, 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":14,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) +] +} +move_up={ +"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":119,"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":11,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) +] +} +move_down={ +"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":83,"key_label":0,"unicode":115,"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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) +] +} +jump={ +"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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null) +] +} +switch_color={ +"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":81,"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":4194326,"key_label":0,"unicode":0,"location":2,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null) +] +} +interact={ +"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":69,"key_label":0,"unicode":101,"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":4194309,"key_label":0,"unicode":0,"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":4194310,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"script":null) +] +} +pause={ +"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":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null) +] +} + +[layer_names] + +2d_physics/layer_1="Grey world" +2d_physics/layer_2="Black world" +2d_physics/layer_3="Black enemy" +2d_physics/layer_4="Black player" +2d_physics/layer_5="Grey enemy" +2d_physics/layer_6="White world" +2d_physics/layer_7="White enemy" +2d_physics/layer_8="White player" [rendering]