From 27e588b98c91ff026ef70254129f37a96ca7b1f6 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sun, 18 Aug 2024 21:06:01 +0200 Subject: [PATCH 01/11] delete unused stuff --- gmtk_2024/objects/ResizableBlockSmall.tscn | 21 ------------ gmtk_2024/scripts/ui_actions.gd | 40 ---------------------- 2 files changed, 61 deletions(-) delete mode 100644 gmtk_2024/objects/ResizableBlockSmall.tscn delete mode 100644 gmtk_2024/scripts/ui_actions.gd diff --git a/gmtk_2024/objects/ResizableBlockSmall.tscn b/gmtk_2024/objects/ResizableBlockSmall.tscn deleted file mode 100644 index a3225fd..0000000 --- a/gmtk_2024/objects/ResizableBlockSmall.tscn +++ /dev/null @@ -1,21 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://0jn86aogkcne"] - -[ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_bulc3"] -[ext_resource type="Texture2D" uid="uid://dyl3dsoub6pmu" path="res://textures/block-small.png" id="2_42gyy"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_vlk61"] -size = Vector2(30, 30) - -[node name="Block" type="StaticBody2D"] -collision_layer = 17 -collision_mask = 22 -input_pickable = true -script = ExtResource("1_bulc3") - -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("2_42gyy") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_vlk61") - -[connection signal="input_event" from="." to="." method="_on_input_event"] diff --git a/gmtk_2024/scripts/ui_actions.gd b/gmtk_2024/scripts/ui_actions.gd deleted file mode 100644 index fbd3792..0000000 --- a/gmtk_2024/scripts/ui_actions.gd +++ /dev/null @@ -1,40 +0,0 @@ -extends Node - -@export var player : CharacterBody2D -@export var scale_duration: float = 0.5 -var current_selected = "none" -var target_scale_player: Vector2 = Vector2(1, 1) - -func _on_input_event(viewport, event, shape_idx): - if event.is_action_pressed("click"): - var nearest_block = player.find_nearest_block() - if nearest_block and current_selected == "scale_up": - nearest_block.scale_up() - scale_up_player() - elif nearest_block: - nearest_block.scale_down() - scale_down_player() - -func select_up(): - current_selected = "scale_up" - -func select_down(): - current_selected = "scale_down" - -func select_mirror(): - current_selected = "mirror" - -func start_scaling(target_node: Node2D, scale_value: Vector2): - var tween = create_tween() - tween.tween_property(target_node, "scale", scale_value, scale_duration) - -func scale_up_player(): - target_scale_player = Vector2(3.0, 3.0) - start_scaling(player, target_scale_player) - -func scale_down_player(): - target_scale_player = Vector2(1.0, 1.0) - start_scaling(player, target_scale_player) - -func mirror(): - pass # Mirror-Funktionalität hier einfügen From 1f320466171348462191bc09aebbb4b0e87a0a86 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sun, 18 Aug 2024 21:18:52 +0200 Subject: [PATCH 02/11] clean up --- gmtk_2024/levels/level_1.tscn | 36 +++++++-------------- gmtk_2024/levels/level_test.tscn | 31 +++++++----------- gmtk_2024/menu/level_menu/level_button.tscn | 6 ++-- gmtk_2024/objects/Player.tscn | 2 +- gmtk_2024/objects/ResizableBlockBig.tscn | 2 +- gmtk_2024/objects/ResizableBlockSmall.tscn | 21 ++++++++++++ 6 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 gmtk_2024/objects/ResizableBlockSmall.tscn diff --git a/gmtk_2024/levels/level_1.tscn b/gmtk_2024/levels/level_1.tscn index 6caac36..78d00ec 100644 --- a/gmtk_2024/levels/level_1.tscn +++ b/gmtk_2024/levels/level_1.tscn @@ -3,9 +3,9 @@ [ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] [ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] [ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] -[ext_resource type="Texture2D" uid="uid://c61y0181w3sq2" path="res://textures/Level 01.png" id="5_4p03u"] -[ext_resource type="PackedScene" path="res://objects/Goal.tscn" id="6_xhax5"] -[ext_resource type="PackedScene" path="res://objects/MirrorOrb.tscn" id="7_dyi0e"] +[ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] +[ext_resource type="PackedScene" uid="uid://d0gpnqknarkg7" path="res://objects/Goal.tscn" id="6_xhax5"] +[ext_resource type="PackedScene" uid="uid://cpa66thuxma15" path="res://objects/MirrorOrb.tscn" id="7_dyi0e"] [ext_resource type="PackedScene" uid="uid://vtwswrkfkgas" path="res://objects/EnemyMover.tscn" id="8_16072"] [ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] [ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] @@ -131,17 +131,7 @@ shader_parameter/scroll_speed = 0.02 position = Vector2(-254, 99) input_pickable = true -[node name="UI" parent="UILayer" index="0" node_paths=PackedStringArray("player")] -visible = false -mouse_filter = 2 -player = NodePath("../../Player") - -[node name="HBoxContainer" parent="UILayer/UI" index="0"] -offset_right = 296.0 -offset_bottom = 96.0 -mouse_filter = 0 - -[node name="Walls" parent="." index="4"] +[node name="Walls" parent="." index="3"] collision_mask = 22 [node name="Ground" parent="Walls" index="0"] @@ -156,12 +146,12 @@ position = Vector2(-320, 26) [node name="RightWall" parent="Walls" index="3"] position = Vector2(338, 15) -[node name="Layer0" type="TileMapLayer" parent="." index="5"] +[node name="Layer0" type="TileMapLayer" parent="." index="4"] use_parent_material = true tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAAAAAAAGAAIAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") tile_set = SubResource("TileSet_n3khe") -[node name="TextureRect" type="TextureRect" parent="." index="6"] +[node name="TextureRect" type="TextureRect" parent="." index="5"] z_index = -100 material = SubResource("ShaderMaterial_mvq46") anchors_preset = 15 @@ -176,23 +166,21 @@ grow_vertical = 2 texture = ExtResource("5_4p03u") stretch_mode = 1 -[node name="Goal" parent="." index="7" instance=ExtResource("6_xhax5")] +[node name="Goal" parent="." index="6" instance=ExtResource("6_xhax5")] position = Vector2(582, -317) -[node name="MirrorOrb" parent="." index="8" instance=ExtResource("7_dyi0e")] +[node name="MirrorOrb" parent="." index="7" instance=ExtResource("7_dyi0e")] position = Vector2(-431, -212) -[node name="EnemyMover" parent="." index="9" instance=ExtResource("8_16072")] +[node name="EnemyMover" parent="." index="8" instance=ExtResource("8_16072")] position = Vector2(-132, 311) -[node name="Block" parent="." index="10" node_paths=PackedStringArray("ui_actions") instance=ExtResource("8_ec71m")] +[node name="Block" parent="." index="9" instance=ExtResource("8_ec71m")] position = Vector2(-65, 63) -ui_actions = NodePath("../UILayer/UI") -[node name="Block2" parent="." index="11" node_paths=PackedStringArray("ui_actions") instance=ExtResource("8_ec71m")] +[node name="Block2" parent="." index="10" instance=ExtResource("8_ec71m")] position = Vector2(-255, -32) scale = Vector2(0.5, 0.5) -ui_actions = NodePath("../UILayer/UI") -[node name="BreakableBlock" parent="." index="12" instance=ExtResource("9_2ia1u")] +[node name="BreakableBlock" parent="." index="11" instance=ExtResource("9_2ia1u")] position = Vector2(241, -47) diff --git a/gmtk_2024/levels/level_test.tscn b/gmtk_2024/levels/level_test.tscn index 2306bd8..21d5217 100644 --- a/gmtk_2024/levels/level_test.tscn +++ b/gmtk_2024/levels/level_test.tscn @@ -3,9 +3,9 @@ [ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_5gkl4"] [ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_qg46i"] [ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="3_rojjv"] -[ext_resource type="Texture2D" uid="uid://c61y0181w3sq2" path="res://textures/Level 01.png" id="4_nk0bq"] -[ext_resource type="PackedScene" path="res://objects/Goal.tscn" id="5_3ut8w"] -[ext_resource type="PackedScene" path="res://objects/MirrorOrb.tscn" id="6_jm8e5"] +[ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="4_nk0bq"] +[ext_resource type="PackedScene" uid="uid://d0gpnqknarkg7" path="res://objects/Goal.tscn" id="5_3ut8w"] +[ext_resource type="PackedScene" uid="uid://cpa66thuxma15" path="res://objects/MirrorOrb.tscn" id="6_jm8e5"] [ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="7_82440"] [ext_resource type="PackedScene" uid="uid://vtwswrkfkgas" path="res://objects/EnemyMover.tscn" id="8_m2r3p"] @@ -130,25 +130,18 @@ shader_parameter/scroll_speed = 0.02 position = Vector2(-542, 331) scale = Vector2(2, 2) -[node name="UI" parent="UILayer" index="0" node_paths=PackedStringArray("player")] -mouse_filter = 2 -player = NodePath("../../Player") - -[node name="HBoxContainer" parent="UILayer/UI" index="0"] -mouse_filter = 0 - -[node name="Walls" parent="." index="4"] +[node name="Walls" parent="." index="3"] collision_mask = 22 [node name="LeftWall" parent="Walls" index="2"] position = Vector2(-665, 14) -[node name="Layer0" type="TileMapLayer" parent="." index="5"] +[node name="Layer0" type="TileMapLayer" parent="." index="4"] use_parent_material = true tile_map_data = PackedByteArray("AADt/wsAAAABAAAAAADu/wsAAAABAAAAAADv/wsAAAABAAAAAADw/wsAAAABAAAAAADx/wsAAAABAAAAAADy/wsAAAABAAAAAADz/wsAAAABAAAAAAD0/wsAAAABAAAAAAD1/wsAAAABAAAAAAD2/wsAAAABAAAAAAD3/wsAAAABAAAAAAD4/wsAAAABAAAAAAD5/wsAAAABAAAAAAD6/wsAAAABAAAAAAD7/wsAAAABAAAAAAD8/wsAAAABAAAAAAD9/wsAAAABAAAAAAD+/wsAAAABAAAAAAD//wsAAAABAAAAAAAAAAsAAAABAAAAAAABAAsAAAABAAAAAAACAAsAAAABAAAAAAADAAsAAAABAAAAAAAEAAsAAAABAAAAAAAFAAsAAAABAAAAAAAGAAsAAAABAAAAAAAHAAsAAAABAAAAAAAIAAsAAAABAAAAAAAJAAsAAAABAAAAAAAKAAsAAAAFAAIAAAALAAsAAAABAAEAAAAMAAsAAAABAAEAAAANAAsAAAABAAEAAAAOAAsAAAABAAEAAAAPAAsAAAABAAEAAAAQAAsAAAABAAEAAAARAAsAAAABAAEAAAASAAsAAAABAAEAAAATAAsAAAABAAEAAAAKAPT/AAABAAIAAAALAPT/AAABAAIAAAAMAPT/AAABAAIAAAANAPT/AAABAAIAAAATAPT/AAAFAAAAAAASAPT/AAABAAIAAAARAPT/AAABAAIAAAAQAPT/AAABAAIAAAAPAPT/AAABAAIAAAAOAPT/AAABAAIAAAAJAPT/AAABAAIAAAAIAPT/AAABAAIAAAAHAPT/AAABAAIAAAAGAPT/AAABAAIAAAAFAPT/AAABAAIAAAAEAPT/AAABAAIAAAADAPT/AAABAAIAAAACAPT/AAABAAIAAAD5//T/AAABAAIAAAD4//T/AAABAAIAAAD3//T/AAABAAIAAAD2//T/AAABAAIAAAD1//T/AAABAAIAAAD0//T/AAABAAIAAADz//T/AAABAAIAAADy//T/AAABAAIAAADx//T/AAABAAIAAADw//T/AAABAAIAAADv//T/AAABAAIAAADu//T/AAABAAIAAADt//T/AAABAAIAAADs//T/AAADAAAAAAD6//T/AAABAAIAAAD7//T/AAABAAIAAAD8//T/AAABAAIAAAD9//T/AAABAAIAAAD+//T/AAABAAIAAAD///T/AAABAAIAAAAAAPT/AAABAAIAAAABAPT/AAABAAIAAADs/woAAAACAAEAAADs/wkAAAACAAEAAADs/wgAAAACAAEAAADs/wcAAAACAAEAAADs/wYAAAADAAAAAADs/wUAAAABAAEAAADs/wQAAAABAAEAAADs/wMAAAADAAIAAADs/wIAAAACAAEAAADs/wEAAAACAAEAAADs/wAAAAABAAEAAADs////AAABAAEAAADs//7/AAADAAIAAADs//3/AAACAAEAAADs//z/AAACAAEAAADs//v/AAACAAEAAADs//r/AAACAAEAAADs//X/AAACAAEAAADs//b/AAACAAEAAADs//f/AAACAAEAAADs//j/AAACAAEAAADs//n/AAACAAEAAAATAPX/AAAAAAEAAAATAPb/AAAAAAEAAAATAPf/AAAFAAIAAAATAPj/AAABAAEAAAATAPn/AAABAAEAAAATAPr/AAABAAEAAAATAPv/AAABAAEAAAATAPz/AAAFAAAAAAATAP3/AAAAAAEAAAATAP7/AAAAAAEAAAATAP//AAAAAAEAAAATAAAAAAAAAAEAAAATAAEAAAAAAAEAAAATAAIAAAAAAAEAAAATAAMAAAAAAAEAAAATAAQAAAAAAAEAAAATAAUAAAAAAAEAAAATAAYAAAAAAAEAAAATAAcAAAAAAAEAAAATAAgAAAAAAAEAAAATAAkAAAAFAAIAAAATAAoAAAABAAEAAAAKAAkAAAAAAAAAAAAKAAoAAAAAAAEAAAALAAkAAAABAAAAAAALAAoAAAABAAEAAAAMAAkAAAABAAAAAAAMAAoAAAABAAEAAAANAAkAAAABAAAAAAANAAoAAAABAAEAAAAOAAkAAAABAAAAAAAOAAoAAAABAAEAAAAPAAkAAAABAAAAAAAPAAoAAAABAAEAAAAQAAkAAAABAAAAAAAQAAoAAAABAAEAAAARAAkAAAABAAAAAAARAAoAAAABAAEAAAASAAkAAAABAAAAAAASAAoAAAABAAEAAADt/wMAAAABAAAAAADt/wQAAAABAAEAAADt/wUAAAABAAEAAADt/wYAAAABAAIAAADu/wMAAAABAAAAAADu/wQAAAABAAEAAADu/wUAAAABAAEAAADu/wYAAAABAAIAAADv/wMAAAABAAAAAADv/wQAAAABAAEAAADv/wUAAAABAAEAAADv/wYAAAABAAIAAADw/wMAAAABAAAAAADw/wQAAAABAAEAAADw/wUAAAABAAEAAADw/wYAAAABAAIAAADx/wMAAAABAAAAAADx/wQAAAABAAEAAADx/wUAAAABAAEAAADx/wYAAAABAAIAAADy/wMAAAABAAAAAADy/wQAAAABAAEAAADy/wUAAAABAAEAAADy/wYAAAABAAIAAADz/wMAAAABAAAAAADz/wQAAAABAAEAAADz/wUAAAABAAEAAADz/wYAAAABAAIAAAD0/wMAAAABAAAAAAD0/wQAAAABAAEAAAD0/wUAAAABAAEAAAD0/wYAAAABAAIAAAD1/wMAAAABAAAAAAD1/wQAAAABAAEAAAD1/wUAAAABAAEAAAD1/wYAAAABAAIAAAD2/wMAAAABAAAAAAD2/wQAAAABAAEAAAD2/wUAAAABAAEAAAD2/wYAAAABAAIAAAD3/wMAAAABAAAAAAD3/wQAAAABAAEAAAD3/wUAAAABAAEAAAD3/wYAAAABAAIAAAD4/wMAAAABAAAAAAD4/wQAAAABAAEAAAD4/wUAAAABAAEAAAD4/wYAAAABAAIAAAD5/wMAAAABAAAAAAD5/wQAAAABAAEAAAD5/wUAAAABAAEAAAD5/wYAAAABAAIAAAD6/wMAAAABAAAAAAD6/wQAAAABAAEAAAD6/wUAAAABAAEAAAD6/wYAAAABAAIAAAD7/wMAAAABAAAAAAD7/wQAAAABAAEAAAD7/wUAAAABAAEAAAD7/wYAAAABAAIAAAD8/wMAAAABAAAAAAD8/wQAAAABAAEAAAD8/wUAAAABAAEAAAD8/wYAAAABAAIAAAD9/wMAAAABAAAAAAD9/wQAAAABAAEAAAD9/wUAAAABAAEAAAD9/wYAAAABAAIAAAD+/wMAAAABAAAAAAD+/wQAAAABAAEAAAD+/wUAAAABAAEAAAD+/wYAAAABAAIAAAD//wMAAAABAAAAAAD//wQAAAABAAEAAAD//wUAAAABAAEAAAD//wYAAAABAAIAAAAAAAMAAAABAAAAAAAAAAQAAAABAAEAAAAAAAUAAAABAAEAAAAAAAYAAAABAAIAAAABAAMAAAACAAAAAAABAAQAAAADAAIAAAABAAUAAAABAAEAAAABAAYAAAABAAIAAAACAAQAAAAEAAIAAAACAAUAAAABAAEAAAACAAYAAAABAAIAAAADAAQAAAACAAAAAAADAAUAAAADAAIAAAADAAYAAAABAAIAAAAEAAUAAAAEAAIAAAAEAAYAAAABAAIAAAAFAAUAAAACAAAAAAAFAAYAAAAGAAEAAAAGAAYAAAAIAAAAAwD7/wAAAAABAAIAAAD8/wAAAAABAAIAAAD9/wAAAAABAAIAAAD+/wAAAAABAAIAAAD//wAAAAABAAIAAAAAAAAAAAACAAIAAAD7////AAABAAEAAAD8////AAABAAEAAAD9////AAABAAEAAAD+////AAABAAEAAAD/////AAABAAEAAAAAAP//AAACAAEAAAAAAP7/AAACAAAAAAD///7/AAABAAAAAAD+//7/AAABAAAAAAD9//7/AAABAAAAAAD8//7/AAABAAAAAAD7//7/AAABAAAAAAD6/wAAAAABAAIAAAD5/wAAAAABAAIAAAD4/wAAAAABAAIAAAD3/wAAAAAHAAEAAAD2/wAAAAAIAAAAAgD3////AAAAAAAAAAD4////AAAFAAIAAAD4//7/AAAAAAAAAAD5//7/AAABAAAAAAD6//7/AAABAAAAAAD6////AAABAAEAAAD5////AAABAAEAAADz/wAAAAAIAAAAAwDy/wAAAAAGAAEAAADy////AAACAAAAAADx////AAABAAEAAADw////AAABAAEAAADv////AAABAAEAAADv//7/AAABAAAAAADu//7/AAABAAAAAADt//7/AAABAAAAAADt////AAABAAEAAADu////AAABAAEAAADv/wAAAAABAAIAAADw/wAAAAABAAIAAADx/wAAAAABAAIAAADu/wAAAAABAAIAAADt/wAAAAABAAIAAADw//7/AAABAAAAAADx//7/AAACAAAAAADy//v/AAAIAAAAAgDz//z/AAAAAAIAAAD0//3/AAAAAAIAAAD1//3/AAACAAIAAAD2//z/AAACAAIAAAD3//v/AAAIAAAAAwDz//v/AAAHAAAAAAD0//v/AAABAAAAAAD1//v/AAABAAAAAAD2//v/AAAGAAAAAAD0//z/AAABAAEAAAD1//z/AAABAAEAAAD6//n/AAAIAAAAAgD7//n/AAAHAAAAAAD8//n/AAABAAEAAAD8//j/AAAAAAAAAAD9//j/AAACAAAAAAD9//n/AAABAAEAAAD+//n/AAAGAAAAAAD///n/AAAIAAAAAwD7//r/AAAAAAIAAAD8//r/AAABAAEAAAD9//r/AAABAAEAAAD+//r/AAACAAIAAAD8//v/AAAAAAIAAAD9//v/AAACAAIAAAADAPj/AAAIAAAAAgAEAPj/AAAHAAAAAAAFAPj/AAABAAAAAAAGAPj/AAABAAAAAAAHAPj/AAABAAAAAAAIAPj/AAABAAAAAAAJAPj/AAABAAAAAAAKAPj/AAABAAAAAAALAPj/AAAFAAIAAAALAPf/AAAAAAAAAAAMAPf/AAABAAAAAAANAPf/AAABAAAAAAAOAPf/AAABAAAAAAAPAPf/AAABAAAAAAAQAPf/AAABAAAAAAARAPf/AAABAAAAAAASAPf/AAABAAAAAAASAPj/AAABAAEAAAARAPj/AAABAAEAAAAQAPj/AAABAAEAAAAPAPj/AAABAAEAAAAOAPn/AAABAAEAAAANAPn/AAABAAEAAAAMAPn/AAABAAEAAAAMAPj/AAABAAEAAAANAPj/AAABAAEAAAAOAPj/AAABAAEAAAASAPn/AAABAAEAAAARAPn/AAABAAEAAAAQAPn/AAABAAEAAAAPAPn/AAABAAEAAAALAPn/AAABAAEAAAAKAPn/AAABAAEAAAAJAPn/AAABAAEAAAAIAPn/AAABAAEAAAAHAPn/AAABAAEAAAAGAPn/AAABAAEAAAAFAPn/AAAFAAAAAAAEAPn/AAAAAAIAAAAFAPr/AAAAAAIAAAAGAPr/AAABAAIAAAAHAPr/AAABAAIAAAAIAPr/AAABAAEAAAAJAPr/AAABAAEAAAAKAPr/AAABAAEAAAALAPr/AAABAAEAAAAMAPr/AAABAAEAAAANAPr/AAABAAEAAAAOAPr/AAABAAEAAAAPAPr/AAABAAEAAAAQAPr/AAABAAEAAAARAPr/AAABAAEAAAASAPr/AAABAAEAAAAQAPv/AAABAAEAAAAPAPv/AAABAAEAAAAOAPv/AAABAAEAAAANAPv/AAABAAEAAAAMAPv/AAABAAEAAAALAPv/AAAFAAAAAAAKAPv/AAABAAIAAAAJAPv/AAABAAIAAAAIAPv/AAAAAAIAAAARAPv/AAABAAEAAAASAPv/AAABAAEAAAASAPz/AAABAAIAAAARAPz/AAABAAIAAAAQAPz/AAABAAIAAAAPAPz/AAABAAIAAAAOAPz/AAABAAIAAAANAPz/AAABAAIAAAAMAPz/AAABAAIAAAALAPz/AAAAAAIAAADs/wsAAAADAAIAAAA=") tile_set = SubResource("TileSet_n3khe") -[node name="TextureRect" type="TextureRect" parent="." index="6"] +[node name="TextureRect" type="TextureRect" parent="." index="5"] z_index = -100 material = SubResource("ShaderMaterial_mvq46") anchors_preset = 15 @@ -163,21 +156,19 @@ grow_vertical = 2 texture = ExtResource("4_nk0bq") stretch_mode = 1 -[node name="Goal" parent="." index="7" instance=ExtResource("5_3ut8w")] +[node name="Goal" parent="." index="6" instance=ExtResource("5_3ut8w")] position = Vector2(582, -317) -[node name="MirrorOrb" parent="." index="8" instance=ExtResource("6_jm8e5")] +[node name="MirrorOrb" parent="." index="7" instance=ExtResource("6_jm8e5")] position = Vector2(-431, -212) -[node name="Block" parent="." index="9" node_paths=PackedStringArray("ui_actions") instance=ExtResource("7_82440")] +[node name="Block" parent="." index="8" instance=ExtResource("7_82440")] position = Vector2(432, 186) collision_layer = 1 -ui_actions = NodePath("../UILayer/UI") -[node name="EnemyMover" parent="." index="10" instance=ExtResource("8_m2r3p")] +[node name="EnemyMover" parent="." index="9" instance=ExtResource("8_m2r3p")] position = Vector2(-132, 311) -[node name="Block3" parent="." index="11" node_paths=PackedStringArray("ui_actions") instance=ExtResource("7_82440")] +[node name="Block3" parent="." index="10" instance=ExtResource("7_82440")] position = Vector2(162, 124) collision_layer = 1 -ui_actions = NodePath("../UILayer/UI") diff --git a/gmtk_2024/menu/level_menu/level_button.tscn b/gmtk_2024/menu/level_menu/level_button.tscn index 6fe7b1c..387d748 100644 --- a/gmtk_2024/menu/level_menu/level_button.tscn +++ b/gmtk_2024/menu/level_menu/level_button.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=7 format=3 uid="uid://t83eid7pf4iv"] -[ext_resource type="Texture2D" uid="uid://yg2u8vwwbpv1" path="res://textures/File-Icon.png" id="1_2sfn6"] -[ext_resource type="Texture2D" uid="uid://bc2ictes4mln1" path="res://textures/File-Icon-Closed.png" id="2_6ev1f"] +[ext_resource type="Texture2D" uid="uid://c4w61tw3unihl" path="res://textures/File-Icon.png" id="1_2sfn6"] +[ext_resource type="Texture2D" uid="uid://b46utc5xhr5w1" path="res://textures/File-Icon-Closed.png" id="2_6ev1f"] [ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="3_732s0"] -[ext_resource type="Texture2D" uid="uid://cp2ybylvgmek4" path="res://textures/File-Icon-Sheet.png" id="3_bbfoq"] +[ext_resource type="Texture2D" uid="uid://dvk7nu7pp4fl3" path="res://textures/File-Icon-Sheet.png" id="3_bbfoq"] [ext_resource type="Script" path="res://scripts/level_menu_level_button.gd" id="3_e83yn"] [sub_resource type="AtlasTexture" id="AtlasTexture_u313o"] diff --git a/gmtk_2024/objects/Player.tscn b/gmtk_2024/objects/Player.tscn index a549805..b6c72c0 100644 --- a/gmtk_2024/objects/Player.tscn +++ b/gmtk_2024/objects/Player.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://scripts/player_movement.gd" id="1_a6lhy"] [ext_resource type="Texture2D" uid="uid://qcx482jc7pqr" path="res://textures/player.png" id="2_sscjv"] -[ext_resource type="Texture2D" uid="uid://dfvxk0e8taj1d" path="res://textures/Eye Lase.png" id="3_yg3ur"] +[ext_resource type="Texture2D" uid="uid://bd7y5w6cfi5ly" path="res://textures/Eye Lase.png" id="3_yg3ur"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_jqi2f"] radius = 9.0 diff --git a/gmtk_2024/objects/ResizableBlockBig.tscn b/gmtk_2024/objects/ResizableBlockBig.tscn index d473fe6..c7cd8e9 100644 --- a/gmtk_2024/objects/ResizableBlockBig.tscn +++ b/gmtk_2024/objects/ResizableBlockBig.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=3 uid="uid://br6fngf5208j0"] -[ext_resource type="Texture2D" uid="uid://bplkveclkwuk" path="res://textures/block-blue.png" id="1_ejp7j"] +[ext_resource type="Texture2D" uid="uid://bqyd0blnkls1g" path="res://textures/block-blue.png" id="1_ejp7j"] [ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_j40bu"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_sgemy"] diff --git a/gmtk_2024/objects/ResizableBlockSmall.tscn b/gmtk_2024/objects/ResizableBlockSmall.tscn new file mode 100644 index 0000000..5fd49b7 --- /dev/null +++ b/gmtk_2024/objects/ResizableBlockSmall.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=4 format=3 uid="uid://dpg2s61eevjd"] + +[ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_bulc3"] +[ext_resource type="Texture2D" uid="uid://dbwquy34l8gd4" path="res://textures/block-small.png" id="2_42gyy"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_vlk61"] +size = Vector2(30, 30) + +[node name="Block" type="StaticBody2D"] +collision_layer = 17 +collision_mask = 22 +input_pickable = true +script = ExtResource("1_bulc3") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2_42gyy") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_vlk61") + +[connection signal="input_event" from="." to="." method="_on_input_event"] From d137d205ffab8574d8d8c14db61b7db267c1a52d Mon Sep 17 00:00:00 2001 From: Fabio Date: Sun, 18 Aug 2024 21:46:22 +0200 Subject: [PATCH 03/11] two changes added "Press R to Reset" and changed sprites for blocks --- gmtk_2024/levels/lev6913.tmp | 174 +++++++++++++++++++ gmtk_2024/levels/lev8F58.tmp | 174 +++++++++++++++++++ gmtk_2024/levels/levD9B8.tmp | 174 +++++++++++++++++++ gmtk_2024/levels/level_1.tscn | 20 +-- gmtk_2024/objects/ResizableBlockBig.tscn | 4 +- gmtk_2024/objects/ResizableBlockSmall.tscn | 21 --- gmtk_2024/project.godot | 5 + gmtk_2024/scripts/player_movement.gd | 8 +- gmtk_2024/scripts/resizable_block.gd | 4 +- gmtk_2024/textures/Modifi Blocks-Sheet.png | Bin 1012 -> 0 bytes gmtk_2024/textures/Modifi Blocks.png | Bin 1784 -> 0 bytes gmtk_2024/textures/antivirus-block-big.png | Bin 0 -> 411 bytes gmtk_2024/textures/antivirus-block-small.png | Bin 0 -> 405 bytes gmtk_2024/textures/block-blue.png | Bin 410 -> 0 bytes gmtk_2024/textures/block-orange.png | Bin 412 -> 0 bytes gmtk_2024/textures/block-small.png | Bin 338 -> 0 bytes gmtk_2024/textures/button-pressed.png | Bin 0 -> 283 bytes gmtk_2024/textures/button-unpressed.png | Bin 0 -> 299 bytes gmtk_2024/textures/movable-block-big.png | Bin 0 -> 422 bytes gmtk_2024/textures/movable-block-small.png | Bin 0 -> 413 bytes 20 files changed, 542 insertions(+), 42 deletions(-) create mode 100644 gmtk_2024/levels/lev6913.tmp create mode 100644 gmtk_2024/levels/lev8F58.tmp create mode 100644 gmtk_2024/levels/levD9B8.tmp delete mode 100644 gmtk_2024/objects/ResizableBlockSmall.tscn delete mode 100644 gmtk_2024/textures/Modifi Blocks-Sheet.png delete mode 100644 gmtk_2024/textures/Modifi Blocks.png create mode 100644 gmtk_2024/textures/antivirus-block-big.png create mode 100644 gmtk_2024/textures/antivirus-block-small.png delete mode 100644 gmtk_2024/textures/block-blue.png delete mode 100644 gmtk_2024/textures/block-orange.png delete mode 100644 gmtk_2024/textures/block-small.png create mode 100644 gmtk_2024/textures/button-pressed.png create mode 100644 gmtk_2024/textures/button-unpressed.png create mode 100644 gmtk_2024/textures/movable-block-big.png create mode 100644 gmtk_2024/textures/movable-block-small.png diff --git a/gmtk_2024/levels/lev6913.tmp b/gmtk_2024/levels/lev6913.tmp new file mode 100644 index 0000000..b13a83f --- /dev/null +++ b/gmtk_2024/levels/lev6913.tmp @@ -0,0 +1,174 @@ +[gd_scene load_steps=10 format=4 uid="uid://cxsstkfcffdch"] + +[ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] +[ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] +[ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] +[ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] +[ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] +[ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_e817v"] +texture = ExtResource("2_wqskp") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/next_alternative_id = 4 +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/1 = 1 +8:0/1/flip_v = true +8:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/2 = 2 +8:0/2/transpose = true +8:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/3 = 3 +8:0/3/flip_h = true +8:0/3/transpose = true +8:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:0/0 = 0 +10:0/0 = 0 +11:0/0 = 0 +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:1/0 = 0 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:1/0 = 0 +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:1/0 = 0 +10:1/0 = 0 +11:1/0 = 0 +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:2/0 = 0 +7:2/0 = 0 +10:2/0 = 0 +11:2/0 = 0 +0:3/0 = 0 +1:3/0 = 0 +2:3/0 = 0 +3:3/0 = 0 +4:3/0 = 0 +5:3/0 = 0 +6:3/0 = 0 +7:3/0 = 0 +10:3/0 = 0 +11:3/0 = 0 +0:4/0 = 0 +1:4/0 = 0 +2:4/0 = 0 +3:4/0 = 0 +4:4/0 = 0 +5:4/0 = 0 +6:4/0 = 0 +7:4/0 = 0 +8:4/0 = 0 +9:4/0 = 0 +10:4/0 = 0 +11:4/0 = 0 +0:5/0 = 0 +1:5/0 = 0 +2:5/0 = 0 +3:5/0 = 0 +4:5/0 = 0 +5:5/0 = 0 +6:5/0 = 0 +7:5/0 = 0 +8:5/0 = 0 +9:5/0 = 0 +10:5/0 = 0 +11:5/0 = 0 + +[sub_resource type="TileSet" id="TileSet_n3khe"] +tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 +sources/0 = SubResource("TileSetAtlasSource_e817v") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mvq46"] +shader = ExtResource("4_0x2h7") +shader_parameter/scroll_speed = 0.02 + +[node name="LevelBase" instance=ExtResource("1_87xn7")] + +[node name="Player" parent="." index="0"] +position = Vector2(-254, 99) +input_pickable = true + +[node name="Walls" parent="." index="3"] +collision_mask = 22 + +[node name="Ground" parent="Walls" index="0"] +position = Vector2(-7, 167) + +[node name="Ceiling" parent="Walls" index="1"] +position = Vector2(57, -171) + +[node name="LeftWall" parent="Walls" index="2"] +position = Vector2(-320, 26) + +[node name="RightWall" parent="Walls" index="3"] +position = Vector2(338, 15) + +[node name="Layer0" type="TileMapLayer" parent="." index="4"] +use_parent_material = true +tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAAAAAAAGAAIAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") +tile_set = SubResource("TileSet_n3khe") + +[node name="TextureRect" type="TextureRect" parent="." index="5"] +z_index = -100 +material = SubResource("ShaderMaterial_mvq46") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -320.0 +offset_top = -158.0 +offset_right = -320.0 +offset_bottom = -158.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("5_4p03u") +stretch_mode = 1 + +[node name="Block" parent="." index="6" instance=ExtResource("8_ec71m")] +position = Vector2(-65, 63) + +[node name="Block2" parent="." index="7" instance=ExtResource("8_ec71m")] +position = Vector2(-255, -32) +scale = Vector2(0.5, 0.5) + +[node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] +position = Vector2(241, -47) diff --git a/gmtk_2024/levels/lev8F58.tmp b/gmtk_2024/levels/lev8F58.tmp new file mode 100644 index 0000000..b13a83f --- /dev/null +++ b/gmtk_2024/levels/lev8F58.tmp @@ -0,0 +1,174 @@ +[gd_scene load_steps=10 format=4 uid="uid://cxsstkfcffdch"] + +[ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] +[ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] +[ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] +[ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] +[ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] +[ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_e817v"] +texture = ExtResource("2_wqskp") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/next_alternative_id = 4 +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/1 = 1 +8:0/1/flip_v = true +8:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/2 = 2 +8:0/2/transpose = true +8:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/3 = 3 +8:0/3/flip_h = true +8:0/3/transpose = true +8:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:0/0 = 0 +10:0/0 = 0 +11:0/0 = 0 +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:1/0 = 0 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:1/0 = 0 +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:1/0 = 0 +10:1/0 = 0 +11:1/0 = 0 +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:2/0 = 0 +7:2/0 = 0 +10:2/0 = 0 +11:2/0 = 0 +0:3/0 = 0 +1:3/0 = 0 +2:3/0 = 0 +3:3/0 = 0 +4:3/0 = 0 +5:3/0 = 0 +6:3/0 = 0 +7:3/0 = 0 +10:3/0 = 0 +11:3/0 = 0 +0:4/0 = 0 +1:4/0 = 0 +2:4/0 = 0 +3:4/0 = 0 +4:4/0 = 0 +5:4/0 = 0 +6:4/0 = 0 +7:4/0 = 0 +8:4/0 = 0 +9:4/0 = 0 +10:4/0 = 0 +11:4/0 = 0 +0:5/0 = 0 +1:5/0 = 0 +2:5/0 = 0 +3:5/0 = 0 +4:5/0 = 0 +5:5/0 = 0 +6:5/0 = 0 +7:5/0 = 0 +8:5/0 = 0 +9:5/0 = 0 +10:5/0 = 0 +11:5/0 = 0 + +[sub_resource type="TileSet" id="TileSet_n3khe"] +tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 +sources/0 = SubResource("TileSetAtlasSource_e817v") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mvq46"] +shader = ExtResource("4_0x2h7") +shader_parameter/scroll_speed = 0.02 + +[node name="LevelBase" instance=ExtResource("1_87xn7")] + +[node name="Player" parent="." index="0"] +position = Vector2(-254, 99) +input_pickable = true + +[node name="Walls" parent="." index="3"] +collision_mask = 22 + +[node name="Ground" parent="Walls" index="0"] +position = Vector2(-7, 167) + +[node name="Ceiling" parent="Walls" index="1"] +position = Vector2(57, -171) + +[node name="LeftWall" parent="Walls" index="2"] +position = Vector2(-320, 26) + +[node name="RightWall" parent="Walls" index="3"] +position = Vector2(338, 15) + +[node name="Layer0" type="TileMapLayer" parent="." index="4"] +use_parent_material = true +tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAAAAAAAGAAIAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") +tile_set = SubResource("TileSet_n3khe") + +[node name="TextureRect" type="TextureRect" parent="." index="5"] +z_index = -100 +material = SubResource("ShaderMaterial_mvq46") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -320.0 +offset_top = -158.0 +offset_right = -320.0 +offset_bottom = -158.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("5_4p03u") +stretch_mode = 1 + +[node name="Block" parent="." index="6" instance=ExtResource("8_ec71m")] +position = Vector2(-65, 63) + +[node name="Block2" parent="." index="7" instance=ExtResource("8_ec71m")] +position = Vector2(-255, -32) +scale = Vector2(0.5, 0.5) + +[node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] +position = Vector2(241, -47) diff --git a/gmtk_2024/levels/levD9B8.tmp b/gmtk_2024/levels/levD9B8.tmp new file mode 100644 index 0000000..b13a83f --- /dev/null +++ b/gmtk_2024/levels/levD9B8.tmp @@ -0,0 +1,174 @@ +[gd_scene load_steps=10 format=4 uid="uid://cxsstkfcffdch"] + +[ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] +[ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] +[ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] +[ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] +[ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] +[ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_e817v"] +texture = ExtResource("2_wqskp") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/next_alternative_id = 4 +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/1 = 1 +8:0/1/flip_v = true +8:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/2 = 2 +8:0/2/transpose = true +8:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/3 = 3 +8:0/3/flip_h = true +8:0/3/transpose = true +8:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:0/0 = 0 +10:0/0 = 0 +11:0/0 = 0 +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:1/0 = 0 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:1/0 = 0 +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:1/0 = 0 +10:1/0 = 0 +11:1/0 = 0 +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:2/0 = 0 +7:2/0 = 0 +10:2/0 = 0 +11:2/0 = 0 +0:3/0 = 0 +1:3/0 = 0 +2:3/0 = 0 +3:3/0 = 0 +4:3/0 = 0 +5:3/0 = 0 +6:3/0 = 0 +7:3/0 = 0 +10:3/0 = 0 +11:3/0 = 0 +0:4/0 = 0 +1:4/0 = 0 +2:4/0 = 0 +3:4/0 = 0 +4:4/0 = 0 +5:4/0 = 0 +6:4/0 = 0 +7:4/0 = 0 +8:4/0 = 0 +9:4/0 = 0 +10:4/0 = 0 +11:4/0 = 0 +0:5/0 = 0 +1:5/0 = 0 +2:5/0 = 0 +3:5/0 = 0 +4:5/0 = 0 +5:5/0 = 0 +6:5/0 = 0 +7:5/0 = 0 +8:5/0 = 0 +9:5/0 = 0 +10:5/0 = 0 +11:5/0 = 0 + +[sub_resource type="TileSet" id="TileSet_n3khe"] +tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 +sources/0 = SubResource("TileSetAtlasSource_e817v") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mvq46"] +shader = ExtResource("4_0x2h7") +shader_parameter/scroll_speed = 0.02 + +[node name="LevelBase" instance=ExtResource("1_87xn7")] + +[node name="Player" parent="." index="0"] +position = Vector2(-254, 99) +input_pickable = true + +[node name="Walls" parent="." index="3"] +collision_mask = 22 + +[node name="Ground" parent="Walls" index="0"] +position = Vector2(-7, 167) + +[node name="Ceiling" parent="Walls" index="1"] +position = Vector2(57, -171) + +[node name="LeftWall" parent="Walls" index="2"] +position = Vector2(-320, 26) + +[node name="RightWall" parent="Walls" index="3"] +position = Vector2(338, 15) + +[node name="Layer0" type="TileMapLayer" parent="." index="4"] +use_parent_material = true +tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAAAAAAAGAAIAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") +tile_set = SubResource("TileSet_n3khe") + +[node name="TextureRect" type="TextureRect" parent="." index="5"] +z_index = -100 +material = SubResource("ShaderMaterial_mvq46") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -320.0 +offset_top = -158.0 +offset_right = -320.0 +offset_bottom = -158.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("5_4p03u") +stretch_mode = 1 + +[node name="Block" parent="." index="6" instance=ExtResource("8_ec71m")] +position = Vector2(-65, 63) + +[node name="Block2" parent="." index="7" instance=ExtResource("8_ec71m")] +position = Vector2(-255, -32) +scale = Vector2(0.5, 0.5) + +[node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] +position = Vector2(241, -47) diff --git a/gmtk_2024/levels/level_1.tscn b/gmtk_2024/levels/level_1.tscn index 78d00ec..b13a83f 100644 --- a/gmtk_2024/levels/level_1.tscn +++ b/gmtk_2024/levels/level_1.tscn @@ -1,12 +1,9 @@ -[gd_scene load_steps=13 format=4 uid="uid://cxsstkfcffdch"] +[gd_scene load_steps=10 format=4 uid="uid://cxsstkfcffdch"] [ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] [ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] [ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] [ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] -[ext_resource type="PackedScene" uid="uid://d0gpnqknarkg7" path="res://objects/Goal.tscn" id="6_xhax5"] -[ext_resource type="PackedScene" uid="uid://cpa66thuxma15" path="res://objects/MirrorOrb.tscn" id="7_dyi0e"] -[ext_resource type="PackedScene" uid="uid://vtwswrkfkgas" path="res://objects/EnemyMover.tscn" id="8_16072"] [ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] [ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] @@ -166,21 +163,12 @@ grow_vertical = 2 texture = ExtResource("5_4p03u") stretch_mode = 1 -[node name="Goal" parent="." index="6" instance=ExtResource("6_xhax5")] -position = Vector2(582, -317) - -[node name="MirrorOrb" parent="." index="7" instance=ExtResource("7_dyi0e")] -position = Vector2(-431, -212) - -[node name="EnemyMover" parent="." index="8" instance=ExtResource("8_16072")] -position = Vector2(-132, 311) - -[node name="Block" parent="." index="9" instance=ExtResource("8_ec71m")] +[node name="Block" parent="." index="6" instance=ExtResource("8_ec71m")] position = Vector2(-65, 63) -[node name="Block2" parent="." index="10" instance=ExtResource("8_ec71m")] +[node name="Block2" parent="." index="7" instance=ExtResource("8_ec71m")] position = Vector2(-255, -32) scale = Vector2(0.5, 0.5) -[node name="BreakableBlock" parent="." index="11" instance=ExtResource("9_2ia1u")] +[node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] position = Vector2(241, -47) diff --git a/gmtk_2024/objects/ResizableBlockBig.tscn b/gmtk_2024/objects/ResizableBlockBig.tscn index c7cd8e9..b743fcd 100644 --- a/gmtk_2024/objects/ResizableBlockBig.tscn +++ b/gmtk_2024/objects/ResizableBlockBig.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://br6fngf5208j0"] -[ext_resource type="Texture2D" uid="uid://bqyd0blnkls1g" path="res://textures/block-blue.png" id="1_ejp7j"] [ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_j40bu"] +[ext_resource type="Texture2D" uid="uid://bb8vdlgwpj8oc" path="res://textures/antivirus-block-big.png" id="3_lb374"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_sgemy"] size = Vector2(59, 59) @@ -13,7 +13,7 @@ input_pickable = true script = ExtResource("1_j40bu") [node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("1_ejp7j") +texture = ExtResource("3_lb374") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_sgemy") diff --git a/gmtk_2024/objects/ResizableBlockSmall.tscn b/gmtk_2024/objects/ResizableBlockSmall.tscn deleted file mode 100644 index 5fd49b7..0000000 --- a/gmtk_2024/objects/ResizableBlockSmall.tscn +++ /dev/null @@ -1,21 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://dpg2s61eevjd"] - -[ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_bulc3"] -[ext_resource type="Texture2D" uid="uid://dbwquy34l8gd4" path="res://textures/block-small.png" id="2_42gyy"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_vlk61"] -size = Vector2(30, 30) - -[node name="Block" type="StaticBody2D"] -collision_layer = 17 -collision_mask = 22 -input_pickable = true -script = ExtResource("1_bulc3") - -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("2_42gyy") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_vlk61") - -[connection signal="input_event" from="." to="." method="_on_input_event"] diff --git a/gmtk_2024/project.godot b/gmtk_2024/project.godot index 0148149..6592e74 100644 --- a/gmtk_2024/project.godot +++ b/gmtk_2024/project.godot @@ -49,6 +49,11 @@ clickR={ "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"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":2,"canceled":false,"pressed":false,"double_click":false,"script":null) ] } +r={ +"deadzone": 0.5, +"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":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} [layer_names] diff --git a/gmtk_2024/scripts/player_movement.gd b/gmtk_2024/scripts/player_movement.gd index 1616bef..6e9f3be 100644 --- a/gmtk_2024/scripts/player_movement.gd +++ b/gmtk_2024/scripts/player_movement.gd @@ -35,6 +35,9 @@ func _unhandled_input(event): func get_input(delta): var left = Input.is_action_pressed("player_left") var right = Input.is_action_pressed("player_right") + + if Input.is_action_just_pressed("r"): + get_tree().reload_current_scene() if left and right: input_direction = 0 @@ -94,6 +97,9 @@ func update_data_link(): data_link.visible = false func find_nearest_block() -> Node2D: + if not get_tree(): + return null + var closest_distance = max_link_distance var closest_block: Node2D = null for block in get_tree().get_nodes_in_group("scalable_blocks"): @@ -102,7 +108,7 @@ func find_nearest_block() -> Node2D: closest_distance = distance closest_block = block return closest_block - + func start_scaling(target_node: Node2D, scale_value: Vector2): var tween = create_tween() tween.tween_property(target_node, "scale", scale_value, scale_duration) diff --git a/gmtk_2024/scripts/resizable_block.gd b/gmtk_2024/scripts/resizable_block.gd index 508fcb8..f3f421c 100644 --- a/gmtk_2024/scripts/resizable_block.gd +++ b/gmtk_2024/scripts/resizable_block.gd @@ -4,8 +4,8 @@ extends StaticBody2D @export var scale_down_target: Vector2 = Vector2(0.5, 0.5) @export var scale_duration: float = 0.5 @export var ui_actions: Node -@export var small_sprite = preload("res://textures/block-orange.png") -@export var large_sprite = preload("res://textures/block-blue.png") +@export var small_sprite = preload("res://textures/antivirus-block-small.png") +@export var large_sprite = preload("res://textures/antivirus-block-big.png") func _ready(): add_to_group("scalable_blocks") diff --git a/gmtk_2024/textures/Modifi Blocks-Sheet.png b/gmtk_2024/textures/Modifi Blocks-Sheet.png deleted file mode 100644 index b19b5241805726c2b811f10cd74aa775d3cb7690..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1012 zcmVPx&u1Q2eRCt{2ow06HF%*VRQBYHLsOZ1~QWU9qgl=Kt4JyHqM?ff2JFr%)K}scr z;0-ds#?Ay=S2ikDNM)t!fG8po43&d9xxVN6+P=2${lBSd(wn37&wqZ~*UkokM%mqa z{wH<~Wqdz7-mrQ8tx$!4ZU6xRCm4&q#0}-~BCF%J~$9va(wW9lGfoZim8px1ZJNN^zF1Ox<}NUDXIT2-v&fL$uC zr-{~<3rPuRGMLli>rw17g2FS2YsQg~uFvbS%|ywyu*qN^y98iCQVyh;4CeIi?(5iP z{MS0ARq3vhoC7Il+lR4B02N49KtvEx4n%KZPap2AMmqb$&9%p8+lTb*$BB3y+eJs) zu&B2))99>=B<(;7I8nM}As`}%C{?1jFdJsuhcx|sQ23bbe2S^%`M!Uq?PTLXipQIa z*d+js>;yyv5v4>HE$q{m>($Tq@7$DpL~rTk&-%H@)bjM!hIS@n6p%i=_Q9(USKb#O zr&}jZA_DGY*}`bbzL@6(asMDfVpffR6}IILwL-_FCYdwTvW z$n}Zxa3UVeo4!A2dG)Qd9$Q-DKngffv-DIpsp>rXkh+NRs9*ZHdL7@RJe?ezs4cY4 zffR6}W)LS5x#OsbysFQa94RDlqVTlVffR6}uo&$`If>*r9R7TD9XL@t$zm-`7hlo3 zSQW}dqz`Se{$)oN0`f(QP9)6>ain=7KF=e)o-3`-KpbQuzjRJOL=cfrIw>F`h{zY6 z%0QePG7%^Ac|W#fCm_>^Ovf}jySQAg{qBHX(EH&VKgD$rV+$LP`ZON(>Ed!(_{K}9 zzf;#q8EhG&g`UAx3h9Z+z-0!GJI79xKV zHF&gy5nULf{YeSxY$}Np#|!7UdJg172we35SzZ=#ktw(HXzdLc<&KvKh5Ihjk-}Ya znpq;-N}C>mN>f360%yccy~C^AAW2q6?LVc>kt&2B6_-!r`L=yk7samo5^=$L;mEOe@9ODXvk%i(QVCV|O0-|k-@|Mws-y~JVKA(}ui=-s!+rvfSbftK zNdde6jw~|6!o>MDXwSV9n?x6L_vZL-6QU)7Hb=Z`3G%W`@NIeR7>6pzwV;`4g~-;m z%&BiI&3P_udCh3(If<43WPZB&Z2J5x38kZbVhc63|4?OsgRLD?*MZX6*C>m`l^uK( zRWi`2S1ev_$@{U#AjpYQj?|7x=v^6{8jbSPyt~OE7O*WLp0G&F`?m4iRjq=kg7F7~f5*9q|ra={q1hU^n@s7 ziA}s~_s7?`1jHN}jwy>b_i8>H+sWS_d=E&5F(R_MD<;{3fo^v4>fvYmA@kcj5`nf- zBh`erCGInPQRk2=3-Gdq^olC|va03T{IaO*qeTMd02e^%GWFwwbA?5t$qQwY_vX z+Ey4iKha3(Waafe&R3X;|J(N8<@Aq>4l^$fI`#4A%F+Mw0il+LJRY=W4QM{$Q%dZA zmj}T4_EKT~)`QfBmZl-7m)^?x@R@%@E?siLLfSjDb*qeH_e5(%$K5#2;D24|?gk$}E$z$r^NC z1b%3F$46?tJUSg~yvhmp>1eq{3N>fgcQNj!arc65^MMpFmZ0WBd;0hW-fcQ(hK2Cy zAf4FVS&(i?#xK0;V1rIi#QAtIIskss{jG1F5p*gKS3bwRuG+B=3UMZ+^PwqZAcxo{ zH#OSW*3(_bdY=SbicFsz*QTwXV)hxT%IWXQ)x1%Rn_`de>MABpP`IYYe=9-x6T>z; zO?EJTfe)=YWbj2o%?`ztZQMCU-f8H5zEQE&8EEJ<{?OAy2JU7fhMLDpFAmpxgXgHz z>$BItnEk&2geUX_(KS8Q2V+#=WCQ0nlbd7Fs940N51`pg_S7G&v*3|U#op3u@FAtE zEx^1%i7#Wrv`ovplyqNb9I){D)E~=s8}`b3o?KV@d0~+hq<~IdH#@BYcK}uxbpW6D zaE-&Q`0`7y|A5J8@NlL0xQa0JXP>|^jS7%{s*|VAs_7`JaT!}HE(%|EFRR2i-mIhk z8a@lwzt!~ye*HPG49!!11%X4E6>)ZTm{JtiX&^o!Kf*3w9)^)A3bZlH^&e;Kskf|u z!n?Mww=+@fVz^Q@wG+nmuP+IW%n)u_1HYFi|mJlGreXv&&`YVhKi z|Fl8nF%D?>d}d0f-!B$!*T%H{sD_CFeC~ha_)Z^n{YXxve3QBS)&1c;-b%FeD+6JV LxuPCB`X>Di^W{gY diff --git a/gmtk_2024/textures/antivirus-block-big.png b/gmtk_2024/textures/antivirus-block-big.png new file mode 100644 index 0000000000000000000000000000000000000000..f20b2d563c7dd2a06c52a053054baa26ef7aef8e GIT binary patch literal 411 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WChA;d%8G=RK&fVZOC=VLBwToZ|l;j9A;rn=ATr;lAe0*nV68O+%a`&>r^E^ zvF0Cl->?a##eJ@OeL((E+U3Y%KH1w(`wJ5W7PMh0jW(8fZB z4LW=b)0Y02nQ-|z^UDAKCFipX00oXR9@qp_J?+tV=A!$e)9S=e{IF~&04naiFPOBb zPoq}7qY$F7yfqPI*y;1{Gvi9u3NMnS4*|r@ruu#<>ZRG7LJWQ{p$t+8^Z&o`2_YPo~^Ej`a*W z-PR2M4$5BmeJ;H~eFrlKJHu(CHG4nz??{L`X1H#~tpjr(h&H4avR^54*!K9h1yI!3 z&FAx!vKH%x0)`DbM`aIK$M1f;wZJ`P?gKsrpdH=JK;=LgK89&W84ql-V2BU{ntADu zPr=*IjhFua?>P^)|qc&7RKGH3zW V96$^Lmx3pQC{I^Emvv4FO#ts#no4Fz9#}v41%C{9T3K9l=2L9n2i;45uG4Bt!ybx|thN3mG=( z08IqhEn+V`=U0uw*Z=m9KQkNx3Ro~ihyhgx{i$Fv8H_dfY8s-Ltq7@``UEsozK7k|$E?M;&d4@>_4+AXVmDZGJc z0c%FvJ;vJimEB*z9&7m`x_}{ran`MKzkR>|`B$NBRliljJmu4|KF*ig4vZI=Ox{@? zIQ;tK%`I=l?tS$>-T_r#(0ps2&f7x%_rI>GTd6Hs&%o-yeF0>t8%PgVgV=&VhAj-e zAj?D;bRC52W^6xyJNCbQ!9JUPzg#@y8BvsUspsa$CVafcSvK$cyKt{xTmeAMzK^-f z*Sp`YyDzU=%L+33*j@b(+4s4k-;_7r(oX;>>D|q@!S>2`!-Kcw6QE{tzTLc5>#giR dYml{{nRYNZI~)B=ZU+W8gQu&X%Q~loCIGjCu805t diff --git a/gmtk_2024/textures/block-small.png b/gmtk_2024/textures/block-small.png deleted file mode 100644 index 9aeb1562b029abf347f3b8d63ac08e536db5f9cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;!JY5_^BHWWx4lowY`T5^@W(Z^Ox4I));=)tp3>eBqclG;<-dw2js^RkY zdZ$PM2JVTB{ER&84K;qb_nR5?irMXW4?LO|5ih^BR9D2_IS*rnG(M_Tc3V zVm$M_d3!uVk>Z)DS6FtOk+sQWkUemTW$OWjx3b0t3=CP}aVM>KoyCB@zopr0A`GEQ~&?~ diff --git a/gmtk_2024/textures/button-pressed.png b/gmtk_2024/textures/button-pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..433dfe32534abf49aec759c6ada19525a4d3b5f0 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6<5JzX3_BHZ7eH{@$FkYIfG|n;&tGpjohqeQHsz^gxc=G87oM%EJsK&dntprhoU>~m#z_4( zG+DGzzGIhldA-M>$I|V4E#!_W@6m1F!}mjSk@|#p7VM&WyFgy!OO5bM^YvxW0mdKI;Vst0CXv95dZ)H literal 0 HcmV?d00001 diff --git a/gmtk_2024/textures/button-unpressed.png b/gmtk_2024/textures/button-unpressed.png new file mode 100644 index 0000000000000000000000000000000000000000..7e062a84b92499e3f01247880cfb05376e2a6140 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6*uFXSWU=;PMxDad|! zLq+YI*vJ`{sd3RVGam2Sv3J#kn*|>ZY@95U|9#Q~Z zkG=GL!s5@M*)7}f=fbyV*W0=MzUDkjo>SB@=K-fe>PF^&dw)JHX$iL7eOYw5d9L+A zVTV&m>?zg@NJ@$=|<*?&wDPu`Q7lMO0bOKAfZR&Iw=kM1*hM8+@#iP;OgfSqSj#xVKsp9Np4?GEuN z041iCup8X`&gi=lY}wKOqHbViHMR4fx!(3Wp?1sWG1#RO><|0Bkg6-+At2r$vUJtF rHGAf{rQ6ws14EQAHNrE^*Ox&H$mRfI5V#aP8AN%y`njxgN@xNAif*R9 literal 0 HcmV?d00001 diff --git a/gmtk_2024/textures/movable-block-small.png b/gmtk_2024/textures/movable-block-small.png new file mode 100644 index 0000000000000000000000000000000000000000..01b55580d19f8351d5b258ea55289c626c33bf50 GIT binary patch literal 413 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WChCUdb&7jJi{50CYw5*G9ULW>W{vhK1(^ZkkKRZ(%uixwih1BoHZw@{j$R|7JmlK zZrO&K%hjKs-+26GrmsxFD#hX^^@b@&`F?zV7QXS=OXKT19++IX%{h-DNX&Y{EylI8 z&#x$Jl6Ba@utaCE?19cxYJ_K+uP=iZkj(+aAaE&oGKlhY^>bP0l+XkKG_In3 literal 0 HcmV?d00001 From dd05641f188599615b9bfacb1a7b1f4f3cdd1d17 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sun, 18 Aug 2024 22:45:33 +0200 Subject: [PATCH 04/11] change goal animation --- gmtk_2024/objects/Goal.tscn | 63 ++++++++++++++++++++----- gmtk_2024/scripts/goal.gd | 8 +--- gmtk_2024/textures/01-Portal-Sheet.png | Bin 0 -> 2334 bytes 3 files changed, 52 insertions(+), 19 deletions(-) create mode 100644 gmtk_2024/textures/01-Portal-Sheet.png diff --git a/gmtk_2024/objects/Goal.tscn b/gmtk_2024/objects/Goal.tscn index 667594d..6d94b50 100644 --- a/gmtk_2024/objects/Goal.tscn +++ b/gmtk_2024/objects/Goal.tscn @@ -1,29 +1,66 @@ -[gd_scene load_steps=5 format=3 uid="uid://d0gpnqknarkg7"] +[gd_scene load_steps=7 format=3 uid="uid://d0gpnqknarkg7"] [ext_resource type="Script" path="res://scripts/goal.gd" id="1_xjaxa"] -[ext_resource type="Texture2D" uid="uid://hsp64ixwg2bb" path="res://temp_assets/goal.png" id="1_y0s3c"] -[ext_resource type="Texture2D" uid="uid://bs8mevd0fornj" path="res://temp_assets/goal_bg.png" id="2_mxvn8"] +[ext_resource type="Texture2D" uid="uid://bje753fyfin0" path="res://textures/01-Portal-Sheet.png" id="2_hsts4"] + +[sub_resource type="Animation" id="Animation_a6qt0"] +resource_name = "portal" +length = 0.55 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame_coords") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2, 0.266667, 0.333333, 0.4, 0.466667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [Vector2i(0, 0), Vector2i(1, 0), Vector2i(2, 0), Vector2i(3, 0), Vector2i(4, 0), Vector2i(5, 0), Vector2i(6, 0), Vector2i(7, 0)] +} + +[sub_resource type="Animation" id="Animation_v2oub"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame_coords") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [Vector2i(0, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_4pqp1"] +_data = { +"RESET": SubResource("Animation_v2oub"), +"portal": SubResource("Animation_a6qt0") +} [sub_resource type="CircleShape2D" id="CircleShape2D_fjcci"] -radius = 41.0488 +radius = 16.1245 -[node name="Goal" type="Area2D" node_paths=PackedStringArray("img", "img2")] -scale = Vector2(0.5, 0.5) +[node name="Goal" type="Area2D"] collision_layer = 0 collision_mask = 4 script = ExtResource("1_xjaxa") -img = NodePath("GoalImg") -img2 = NodePath("GoalBg") -[node name="GoalBg" type="Sprite2D" parent="."] +[node name="Sprite2D" type="Sprite2D" parent="."] z_index = -1 -position = Vector2(-4, 0) -texture = ExtResource("2_mxvn8") +texture = ExtResource("2_hsts4") +hframes = 8 -[node name="GoalImg" type="Sprite2D" parent="."] -texture = ExtResource("1_y0s3c") +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_4pqp1") +} [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_fjcci") +[connection signal="area_entered" from="." to="." method="_on_area_entered"] [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/gmtk_2024/scripts/goal.gd b/gmtk_2024/scripts/goal.gd index 89fa9d3..0b16d55 100644 --- a/gmtk_2024/scripts/goal.gd +++ b/gmtk_2024/scripts/goal.gd @@ -1,15 +1,11 @@ extends Node @export var next : PackedScene -@export var img : Sprite2D -@export var img2 : Sprite2D +@onready var animation = $AnimationPlayer func _process(delta: float) -> void: - img.rotate(2 * delta) - img2.rotate(1 * delta) - - + animation.play("portal") func _on_body_entered(body: Node2D) -> void: get_tree().change_scene_to_packed(next) diff --git a/gmtk_2024/textures/01-Portal-Sheet.png b/gmtk_2024/textures/01-Portal-Sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..9b377ce1551c1263f110982f378bd1554e471f10 GIT binary patch literal 2334 zcmV+(3E}pMP)Px-zDYzuRCt{2oxM^cNeqBx%HArH3kY`u5(>wTF4>gG3B@bia}e$0qn}oH&lnpN89bg(-7TrrKhraSpq!o^uB`8$?%xK{dw%hE zhwtgI@8#b&{xAx^xI8kixqsR>p^H5ZLG9ESl=20mnCHZK4TCsidd4q1d{sA^YFqO}B z*~RwXcYfoKl<^HJ@;F$EQxwC!Ys_zW5S1mro7I;?tgo8W7hd!l(DL zoZzFjzof&y@YR_F$@r*2OvWQs3H-m+BY0vN{}(^T_wJRWLxi6)VHIIV`8o0t?Y|5D z0e;Y;&*N;dz9Cm?G9JOp^8j9+<*devQe0B_T)YB)B)(_R9$(U7G9H;a@ZbFSK7@A4+g3&EPjf@bSs25d@A;%zX-?l<)zdh+WFZ zNNnj4?SZv4&k6!wV_UtjWqcN!>JTw@kDpTiH6_aD9p3Rtzx=iy`Su^m&8U%6g)j)< zHK+)6(%dvu(*a;XBH&^jglHvb{L{0;vZ-s!a;CMZ zhugdNGHO8xgMg$%sz^Fa#?3&;`IKEETBZpAa6TQHokT7B1K89rwR!#>ml}ND$!K~+ zI-vvp53Tp1g_P2M3Z>uChNlw{+B&~A$-#Ay(nHBe=mZ#mo`za{sm!QDs+962p*nDb z-~ouP<7*NrKMDpOF5CfcuIBDcxYhp0Co9##Zts?B9@mpkfS#Tmu5#^PMMPDx>0RVjac?hQf;w~xf(BJ z4ubMMk@&Qy;fD5Z5KD6`O8K6_X>$!tezOj4@0P9J(Bsp6>lPo`Z3k<&yJice^^bBs z9m4J1k_Ci~UepmWP;q{={w@2KzKi%@qs63gf@R!`+57dQal7HE!C-+9tc?e)aZ-ej zWAj>kdOzAYoX>khjjxHuZ?gv?Uz1vV>VS*ca?Qoh@0_+lmh$N&tHsx(lrM?I*E)b& ze0qPa{E`lq{kP@-JTNu{8Xy166{skmXoGn_t z?`S-P#cY}Ed?kD;Shs!hv0mv!qs6D~P^+8iJujbnHU345aS;ZNYhvuEeV2oMk{W1K>tP;WX+<=|>G? z;5~UNKk6_ke11QTU(@*|C#F51#ILD?6-2P-!Jdf9`E*#kH$da#|0F(dqndo~ToRuz z#dg*EYkZW{-XDNu0Ju*W;C;d%C5_fnFKgbw8h=}SdQbdpr9PTi>(O@k)A)2|I#Pa% zuLh1eZNQzMU)$VxqYphLCrIG~$o9{-yi?)(0koZpHTYi7pX-03Mw$Ugy)aGv za%Le>=t(b@0XBC+HJ=A45zK^m0FcVh*^_bEgcIE%2+(|fp9*z?l5(dUOd;vO`6cb` zu~DL%(rWW9uC^n#E55h)KZhTFLW8FqxZ6n^he^?=^sq!L%GTn0PKXTpRA4QB%7&C? z5NLmg63IRy!iNGLpGs-_^SVvBrl$R&Xqkvt|F!HtQvVv?wF+%HhxZ03=s22k(ZYMn zNtz*+@KX<7sL9td5R0!lg5?+9N#b{4_rPmR=v_ONJEXQ;DR$yI%jh z#1}&~e{LKl#TfoTTC;SKaZd>!Kz@HfANy==X50G|f1buB-%~yj(UxmeAC)O9A>QKVW(^b literal 0 HcmV?d00001 From 3a6683984153dca955bfac489c01493ad0db995a Mon Sep 17 00:00:00 2001 From: Fabio Date: Sun, 18 Aug 2024 22:57:44 +0200 Subject: [PATCH 05/11] add sprites for limited time blocks --- gmtk_2024/textures/one-time-use-block-big.png | Bin 0 -> 430 bytes gmtk_2024/textures/one-time-use-block-small.png | Bin 0 -> 420 bytes gmtk_2024/textures/three-time-use-block-big.png | Bin 0 -> 453 bytes gmtk_2024/textures/three-time-use-block-small.png | Bin 0 -> 440 bytes gmtk_2024/textures/two-time-use-block-big.png | Bin 0 -> 458 bytes gmtk_2024/textures/two-time-use-block-small.png | Bin 0 -> 447 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 gmtk_2024/textures/one-time-use-block-big.png create mode 100644 gmtk_2024/textures/one-time-use-block-small.png create mode 100644 gmtk_2024/textures/three-time-use-block-big.png create mode 100644 gmtk_2024/textures/three-time-use-block-small.png create mode 100644 gmtk_2024/textures/two-time-use-block-big.png create mode 100644 gmtk_2024/textures/two-time-use-block-small.png diff --git a/gmtk_2024/textures/one-time-use-block-big.png b/gmtk_2024/textures/one-time-use-block-big.png new file mode 100644 index 0000000000000000000000000000000000000000..10585835a88b1d9c63762576bd080881e9c7eeaa GIT binary patch literal 430 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WChCEdAc};RK&fVZOC=VLBwToZ|l;j9A;rn=ATr;lAe0*nV68O+%a`&>r^45 zi66N4-_J2ge0I=CUW~ha?!?f`r<=~SHM1WJE826{`Ta`%rLJranT4N|jQ7X-7;K$< z^-FLx(OU~`yjPV?!=+h8j8Z4`#=0X z>t=q&CgR!Qq=y@fH)W+wOG!M??KrI zALjo9sB2zKED`N!4^&Az-T5Rzn2J^F@I rZ(;sJhwIk!fZ@rP8sVAd>&u`8WOD#92wV!D45B<;{an^LB{Ts5R8*vq literal 0 HcmV?d00001 diff --git a/gmtk_2024/textures/three-time-use-block-big.png b/gmtk_2024/textures/three-time-use-block-big.png new file mode 100644 index 0000000000000000000000000000000000000000..bb232d93e66eb2ab1ec91857300681475a52afe0 GIT binary patch literal 453 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WChBFdb&7r^2b z7qQaVzwvc5Dh1LMHx~RqcjU;DP*%xOYw;fwp)3X^hKWlHi;_?8oCd8er$hkyJ+SD9)lH(0a0Dq4sTzkN9&m|UU+oU zlyeqChLK$D@0_E1{(gPmbzIjRC{Va()`Tk;{2jh!Gw$x1|LfP)SGUjKeq5p}u;d2Y z3!M+@lhPZW|9nx`UB1Ui!6R8JVEvxhzakpUCH@m+Oc}ho|4Fx8TEym%`O}hF$4od# z`0E~5$%Fvr1zTQ3CTi$rF-)1Z{r%-DCc45l=c7{?HFQrgyf}WtM}v2-wTugI!=#|l s@M^C0v(-PXa|Q-DUuuMBny)W|7Ld&W#2|1fcru9cboFyt=akR{03%YPR_ys+yyGdcmX*680-~-kXy``nuQTd?JM|2Egq_Ni|JYTM64R3v1uRh-w)>0HH^ZoTkTM_QB7frV@i znVjhd*4xfkp2c~JpC&BSD*pD-TQ9IU%wB#?C4*_f(HFnJ-Ryk&?ehDsf2(@c z7;ed|S6gB-iy^~sPy6pW|I_dPOZzfxv8*#y{30Ci$L@go_Y1ZD?>_J1=P;VZwq)}6 z=$<*Dgd>KY_?wcxjbB|{(UzvjQLU{JkxxA8MJ_G4j=}BOTm*t Nl&7no%Q~loCIDQ8t*Zb4 literal 0 HcmV?d00001 diff --git a/gmtk_2024/textures/two-time-use-block-big.png b/gmtk_2024/textures/two-time-use-block-big.png new file mode 100644 index 0000000000000000000000000000000000000000..b071e8eb5c9da40512d094aaf8cab3577784616d GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WChAadAc};RK&fVy)la^QJ_UXGib>cE+;8%#r!9emvF7D5xTE2;gs8i5Y6BS zRhd3Vwvzn4|EI^N*;%ALJa_2s+=IdI*LfRN*Zgq3sq%V$>?_;5&Z&jW3pTaXC7#!h zU$)}blds9$S^iTvw=sl>r89h)AN{$;1 z!FGSeyalTcXMOI?@;4Kn!`LFtFjaLf!Wn`~e1+1X`1z53cx*mq1Rqn{&v^AcYekjwUz;zbHFMvyPBOX9@XaRO zDRU0vQe%ZrdEab=W8d?5JYsW5{aD@<5P64Th0ecR0j+MJ#i=E126H%~n z^u_;h39!V|H=j*xw@>4o_*^oYL95%C!Ajy>%e4=i4|@W&Ys7wMx8d5-EVAz4E?}th frABzB`T8NQX# Date: Mon, 19 Aug 2024 01:29:43 +0200 Subject: [PATCH 06/11] add pressure plate --- gmtk_2024/levels/level_1.tscn | 15 +++- gmtk_2024/objects/Goal.tscn | 30 ++++---- gmtk_2024/objects/Laser.tscn | 34 +++++++++ gmtk_2024/objects/Player.tscn | 2 +- gmtk_2024/objects/Pre676A.tmp | 89 +++++++++++++++++++++++ gmtk_2024/objects/PressurePlate.tscn | 86 ++++++++++++++++++++++ gmtk_2024/objects/ResizableBlockBig.tscn | 10 +-- gmtk_2024/scripts/PressurePlate.gd | 35 +++++++++ gmtk_2024/textures/PressurePlate.png | Bin 0 -> 301 bytes 9 files changed, 275 insertions(+), 26 deletions(-) create mode 100644 gmtk_2024/objects/Laser.tscn create mode 100644 gmtk_2024/objects/Pre676A.tmp create mode 100644 gmtk_2024/objects/PressurePlate.tscn create mode 100644 gmtk_2024/scripts/PressurePlate.gd create mode 100644 gmtk_2024/textures/PressurePlate.png diff --git a/gmtk_2024/levels/level_1.tscn b/gmtk_2024/levels/level_1.tscn index b13a83f..f69a9bc 100644 --- a/gmtk_2024/levels/level_1.tscn +++ b/gmtk_2024/levels/level_1.tscn @@ -1,10 +1,12 @@ -[gd_scene load_steps=10 format=4 uid="uid://cxsstkfcffdch"] +[gd_scene load_steps=12 format=4 uid="uid://cxsstkfcffdch"] [ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] [ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] [ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] [ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] +[ext_resource type="PackedScene" uid="uid://c6g2f7tm7iasr" path="res://objects/PressurePlate.tscn" id="7_i8kgx"] [ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] +[ext_resource type="PackedScene" uid="uid://c168bkledwyya" path="res://objects/Laser.tscn" id="8_gxgbn"] [ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_e817v"] @@ -145,7 +147,7 @@ position = Vector2(338, 15) [node name="Layer0" type="TileMapLayer" parent="." index="4"] use_parent_material = true -tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAAAAAAAGAAIAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") +tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") tile_set = SubResource("TileSet_n3khe") [node name="TextureRect" type="TextureRect" parent="." index="5"] @@ -167,8 +169,15 @@ stretch_mode = 1 position = Vector2(-65, 63) [node name="Block2" parent="." index="7" instance=ExtResource("8_ec71m")] -position = Vector2(-255, -32) +position = Vector2(-249, -32) scale = Vector2(0.5, 0.5) [node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] position = Vector2(241, -47) + +[node name="PressurePlate" parent="." index="9" instance=ExtResource("7_i8kgx")] +position = Vector2(-272, -32) +rotation = 1.5756 + +[node name="StaticBody2D" parent="." index="10" instance=ExtResource("8_gxgbn")] +position = Vector2(15, 15) diff --git a/gmtk_2024/objects/Goal.tscn b/gmtk_2024/objects/Goal.tscn index 6d94b50..f81a48b 100644 --- a/gmtk_2024/objects/Goal.tscn +++ b/gmtk_2024/objects/Goal.tscn @@ -3,6 +3,21 @@ [ext_resource type="Script" path="res://scripts/goal.gd" id="1_xjaxa"] [ext_resource type="Texture2D" uid="uid://bje753fyfin0" path="res://textures/01-Portal-Sheet.png" id="2_hsts4"] +[sub_resource type="Animation" id="Animation_v2oub"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame_coords") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [Vector2i(0, 0)] +} + [sub_resource type="Animation" id="Animation_a6qt0"] resource_name = "portal" length = 0.55 @@ -20,21 +35,6 @@ tracks/0/keys = { "values": [Vector2i(0, 0), Vector2i(1, 0), Vector2i(2, 0), Vector2i(3, 0), Vector2i(4, 0), Vector2i(5, 0), Vector2i(6, 0), Vector2i(7, 0)] } -[sub_resource type="Animation" id="Animation_v2oub"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame_coords") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [Vector2i(0, 0)] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_4pqp1"] _data = { "RESET": SubResource("Animation_v2oub"), diff --git a/gmtk_2024/objects/Laser.tscn b/gmtk_2024/objects/Laser.tscn new file mode 100644 index 0000000..52dd954 --- /dev/null +++ b/gmtk_2024/objects/Laser.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=5 format=3 uid="uid://c168bkledwyya"] + +[ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="1_6whpg"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_dplbn"] +atlas = ExtResource("1_6whpg") +region = Rect2(192.002, 64.0069, 32.0036, 31.9977) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7sk3t"] +atlas = ExtResource("1_6whpg") +region = Rect2(128.019, 31.9952, 31.9608, 31.9949) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_jee2l"] +size = Vector2(6, 28.5) + +[node name="StaticBody2D" type="StaticBody2D"] +collision_mask = 5 + +[node name="Sprite2D2" type="Sprite2D" parent="."] +position = Vector2(1, 0) +texture = SubResource("AtlasTexture_dplbn") + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PackedVector2Array(-15, -15, -12, -11, 14, -11, 17, -15) + +[node name="StaticBody2D" type="StaticBody2D" parent="."] + +[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D"] +texture = SubResource("AtlasTexture_7sk3t") +region_rect = Rect2(0, 0, 288, 96) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(1, 2) +shape = SubResource("RectangleShape2D_jee2l") diff --git a/gmtk_2024/objects/Player.tscn b/gmtk_2024/objects/Player.tscn index b6c72c0..55fef0e 100644 --- a/gmtk_2024/objects/Player.tscn +++ b/gmtk_2024/objects/Player.tscn @@ -13,7 +13,7 @@ radius = 12.0 [node name="Player" type="CharacterBody2D"] collision_layer = 4 -collision_mask = 19 +collision_mask = 51 script = ExtResource("1_a6lhy") jump_strength = 600 diff --git a/gmtk_2024/objects/Pre676A.tmp b/gmtk_2024/objects/Pre676A.tmp new file mode 100644 index 0000000..2581e0b --- /dev/null +++ b/gmtk_2024/objects/Pre676A.tmp @@ -0,0 +1,89 @@ +[gd_scene load_steps=9 format=3 uid="uid://c6g2f7tm7iasr"] + +[ext_resource type="Script" path="res://scripts/PressurePlate.gd" id="1_7ar3x"] +[ext_resource type="Texture2D" uid="uid://cwf57p0osmc0w" path="res://textures/PressurePlate.png" id="1_st48m"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_82l2r"] +size = Vector2(32, 3.5) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_c6ukx"] +size = Vector2(24, 4) + +[sub_resource type="Animation" id="Animation_fulu2"] +resource_name = "Disable" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [1] +} + +[sub_resource type="Animation" id="Animation_7ggr5"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [1] +} + +[sub_resource type="Animation" id="Animation_xxdm0"] +resource_name = "Enable" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_usrhb"] +_data = { +"Disable": SubResource("Animation_fulu2"), +"Enable": SubResource("Animation_xxdm0"), +"RESET": SubResource("Animation_7ggr5") +} + +[node name="StaticBody2D" type="StaticBody2D"] +script = ExtResource("1_7ar3x") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 13.75) +shape = SubResource("RectangleShape2D_82l2r") + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, 10) +shape = SubResource("RectangleShape2D_c6ukx") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_st48m") +hframes = 2 +frame = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_usrhb") +} +autoplay = "Disable" + +[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] +[connection signal="body_exited" from="Area2D" to="." method="_on_area_2d_body_exited"] diff --git a/gmtk_2024/objects/PressurePlate.tscn b/gmtk_2024/objects/PressurePlate.tscn new file mode 100644 index 0000000..de405c8 --- /dev/null +++ b/gmtk_2024/objects/PressurePlate.tscn @@ -0,0 +1,86 @@ +[gd_scene load_steps=8 format=3 uid="uid://c6g2f7tm7iasr"] + +[ext_resource type="Script" path="res://scripts/PressurePlate.gd" id="1_7ar3x"] +[ext_resource type="Texture2D" uid="uid://cwf57p0osmc0w" path="res://textures/PressurePlate.png" id="1_st48m"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_c6ukx"] +size = Vector2(24, 5) + +[sub_resource type="Animation" id="Animation_fulu2"] +resource_name = "Disable" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [1] +} + +[sub_resource type="Animation" id="Animation_7ggr5"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [1] +} + +[sub_resource type="Animation" id="Animation_xxdm0"] +resource_name = "Enable" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_usrhb"] +_data = { +"Disable": SubResource("Animation_fulu2"), +"Enable": SubResource("Animation_xxdm0"), +"RESET": SubResource("Animation_7ggr5") +} + +[node name="PressurePlate" type="StaticBody2D"] +collision_mask = 5 +script = ExtResource("1_7ar3x") + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, 9.5) +shape = SubResource("RectangleShape2D_c6ukx") + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PackedVector2Array(-16, 16, -12, 12, 12, 12, 16, 16) + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_st48m") +hframes = 2 +frame = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_usrhb") +} +autoplay = "Enable" + +[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"] +[connection signal="body_exited" from="Area2D" to="." method="_on_body_exited"] diff --git a/gmtk_2024/objects/ResizableBlockBig.tscn b/gmtk_2024/objects/ResizableBlockBig.tscn index b743fcd..93b7c7d 100644 --- a/gmtk_2024/objects/ResizableBlockBig.tscn +++ b/gmtk_2024/objects/ResizableBlockBig.tscn @@ -1,13 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://br6fngf5208j0"] +[gd_scene load_steps=3 format=3 uid="uid://br6fngf5208j0"] [ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_j40bu"] [ext_resource type="Texture2D" uid="uid://bb8vdlgwpj8oc" path="res://textures/antivirus-block-big.png" id="3_lb374"] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_sgemy"] -size = Vector2(59, 59) - [node name="Block" type="StaticBody2D"] -collision_layer = 17 collision_mask = 22 input_pickable = true script = ExtResource("1_j40bu") @@ -15,7 +11,7 @@ script = ExtResource("1_j40bu") [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("3_lb374") -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_sgemy") +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PackedVector2Array(-32, -20, -28, -20, -28, -24, -24, -24, -24, -28, -20, -28, -20, -32, 20, -32, 20, -28, 24, -28, 24, -24, 28, -24, 28, -20, 32, -20, 32, 20, 28, 20, 28, 24, 24, 24, 24, 28, 20, 28, 20, 32, -20, 32, -20, 28, -24, 28, -24, 24, -28, 24, -28, 20, -32, 20) [connection signal="input_event" from="." to="." method="_on_input_event"] diff --git a/gmtk_2024/scripts/PressurePlate.gd b/gmtk_2024/scripts/PressurePlate.gd new file mode 100644 index 0000000..029a52c --- /dev/null +++ b/gmtk_2024/scripts/PressurePlate.gd @@ -0,0 +1,35 @@ +extends StaticBody2D + +@export var laser_path: NodePath # TODO +@export var required_scale: Vector2 = Vector2(1.0, 1.0) +@export var player_required_scale: Vector2 = Vector2(2.0, 2.0) + +@onready var animation = $AnimationPlayer + +var laser: Node2D = null +var is_activated = false + +func _ready(): + laser = get_node(laser_path) + +func _on_body_entered(body: Node): + print("Wird erkannt") + if (body is StaticBody2D and body.scale >= required_scale) or (body is CharacterBody2D and body.scale >= player_required_scale): + animation.play("Disable") + activate_plate() + +func _on_body_exited(body: Node): + if (body is StaticBody2D and body.scale >= required_scale) or (body is CharacterBody2D and body.scale >= player_required_scale): + animation.play("Enable") + deactivate_plate() + +func activate_plate(): + print("wird aktiviert") + if not is_activated: + is_activated = true + if laser: + laser.queue_free() + +func deactivate_plate(): + if is_activated: + is_activated = false diff --git a/gmtk_2024/textures/PressurePlate.png b/gmtk_2024/textures/PressurePlate.png new file mode 100644 index 0000000000000000000000000000000000000000..cb13eb116e05a1d5b86bb5236f067237d154eef9 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!3HE3&8=$zQjEnx?oJHr&dIz4a?X0XIEG|2 zzP+@OugO59_2GOM-a;dx8;NC~C4b57Q9u9SnNBrt+erb5f|mragFaXZX=F3)Q|;)w^pi_3_s6yf1Ox6MSOM&wC;F--X|0cq&rtvOlW+ j4$xzKsS%!OzP=1vKsE;ugTSTW$so$p)z4*}Q$iB}H6VDa literal 0 HcmV?d00001 From 6913816861ec510d717fd1ce64df22879df4283e Mon Sep 17 00:00:00 2001 From: Fabio Date: Mon, 19 Aug 2024 03:15:07 +0200 Subject: [PATCH 07/11] finishe pressurePlate --- gmtk_2024/levels/level_1.tscn | 20 +++++----- gmtk_2024/objects/Laser.tscn | 2 +- gmtk_2024/objects/PressurePlate.tscn | 39 ++++++++++--------- ...zableBlockBig.tscn => ResizableBlock.tscn} | 20 ++++++---- gmtk_2024/scripts/PressurePlate.gd | 11 ++++-- gmtk_2024/scripts/resizable_block.gd | 3 +- 6 files changed, 52 insertions(+), 43 deletions(-) rename gmtk_2024/objects/{ResizableBlockBig.tscn => ResizableBlock.tscn} (54%) diff --git a/gmtk_2024/levels/level_1.tscn b/gmtk_2024/levels/level_1.tscn index f69a9bc..4c895db 100644 --- a/gmtk_2024/levels/level_1.tscn +++ b/gmtk_2024/levels/level_1.tscn @@ -3,9 +3,9 @@ [ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_87xn7"] [ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_wqskp"] [ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="4_0x2h7"] +[ext_resource type="PackedScene" uid="uid://d0q0sfati8wk0" path="res://objects/ResizableBlock.tscn" id="5_4ggcc"] [ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] [ext_resource type="PackedScene" uid="uid://c6g2f7tm7iasr" path="res://objects/PressurePlate.tscn" id="7_i8kgx"] -[ext_resource type="PackedScene" uid="uid://br6fngf5208j0" path="res://objects/ResizableBlockBig.tscn" id="8_ec71m"] [ext_resource type="PackedScene" uid="uid://c168bkledwyya" path="res://objects/Laser.tscn" id="8_gxgbn"] [ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] @@ -165,19 +165,19 @@ grow_vertical = 2 texture = ExtResource("5_4p03u") stretch_mode = 1 -[node name="Block" parent="." index="6" instance=ExtResource("8_ec71m")] -position = Vector2(-65, 63) +[node name="AnimatableBody2D" parent="." index="6" instance=ExtResource("5_4ggcc")] +position = Vector2(-65, 64) -[node name="Block2" parent="." index="7" instance=ExtResource("8_ec71m")] -position = Vector2(-249, -32) +[node name="AnimatableBody2D2" parent="." index="7" instance=ExtResource("5_4ggcc")] +position = Vector2(-250, -32) scale = Vector2(0.5, 0.5) [node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] position = Vector2(241, -47) -[node name="PressurePlate" parent="." index="9" instance=ExtResource("7_i8kgx")] -position = Vector2(-272, -32) -rotation = 1.5756 - -[node name="StaticBody2D" parent="." index="10" instance=ExtResource("8_gxgbn")] +[node name="StaticBody2D" parent="." index="9" instance=ExtResource("8_gxgbn")] position = Vector2(15, 15) + +[node name="PressurePlate" parent="." index="10" instance=ExtResource("7_i8kgx")] +position = Vector2(-272, -32) +rotation = 1.57987 diff --git a/gmtk_2024/objects/Laser.tscn b/gmtk_2024/objects/Laser.tscn index 52dd954..7e11607 100644 --- a/gmtk_2024/objects/Laser.tscn +++ b/gmtk_2024/objects/Laser.tscn @@ -13,7 +13,7 @@ region = Rect2(128.019, 31.9952, 31.9608, 31.9949) [sub_resource type="RectangleShape2D" id="RectangleShape2D_jee2l"] size = Vector2(6, 28.5) -[node name="StaticBody2D" type="StaticBody2D"] +[node name="Laser" type="StaticBody2D"] collision_mask = 5 [node name="Sprite2D2" type="Sprite2D" parent="."] diff --git a/gmtk_2024/objects/PressurePlate.tscn b/gmtk_2024/objects/PressurePlate.tscn index de405c8..9ba6190 100644 --- a/gmtk_2024/objects/PressurePlate.tscn +++ b/gmtk_2024/objects/PressurePlate.tscn @@ -4,7 +4,7 @@ [ext_resource type="Texture2D" uid="uid://cwf57p0osmc0w" path="res://textures/PressurePlate.png" id="1_st48m"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_c6ukx"] -size = Vector2(24, 5) +size = Vector2(24, 2) [sub_resource type="Animation" id="Animation_fulu2"] resource_name = "Disable" @@ -21,21 +21,6 @@ tracks/0/keys = { "values": [1] } -[sub_resource type="Animation" id="Animation_7ggr5"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [1] -} - [sub_resource type="Animation" id="Animation_xxdm0"] resource_name = "Enable" tracks/0/type = "value" @@ -51,6 +36,21 @@ tracks/0/keys = { "values": [0] } +[sub_resource type="Animation" id="Animation_7ggr5"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [1] +} + [sub_resource type="AnimationLibrary" id="AnimationLibrary_usrhb"] _data = { "Disable": SubResource("Animation_fulu2"), @@ -59,13 +59,16 @@ _data = { } [node name="PressurePlate" type="StaticBody2D"] -collision_mask = 5 +collision_layer = 32 +collision_mask = 37 script = ExtResource("1_7ar3x") [node name="Area2D" type="Area2D" parent="."] +collision_layer = 32 +collision_mask = 5 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2(0, 9.5) +position = Vector2(0, 11) shape = SubResource("RectangleShape2D_c6ukx") [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] diff --git a/gmtk_2024/objects/ResizableBlockBig.tscn b/gmtk_2024/objects/ResizableBlock.tscn similarity index 54% rename from gmtk_2024/objects/ResizableBlockBig.tscn rename to gmtk_2024/objects/ResizableBlock.tscn index 93b7c7d..cf1f346 100644 --- a/gmtk_2024/objects/ResizableBlockBig.tscn +++ b/gmtk_2024/objects/ResizableBlock.tscn @@ -1,17 +1,21 @@ -[gd_scene load_steps=3 format=3 uid="uid://br6fngf5208j0"] +[gd_scene load_steps=4 format=3 uid="uid://d0q0sfati8wk0"] -[ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_j40bu"] -[ext_resource type="Texture2D" uid="uid://bb8vdlgwpj8oc" path="res://textures/antivirus-block-big.png" id="3_lb374"] +[ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_ckiwc"] +[ext_resource type="Texture2D" uid="uid://bb8vdlgwpj8oc" path="res://textures/antivirus-block-big.png" id="2_i68dl"] -[node name="Block" type="StaticBody2D"] -collision_mask = 22 +[sub_resource type="RectangleShape2D" id="RectangleShape2D_6cdyn"] +size = Vector2(64, 61) + +[node name="AnimatableBody2D" type="AnimatableBody2D"] +collision_mask = 54 input_pickable = true -script = ExtResource("1_j40bu") +script = ExtResource("1_ckiwc") [node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("3_lb374") +texture = ExtResource("2_i68dl") [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] polygon = PackedVector2Array(-32, -20, -28, -20, -28, -24, -24, -24, -24, -28, -20, -28, -20, -32, 20, -32, 20, -28, 24, -28, 24, -24, 28, -24, 28, -20, 32, -20, 32, 20, 28, 20, 28, 24, 24, 24, 24, 28, 20, 28, 20, 32, -20, 32, -20, 28, -24, 28, -24, 24, -28, 24, -28, 20, -32, 20) -[connection signal="input_event" from="." to="." method="_on_input_event"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_6cdyn") diff --git a/gmtk_2024/scripts/PressurePlate.gd b/gmtk_2024/scripts/PressurePlate.gd index 029a52c..9efb9ac 100644 --- a/gmtk_2024/scripts/PressurePlate.gd +++ b/gmtk_2024/scripts/PressurePlate.gd @@ -1,6 +1,6 @@ extends StaticBody2D -@export var laser_path: NodePath # TODO +@export var laser_path: NodePath = "../StaticBody2D" @export var required_scale: Vector2 = Vector2(1.0, 1.0) @export var player_required_scale: Vector2 = Vector2(2.0, 2.0) @@ -14,12 +14,14 @@ func _ready(): func _on_body_entered(body: Node): print("Wird erkannt") - if (body is StaticBody2D and body.scale >= required_scale) or (body is CharacterBody2D and body.scale >= player_required_scale): + print(body) + print(body.scale) + if (body is AnimatableBody2D and body.scale >= required_scale) or (body is CharacterBody2D and body.scale >= player_required_scale): animation.play("Disable") activate_plate() func _on_body_exited(body: Node): - if (body is StaticBody2D and body.scale >= required_scale) or (body is CharacterBody2D and body.scale >= player_required_scale): + if (body is AnimatableBody2D and body.scale >= required_scale) or (body is CharacterBody2D and body.scale >= player_required_scale): animation.play("Enable") deactivate_plate() @@ -28,7 +30,8 @@ func activate_plate(): if not is_activated: is_activated = true if laser: - laser.queue_free() + laser.queue_free() + # TODO: fix error when called again func deactivate_plate(): if is_activated: diff --git a/gmtk_2024/scripts/resizable_block.gd b/gmtk_2024/scripts/resizable_block.gd index f3f421c..80bb104 100644 --- a/gmtk_2024/scripts/resizable_block.gd +++ b/gmtk_2024/scripts/resizable_block.gd @@ -1,9 +1,8 @@ -extends StaticBody2D +extends AnimatableBody2D @export var scale_up_target: Vector2 = Vector2(1.0, 1.0) @export var scale_down_target: Vector2 = Vector2(0.5, 0.5) @export var scale_duration: float = 0.5 -@export var ui_actions: Node @export var small_sprite = preload("res://textures/antivirus-block-small.png") @export var large_sprite = preload("res://textures/antivirus-block-big.png") From 91545bb037b5391be6cbf9059b455fb00fdf265e Mon Sep 17 00:00:00 2001 From: Fabio Date: Mon, 19 Aug 2024 03:35:03 +0200 Subject: [PATCH 08/11] clean up --- gmtk_2024/levels/level_1.tscn | 21 ++- gmtk_2024/levels/level_1_2.tscn | 190 ++++++++++++++++++++++++++ gmtk_2024/objects/ResizableBlock.tscn | 8 +- gmtk_2024/scripts/PressurePlate.gd | 2 +- gmtk_2024/scripts/goal.gd | 2 +- 5 files changed, 207 insertions(+), 16 deletions(-) create mode 100644 gmtk_2024/levels/level_1_2.tscn diff --git a/gmtk_2024/levels/level_1.tscn b/gmtk_2024/levels/level_1.tscn index 4c895db..bda4221 100644 --- a/gmtk_2024/levels/level_1.tscn +++ b/gmtk_2024/levels/level_1.tscn @@ -7,7 +7,7 @@ [ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="5_4p03u"] [ext_resource type="PackedScene" uid="uid://c6g2f7tm7iasr" path="res://objects/PressurePlate.tscn" id="7_i8kgx"] [ext_resource type="PackedScene" uid="uid://c168bkledwyya" path="res://objects/Laser.tscn" id="8_gxgbn"] -[ext_resource type="PackedScene" uid="uid://dki3ft77fr3tc" path="res://objects/BreakableBlock.tscn" id="9_2ia1u"] +[ext_resource type="PackedScene" uid="uid://d0gpnqknarkg7" path="res://objects/Goal.tscn" id="9_xut5w"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_e817v"] texture = ExtResource("2_wqskp") @@ -147,7 +147,7 @@ position = Vector2(338, 15) [node name="Layer0" type="TileMapLayer" parent="." index="4"] use_parent_material = true -tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") +tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAAFAAIAAAD7/wQAAAABAAEAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAABAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAABAAEAAAD//wEAAAAEAAIAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFAAAP//AAAIAAEAAGD/////AAAIAAEAAFABAP//AAAIAAAAAVAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQD6/wMAAAAAAAAAAAD6/wAAAAAIAAAAAVD+/wIAAAAAAAEAAAD+/wEAAAAAAAAAAAD+////AAAAAAIAAAD+//3/AAACAAAAAAD+//7/AAAIAAEAAAA=") tile_set = SubResource("TileSet_n3khe") [node name="TextureRect" type="TextureRect" parent="." index="5"] @@ -166,18 +166,25 @@ texture = ExtResource("5_4p03u") stretch_mode = 1 [node name="AnimatableBody2D" parent="." index="6" instance=ExtResource("5_4ggcc")] -position = Vector2(-65, 64) +position = Vector2(-101, 64) [node name="AnimatableBody2D2" parent="." index="7" instance=ExtResource("5_4ggcc")] position = Vector2(-250, -32) scale = Vector2(0.5, 0.5) -[node name="BreakableBlock" parent="." index="8" instance=ExtResource("9_2ia1u")] -position = Vector2(241, -47) +[node name="AnimatableBody2D4" parent="." index="8" instance=ExtResource("5_4ggcc")] +position = Vector2(112, 48) +scale = Vector2(0.5, 0.5) -[node name="StaticBody2D" parent="." index="9" instance=ExtResource("8_gxgbn")] +[node name="AnimatableBody2D3" parent="." index="9" instance=ExtResource("5_4ggcc")] +position = Vector2(1, -65) + +[node name="Laser" parent="." index="10" instance=ExtResource("8_gxgbn")] position = Vector2(15, 15) -[node name="PressurePlate" parent="." index="10" instance=ExtResource("7_i8kgx")] +[node name="PressurePlate" parent="." index="11" instance=ExtResource("7_i8kgx")] position = Vector2(-272, -32) rotation = 1.57987 + +[node name="Goal" parent="." index="12" instance=ExtResource("9_xut5w")] +position = Vector2(-272, -112) diff --git a/gmtk_2024/levels/level_1_2.tscn b/gmtk_2024/levels/level_1_2.tscn new file mode 100644 index 0000000..c38005f --- /dev/null +++ b/gmtk_2024/levels/level_1_2.tscn @@ -0,0 +1,190 @@ +[gd_scene load_steps=12 format=4 uid="uid://bgrwqfa7lr66a"] + +[ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_yg0vd"] +[ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="2_ptgl0"] +[ext_resource type="Shader" path="res://shaders/scrolling.gdshader" id="3_qimc8"] +[ext_resource type="Texture2D" uid="uid://bn7cejgxkah8o" path="res://textures/Level 01.png" id="4_3uw4k"] +[ext_resource type="PackedScene" uid="uid://d0q0sfati8wk0" path="res://objects/ResizableBlock.tscn" id="5_vd2rm"] +[ext_resource type="PackedScene" uid="uid://c168bkledwyya" path="res://objects/Laser.tscn" id="6_bio6g"] +[ext_resource type="PackedScene" uid="uid://c6g2f7tm7iasr" path="res://objects/PressurePlate.tscn" id="7_lkgxo"] +[ext_resource type="PackedScene" uid="uid://d0gpnqknarkg7" path="res://objects/Goal.tscn" id="8_38762"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_e817v"] +texture = ExtResource("2_ptgl0") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:0/0 = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:0/0 = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:0/0 = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:0/0 = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:0/0 = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:0/0 = 0 +6:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:0/0 = 0 +7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/next_alternative_id = 4 +8:0/0 = 0 +8:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/1 = 1 +8:0/1/flip_v = true +8:0/1/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/2 = 2 +8:0/2/transpose = true +8:0/2/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:0/3 = 3 +8:0/3/flip_h = true +8:0/3/transpose = true +8:0/3/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:0/0 = 0 +10:0/0 = 0 +11:0/0 = 0 +0:1/0 = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:1/0 = 0 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:1/0 = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:1/0 = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:1/0 = 0 +5:1/0 = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:1/0 = 0 +6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +7:1/0 = 0 +7:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +8:1/0 = 0 +8:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +9:1/0 = 0 +10:1/0 = 0 +11:1/0 = 0 +0:2/0 = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +1:2/0 = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:2/0 = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +3:2/0 = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:2/0 = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +5:2/0 = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +6:2/0 = 0 +7:2/0 = 0 +10:2/0 = 0 +11:2/0 = 0 +0:3/0 = 0 +1:3/0 = 0 +2:3/0 = 0 +3:3/0 = 0 +4:3/0 = 0 +5:3/0 = 0 +6:3/0 = 0 +7:3/0 = 0 +10:3/0 = 0 +11:3/0 = 0 +0:4/0 = 0 +1:4/0 = 0 +2:4/0 = 0 +3:4/0 = 0 +4:4/0 = 0 +5:4/0 = 0 +6:4/0 = 0 +7:4/0 = 0 +8:4/0 = 0 +9:4/0 = 0 +10:4/0 = 0 +11:4/0 = 0 +0:5/0 = 0 +1:5/0 = 0 +2:5/0 = 0 +3:5/0 = 0 +4:5/0 = 0 +5:5/0 = 0 +6:5/0 = 0 +7:5/0 = 0 +8:5/0 = 0 +9:5/0 = 0 +10:5/0 = 0 +11:5/0 = 0 + +[sub_resource type="TileSet" id="TileSet_n3khe"] +tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 +sources/0 = SubResource("TileSetAtlasSource_e817v") + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mvq46"] +shader = ExtResource("3_qimc8") +shader_parameter/scroll_speed = 0.02 + +[node name="LevelBase" instance=ExtResource("1_yg0vd")] + +[node name="Player" parent="." index="0"] +position = Vector2(-254, 99) +input_pickable = true + +[node name="Walls" parent="." index="3"] +collision_mask = 22 + +[node name="Ground" parent="Walls" index="0"] +position = Vector2(-7, 167) + +[node name="Ceiling" parent="Walls" index="1"] +position = Vector2(57, -171) + +[node name="LeftWall" parent="Walls" index="2"] +position = Vector2(-320, 26) + +[node name="RightWall" parent="Walls" index="3"] +position = Vector2(338, 15) + +[node name="Layer0" type="TileMapLayer" parent="." index="4"] +use_parent_material = true +tile_map_data = PackedByteArray("AAD2//v/AAADAAAAAAD2//z/AAACAAEAAAD2//3/AAACAAEAAAD2//7/AAACAAEAAAD2////AAACAAEAAAD2/wAAAAACAAEAAAD2/wEAAAACAAEAAAD2/wIAAAACAAEAAAD2/wMAAAACAAEAAAD2/wQAAAADAAIAAAAJAPv/AAAFAAAAAAAJAPz/AAAAAAEAAAAJAP3/AAAAAAEAAAAJAP7/AAAAAAEAAAAJAP//AAAAAAEAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAAAAAEAAAAJAAMAAAAAAAEAAAAJAAQAAAAFAAIAAAD3//v/AAABAAIAAAD4//v/AAABAAIAAAD5//v/AAABAAIAAAD6//v/AAABAAIAAAD7//v/AAABAAIAAAD8//v/AAABAAIAAAD9//v/AAABAAIAAAD+//v/AAABAAIAAAD///v/AAABAAIAAAAAAPv/AAABAAIAAAABAPv/AAABAAIAAAACAPv/AAABAAIAAAADAPv/AAABAAIAAAAEAPv/AAABAAIAAAAFAPv/AAABAAIAAAAGAPv/AAABAAIAAAAHAPv/AAABAAIAAAAIAPv/AAABAAIAAAD3/wQAAAABAAAAAAD4/wQAAAABAAAAAAD5/wQAAAABAAAAAAD6/wQAAAABAAAAAAD7/wQAAAAFAAIAAAD8/wQAAAABAAEAAAD9/wQAAAABAAEAAAD+/wQAAAABAAEAAAD//wQAAAABAAEAAAAAAAQAAAABAAEAAAABAAQAAAADAAIAAAACAAQAAAABAAAAAAADAAQAAAABAAAAAAAEAAQAAAABAAAAAAAFAAQAAAABAAAAAAAGAAQAAAABAAAAAAAHAAQAAAABAAAAAAAIAAQAAAABAAAAAAD7/wMAAAAAAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wIAAAAAAAEAAAD//wEAAAAAAAAAAAAAAAEAAAAEAAIAAAABAAEAAAACAAAAAAABAAIAAAACAAEAAAABAAMAAAACAAEAAAD//wMAAAAFAAIAAAAAAAIAAAABAAEAAAAAAAMAAAABAAEAAAD3/wAAAAAIAAEAAGD4/wAAAAAIAAEAAGD5/wAAAAAIAAEAAGD6/wAAAAAIAAEAAGD7/wAAAAAIAAAAAVD3//3/AAAIAAEAAFD4//3/AAAIAAEAAFD5//3/AAAIAAEAAFD6//3/AAAIAAEAAFD7//3/AAAIAAEAAFD8//3/AAAIAAEAAFD9//3/AAAIAAEAAFD+//3/AAACAAAAAAAAAP//AAABAAIAAAD/////AAAAAAIAAAD///7/AAAHAAAAAAAAAP7/AAACAAAAAAABAP//AAAIAAAAAVD+//7/AAAAAAIAAAAFAAEAAAAIAAAAAAAFAAIAAAAIAAAAAQA=") +tile_set = SubResource("TileSet_n3khe") + +[node name="TextureRect" type="TextureRect" parent="." index="5"] +z_index = -100 +material = SubResource("ShaderMaterial_mvq46") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -320.0 +offset_top = -158.0 +offset_right = -320.0 +offset_bottom = -158.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("4_3uw4k") +stretch_mode = 1 + +[node name="AnimatableBody2D" parent="." index="6" instance=ExtResource("5_vd2rm")] +position = Vector2(-65, 64) + +[node name="AnimatableBody2D2" parent="." index="7" instance=ExtResource("5_vd2rm")] +position = Vector2(-250, -32) +scale = Vector2(0.5, 0.5) + +[node name="AnimatableBody2D4" parent="." index="8" instance=ExtResource("5_vd2rm")] +position = Vector2(112, 48) +scale = Vector2(0.5, 0.5) + +[node name="AnimatableBody2D3" parent="." index="9" instance=ExtResource("5_vd2rm")] +position = Vector2(0, -96) + +[node name="Laser" parent="." index="10" instance=ExtResource("6_bio6g")] +position = Vector2(15, 15) + +[node name="PressurePlate" parent="." index="11" instance=ExtResource("7_lkgxo")] +position = Vector2(-272, -32) +rotation = 1.57987 + +[node name="Goal" parent="." index="12" instance=ExtResource("8_38762")] +position = Vector2(-272, -112) diff --git a/gmtk_2024/objects/ResizableBlock.tscn b/gmtk_2024/objects/ResizableBlock.tscn index cf1f346..c80eacd 100644 --- a/gmtk_2024/objects/ResizableBlock.tscn +++ b/gmtk_2024/objects/ResizableBlock.tscn @@ -1,11 +1,8 @@ -[gd_scene load_steps=4 format=3 uid="uid://d0q0sfati8wk0"] +[gd_scene load_steps=3 format=3 uid="uid://d0q0sfati8wk0"] [ext_resource type="Script" path="res://scripts/resizable_block.gd" id="1_ckiwc"] [ext_resource type="Texture2D" uid="uid://bb8vdlgwpj8oc" path="res://textures/antivirus-block-big.png" id="2_i68dl"] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_6cdyn"] -size = Vector2(64, 61) - [node name="AnimatableBody2D" type="AnimatableBody2D"] collision_mask = 54 input_pickable = true @@ -16,6 +13,3 @@ texture = ExtResource("2_i68dl") [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] polygon = PackedVector2Array(-32, -20, -28, -20, -28, -24, -24, -24, -24, -28, -20, -28, -20, -32, 20, -32, 20, -28, 24, -28, 24, -24, 28, -24, 28, -20, 32, -20, 32, 20, 28, 20, 28, 24, 24, 24, 24, 28, 20, 28, 20, 32, -20, 32, -20, 28, -24, 28, -24, 24, -28, 24, -28, 20, -32, 20) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("RectangleShape2D_6cdyn") diff --git a/gmtk_2024/scripts/PressurePlate.gd b/gmtk_2024/scripts/PressurePlate.gd index 9efb9ac..c9d1e54 100644 --- a/gmtk_2024/scripts/PressurePlate.gd +++ b/gmtk_2024/scripts/PressurePlate.gd @@ -1,6 +1,6 @@ extends StaticBody2D -@export var laser_path: NodePath = "../StaticBody2D" +@export var laser_path: NodePath = "../Laser" @export var required_scale: Vector2 = Vector2(1.0, 1.0) @export var player_required_scale: Vector2 = Vector2(2.0, 2.0) diff --git a/gmtk_2024/scripts/goal.gd b/gmtk_2024/scripts/goal.gd index 0b16d55..a791098 100644 --- a/gmtk_2024/scripts/goal.gd +++ b/gmtk_2024/scripts/goal.gd @@ -1,6 +1,6 @@ extends Node -@export var next : PackedScene +@export var next : PackedScene = preload("res://levels/level_1_2.tscn") @onready var animation = $AnimationPlayer From 727e147e8b1610256c6583666c1fdee7e4a18b60 Mon Sep 17 00:00:00 2001 From: Fabio Date: Mon, 19 Aug 2024 03:48:56 +0200 Subject: [PATCH 09/11] update folder sprites --- gmtk_2024/menu/level_menu/level_button.tscn | 20 ++++++++++------ gmtk_2024/menu/level_menu/level_select.tscn | 24 ++++++++++++-------- gmtk_2024/textures/BrackableBlock-Sheet.png | Bin 0 -> 932 bytes gmtk_2024/textures/cursor_normal.png | Bin 0 -> 242 bytes gmtk_2024/textures/cursor_scale_down.png | Bin 0 -> 280 bytes gmtk_2024/textures/cursor_scale_up.png | Bin 0 -> 291 bytes 6 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 gmtk_2024/textures/BrackableBlock-Sheet.png create mode 100644 gmtk_2024/textures/cursor_normal.png create mode 100644 gmtk_2024/textures/cursor_scale_down.png create mode 100644 gmtk_2024/textures/cursor_scale_up.png diff --git a/gmtk_2024/menu/level_menu/level_button.tscn b/gmtk_2024/menu/level_menu/level_button.tscn index 387d748..2f6dc9f 100644 --- a/gmtk_2024/menu/level_menu/level_button.tscn +++ b/gmtk_2024/menu/level_menu/level_button.tscn @@ -1,14 +1,20 @@ [gd_scene load_steps=7 format=3 uid="uid://t83eid7pf4iv"] -[ext_resource type="Texture2D" uid="uid://c4w61tw3unihl" path="res://textures/File-Icon.png" id="1_2sfn6"] -[ext_resource type="Texture2D" uid="uid://b46utc5xhr5w1" path="res://textures/File-Icon-Closed.png" id="2_6ev1f"] [ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="3_732s0"] [ext_resource type="Texture2D" uid="uid://dvk7nu7pp4fl3" path="res://textures/File-Icon-Sheet.png" id="3_bbfoq"] [ext_resource type="Script" path="res://scripts/level_menu_level_button.gd" id="3_e83yn"] -[sub_resource type="AtlasTexture" id="AtlasTexture_u313o"] +[sub_resource type="AtlasTexture" id="AtlasTexture_xlv6q"] atlas = ExtResource("3_bbfoq") -region = Rect2(355, 6, 26, 24) +region = Rect2(99, 6, 26, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ih6f2"] +atlas = ExtResource("3_bbfoq") +region = Rect2(354, 6, 28, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fekch"] +atlas = ExtResource("3_bbfoq") +region = Rect2(35, 6, 26, 24) [node name="LevelButton" type="TextureButton"] custom_minimum_size = Vector2(50, 50) @@ -17,9 +23,9 @@ offset_bottom = 40.0 size_flags_horizontal = 3 size_flags_vertical = 3 disabled = true -texture_normal = ExtResource("1_2sfn6") -texture_disabled = ExtResource("2_6ev1f") -texture_focused = SubResource("AtlasTexture_u313o") +texture_normal = SubResource("AtlasTexture_xlv6q") +texture_hover = SubResource("AtlasTexture_ih6f2") +texture_disabled = SubResource("AtlasTexture_fekch") ignore_texture_size = true stretch_mode = 5 script = ExtResource("3_e83yn") diff --git a/gmtk_2024/menu/level_menu/level_select.tscn b/gmtk_2024/menu/level_menu/level_select.tscn index 1d842bc..b0a0bb1 100644 --- a/gmtk_2024/menu/level_menu/level_select.tscn +++ b/gmtk_2024/menu/level_menu/level_select.tscn @@ -26,22 +26,23 @@ expand_mode = 1 [node name="Label" type="Label" parent="Background"] layout_mode = 0 -offset_left = 30.0 -offset_top = -8.0 -offset_right = 272.0 -offset_bottom = 42.0 +offset_left = -28.0 +offset_top = -12.0 +offset_right = 214.0 +offset_bottom = 24.0 theme = ExtResource("1_3v0vu") -theme_override_font_sizes/font_size = 45 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 30 text = "level select" horizontal_alignment = 1 vertical_alignment = 1 [node name="QuitButton" type="Button" parent="Background"] layout_mode = 0 -offset_left = 1232.0 -offset_top = 2.0 -offset_right = 1270.0 -offset_bottom = 40.0 +offset_left = 576.0 +offset_top = 1.0 +offset_right = 635.0 +offset_bottom = 18.0 flat = true [node name="ClipControl" type="Control" parent="Background"] @@ -60,8 +61,13 @@ layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_left = 65.2 +offset_top = 14.0 +offset_right = -93.1599 +offset_bottom = -25.4 grow_horizontal = 2 grow_vertical = 2 +scale = Vector2(1.06042, 1.058) columns = 3 [node name="LevelButton" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] diff --git a/gmtk_2024/textures/BrackableBlock-Sheet.png b/gmtk_2024/textures/BrackableBlock-Sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..10ee13e539bb4c1c478a6db38996030242f2feed GIT binary patch literal 932 zcmV;V16%xwP)Px&L`g(JRCt{2n?G;bKp4iKI}i}!fq@|%kt&t7RmBI0vRY9xBvL<3zfDC37`%7s zR#hDZ*c&C z%kgwDWk}%l%h6{5&^&L(yv0#{T?GJy@9F@6==;pccyYggmmcSWj;otf6vfreDR_$`xDH~kztIm1)DPGCta;vyYwv3SfaSvy08lxr6f&NFn*#v6 zel09XKU!V$(%h19KRK9>+Q8^}T*QkJ^1zJp+AZJ*ux88|X(_ z>Ko{%t~6EN;&vV~0%l)-F#xFdI&tN!vbQG9Ro=2&5$Enbw(x=GQV|zKRb;q|vzn`Vvp`*_L8c$Nq=`w=U11gS>g^ zo=@4U4`4&`12ozPXVlYC=04n1-z7c+cv58U15lEAK}OLYOxJU09$dEmRtAvt+KoN2 z-s{BMnE`!zGeSk49=vNk`__AjY-fOs9%yrKpa>7P?n4yp!DZ|F3~=N~Gk~joziA&J zPxk3Uxa8n7fP;O1Y5V#;`w&Nk(Y*j0RQvuiJlMJq;WL2en6SPVK%w@a+IR2sJbTF0000)@-@p-!f-&O8WPcXCL2rdHiwf{6j@0oAn;NY`L4VeB=30 z7Dl&hKaJ_@SM&&$s>ByhZ`O}JtaRsZY3{aifr6&LWs8JA87<=aGi8DH7u7X>K-ci4 eMtG+A`Z8z%*&IL&0+)g(gD6i|KbLh*2~7aTgI9L| literal 0 HcmV?d00001 diff --git a/gmtk_2024/textures/cursor_scale_down.png b/gmtk_2024/textures/cursor_scale_down.png new file mode 100644 index 0000000000000000000000000000000000000000..2541297495608f48aae0f7d7199f1462e201bd4c GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp@KrF<;1|%D@LyUkFV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lf&o-U3d7XDKwdGj?J@VLB{TiP8r(RX@Im8;lZuTv8KDMHIz)LGe=JU_|4 z)A6HX*KwBA<7%s{^eau};`AMbE-zEn>2`R;W*IbtX~A^YYmalEE9cKI{k=4Grkd^3 z)cAdyB6*E0Okb!tNp5-hWlcN~_OjS_0xqeAp$P^LT zotbJWNwY+zPwD)q;IX%I{epj{8IwGf_sl%OALH$5Q=X`22Xr%EYJ_K+uP=iZkj(+a TAaE&oGKlhY^>bP0l+XkKiZ)!lvI6;=JzX3_Ec~xdvKBgIz~i!3#3ZJ1R+n;6k;|$pF^z4Qf1&!YYPqqYrI5u}-C^!PfD+vg*5)c6rn9-#+s9 z=cb!U`?r_`FMa)UN&K$zJ)pVO-7vd@VlCMWeZh5tHEDEl1d_&fW8%H(Ss(w5dRen`ta%W*948PNHB fsS%!OzP=1vKsE;ugTSTW$so$p)z4*}Q$iB}m78s* literal 0 HcmV?d00001 From ddd0fdff22269b7ec6e8af33a8d57c15dd902617 Mon Sep 17 00:00:00 2001 From: Fabio Date: Mon, 19 Aug 2024 04:05:02 +0200 Subject: [PATCH 10/11] add custom cursor --- gmtk_2024/project.godot | 1 + gmtk_2024/scripts/player_movement.gd | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/gmtk_2024/project.godot b/gmtk_2024/project.godot index 6592e74..3ccd342 100644 --- a/gmtk_2024/project.godot +++ b/gmtk_2024/project.godot @@ -21,6 +21,7 @@ window/size/viewport_width=640 window/size/viewport_height=320 window/size/mode=2 window/stretch/mode="viewport" +mouse_cursor/custom_image="res://textures/cursor_normal.png" [input] diff --git a/gmtk_2024/scripts/player_movement.gd b/gmtk_2024/scripts/player_movement.gd index 6e9f3be..9bb2685 100644 --- a/gmtk_2024/scripts/player_movement.gd +++ b/gmtk_2024/scripts/player_movement.gd @@ -17,6 +17,9 @@ var target_scale var current_selected = "none" var target_scale_player: Vector2 = Vector2(1, 1) +var cursor_scale_up = preload("res://textures/cursor_scale_up.png") +var cursor_scale_down = preload("res://textures/cursor_scale_down.png") + func _ready(): data_link = $data_link @@ -78,6 +81,7 @@ func _physics_process(delta): velocity.y += gravity move_and_slide() update_data_link() + update_cursor() func Jump(): velocity.y = -1 * jump_strength @@ -96,6 +100,14 @@ func update_data_link(): else: data_link.visible = false +func update_cursor(): + var nearest_block = find_nearest_block() + if nearest_block: + if nearest_block.scale == Vector2(0.5, 0.5) and self.scale == Vector2(2.0, 2.0): + Input.set_custom_mouse_cursor(cursor_scale_up) + elif nearest_block.scale == Vector2(1.0, 1.0) and self.scale == Vector2(1.0, 1.0): + Input.set_custom_mouse_cursor(cursor_scale_down) + func find_nearest_block() -> Node2D: if not get_tree(): return null From 16004c33c00d4b215e78950cd473a43f972ce361 Mon Sep 17 00:00:00 2001 From: Fabio Date: Mon, 19 Aug 2024 04:36:22 +0200 Subject: [PATCH 11/11] adjust CRT Shader --- gmtk_2024/levels/level_1.tscn | 3 +++ gmtk_2024/menu/level_menu/level_select.tscn | 5 ++++- gmtk_2024/menu/main_menu/CreditsScene.tscn | 13 ++++++++----- gmtk_2024/menu/main_menu/MainMenu.tscn | 5 ++++- gmtk_2024/objects/CRT.tscn | 11 ++++++----- gmtk_2024/shaders/crt.gdshader | 4 ++-- 6 files changed, 27 insertions(+), 14 deletions(-) diff --git a/gmtk_2024/levels/level_1.tscn b/gmtk_2024/levels/level_1.tscn index bda4221..92c907f 100644 --- a/gmtk_2024/levels/level_1.tscn +++ b/gmtk_2024/levels/level_1.tscn @@ -130,6 +130,9 @@ shader_parameter/scroll_speed = 0.02 position = Vector2(-254, 99) input_pickable = true +[node name="CanvasLayer" parent="." index="1"] +visible = true + [node name="Walls" parent="." index="3"] collision_mask = 22 diff --git a/gmtk_2024/menu/level_menu/level_select.tscn b/gmtk_2024/menu/level_menu/level_select.tscn index b0a0bb1..bfd9f61 100644 --- a/gmtk_2024/menu/level_menu/level_select.tscn +++ b/gmtk_2024/menu/level_menu/level_select.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=5 format=3 uid="uid://bvvxwhg4tihng"] +[gd_scene load_steps=6 format=3 uid="uid://bvvxwhg4tihng"] [ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_3v0vu"] [ext_resource type="Texture2D" uid="uid://dr4ayedb5xb2k" path="res://textures/file_editor.png" id="1_44xee"] +[ext_resource type="PackedScene" uid="uid://dii1q3f5dj72y" path="res://objects/CRT.tscn" id="2_crosg"] [ext_resource type="Script" path="res://scripts/level_select.gd" id="2_nurro"] [ext_resource type="PackedScene" uid="uid://t83eid7pf4iv" path="res://menu/level_menu/level_button.tscn" id="4_0d7hu"] @@ -14,6 +15,8 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("2_nurro") +[node name="CanvasLayer" parent="." instance=ExtResource("2_crosg")] + [node name="Background" type="TextureRect" parent="."] layout_mode = 1 anchors_preset = 15 diff --git a/gmtk_2024/menu/main_menu/CreditsScene.tscn b/gmtk_2024/menu/main_menu/CreditsScene.tscn index 95c7a98..8860b18 100644 --- a/gmtk_2024/menu/main_menu/CreditsScene.tscn +++ b/gmtk_2024/menu/main_menu/CreditsScene.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://cut2xjnvh8i58"] +[gd_scene load_steps=4 format=3 uid="uid://cut2xjnvh8i58"] [ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_tmf11"] [ext_resource type="Script" path="res://scripts/menu_credit_control.gd" id="2_ogwi7"] +[ext_resource type="PackedScene" uid="uid://dii1q3f5dj72y" path="res://objects/CRT.tscn" id="3_rybt6"] [node name="CreditScene" type="MarginContainer"] anchors_preset = 15 @@ -11,10 +12,6 @@ grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("1_tmf11") -[node name="ColorRect" type="ColorRect" parent="."] -layout_mode = 2 -color = Color(0, 0, 0, 1) - [node name="Control" type="Control" parent="."] layout_mode = 2 script = ExtResource("2_ogwi7") @@ -23,3 +20,9 @@ script = ExtResource("2_ogwi7") layout_mode = 0 offset_right = 40.0 offset_bottom = 13.0 + +[node name="CanvasLayer" parent="Control" instance=ExtResource("3_rybt6")] + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 2 +color = Color(0, 0, 0, 1) diff --git a/gmtk_2024/menu/main_menu/MainMenu.tscn b/gmtk_2024/menu/main_menu/MainMenu.tscn index 7f15265..91db35f 100644 --- a/gmtk_2024/menu/main_menu/MainMenu.tscn +++ b/gmtk_2024/menu/main_menu/MainMenu.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://1h2urto6y63r"] +[gd_scene load_steps=5 format=3 uid="uid://1h2urto6y63r"] [ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_1tx2i"] [ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_kkajn"] [ext_resource type="Script" path="res://scripts/menu_main_control.gd" id="2_g8c7b"] +[ext_resource type="PackedScene" uid="uid://dii1q3f5dj72y" path="res://objects/CRT.tscn" id="2_hal3l"] [node name="MainMenu" type="MarginContainer"] anchors_preset = 15 @@ -12,6 +13,8 @@ grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("1_kkajn") +[node name="CanvasLayer" parent="." instance=ExtResource("2_hal3l")] + [node name="ColorRect" type="ColorRect" parent="."] layout_mode = 2 color = Color(0, 0, 0, 1) diff --git a/gmtk_2024/objects/CRT.tscn b/gmtk_2024/objects/CRT.tscn index bf1007d..2f8896d 100644 --- a/gmtk_2024/objects/CRT.tscn +++ b/gmtk_2024/objects/CRT.tscn @@ -4,11 +4,11 @@ [sub_resource type="ShaderMaterial" id="ShaderMaterial_c8ly2"] shader = ExtResource("1_wsc8u") -shader_parameter/crt_curve = 0.01 -shader_parameter/crt_scan_line_color = 0.178 -shader_parameter/aperture_grille_rate = 0.141 -shader_parameter/rf_switch_esque_blur = 1.0 -shader_parameter/white_noise_rate = 0.0 +shader_parameter/crt_curve = 0.015 +shader_parameter/crt_scan_line_color = 0.347 +shader_parameter/aperture_grille_rate = 1.0 +shader_parameter/rf_switch_esque_blur = 0.21 +shader_parameter/white_noise_rate = 0.184 [node name="CanvasLayer" type="CanvasLayer"] @@ -19,3 +19,4 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 diff --git a/gmtk_2024/shaders/crt.gdshader b/gmtk_2024/shaders/crt.gdshader index 6a80205..6cfdc28 100644 --- a/gmtk_2024/shaders/crt.gdshader +++ b/gmtk_2024/shaders/crt.gdshader @@ -8,7 +8,7 @@ uniform sampler2D screen_texture : hint_screen_texture; // ブラウン管のガラスの曲がり具合(フラットなやつは0.0でいいかな) uniform float crt_curve : hint_range( 0.0, 1.0 ) = 0.02; -// 走査線の濃さ +// 走査線の濃さ uniform float crt_scan_line_color : hint_range( 0.0, 1.0 ) = 0.347; // 光量 uniform float aperture_grille_rate : hint_range( 0.0, 1.0 ) = 0.4; @@ -18,7 +18,7 @@ uniform float rf_switch_esque_blur : hint_range( 0.0, 1.0 ) = 1; uniform float white_noise_rate : hint_range( 0.0, 1.0 ) = 0.0; float random( vec2 pos ) -{ +{ return fract(sin(dot(pos, vec2(12.9898,78.233))) * 43758.5453); }