From 3b0b981337e26996f4aba66180ff51addebe8da9 Mon Sep 17 00:00:00 2001 From: TheRailGoat <128244062+TheRailGoat@users.noreply.github.com> Date: Sun, 25 Oct 2026 22:51:51 -0500 Subject: [PATCH] Swinging Saws (plus prototype level select) --- art/+Y6tTX.png.import | 43 +++++++++++ art/CwIZf+.png.import | 43 +++++++++++ art/ie382o.png.import | 43 +++++++++++ art/saw_chain.png | Bin 0 -> 659 bytes art/saw_chain.png.import | 43 +++++++++++ level_border_block_h.tscn | 20 +++++ level_border_block_v.tscn | 21 ++++++ saw_swinging.gd | 25 +++++++ saw_swinging.gd.uid | 1 + saw_swinging.tscn | 151 ++++++++++++++++++++++++++++++++++++++ world.tscn | 68 +++++++++++++++++ 11 files changed, 458 insertions(+) create mode 100644 art/+Y6tTX.png.import create mode 100644 art/CwIZf+.png.import create mode 100644 art/ie382o.png.import create mode 100644 art/saw_chain.png create mode 100644 art/saw_chain.png.import create mode 100644 level_border_block_h.tscn create mode 100644 level_border_block_v.tscn create mode 100644 saw_swinging.gd create mode 100644 saw_swinging.gd.uid create mode 100644 saw_swinging.tscn diff --git a/art/+Y6tTX.png.import b/art/+Y6tTX.png.import new file mode 100644 index 0000000..1a3cf48 --- /dev/null +++ b/art/+Y6tTX.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbjb5a353bq5p" +path="res://.godot/imported/+Y6tTX.png-727916852968e76cc993d8b7d6d6d93a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/+Y6tTX.png" +dest_files=["res://.godot/imported/+Y6tTX.png-727916852968e76cc993d8b7d6d6d93a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/art/CwIZf+.png.import b/art/CwIZf+.png.import new file mode 100644 index 0000000..6123ed5 --- /dev/null +++ b/art/CwIZf+.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cgyp2d3phoeqd" +path="res://.godot/imported/CwIZf+.png-d1acec1f682e0950ce7b5cc0bfb297db.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/CwIZf+.png" +dest_files=["res://.godot/imported/CwIZf+.png-d1acec1f682e0950ce7b5cc0bfb297db.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/art/ie382o.png.import b/art/ie382o.png.import new file mode 100644 index 0000000..ffdae75 --- /dev/null +++ b/art/ie382o.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wfsj2b8bpr56" +path="res://.godot/imported/ie382o.png-08c93a780308d3a3514a4445a6140b23.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ie382o.png" +dest_files=["res://.godot/imported/ie382o.png-08c93a780308d3a3514a4445a6140b23.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/art/saw_chain.png b/art/saw_chain.png new file mode 100644 index 0000000000000000000000000000000000000000..de1dd6eeb42b1561da334b4b52c7888d6e91a7e2 GIT binary patch literal 659 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*!3HFSYrjteQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`ISV`@iy0XB4ude`@%$AjKtah8*NBqf{Irtt#G+J&fW*wa5~kXKn^Q|6eBAGBar0<#L`eU$T=E}%wTaQAls0Ui9rxZ zM*(qWI}2Dm2gnA21Rw_KhtcS^GB7YRFic=)U;(NzFfuk^TmUf_q=$6@#4M0+L4XNp z5))WukfjBX1=VF}U;vW6xqQ~tliRuDf%e&Zx;TbJxWAozF|XNx$2I@NKJLh$1}Xn^ zey&}sQZ13P^6`U3Uez-!f|fdcSov{nqj}+{V~obrC6f2{8S>44oAAuZh1KEjo9kwa zek5qjeA3&t?P=ogRSRm%yZs85O3ZqowVX*w>&zYAbBpFyWU3fR9(cv@+b5|fA+3^y zhlQ_NQE+9t?yLo3a-DNj7jsF)+@9E`Y9PrqL(*l*zyH2la<3?bOgwt(yL#LD2HW0? zANWEJ#yy$!Nbi5MpF-WnV-|~qW1fZ-TQjNz9rpkVcM^>bP0l+XkK9gfuW literal 0 HcmV?d00001 diff --git a/art/saw_chain.png.import b/art/saw_chain.png.import new file mode 100644 index 0000000..f8af4f7 --- /dev/null +++ b/art/saw_chain.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d22jcb3da431q" +path="res://.godot/imported/saw_chain.png-426bf95addbff87985501cf0b0665d08.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/saw_chain.png" +dest_files=["res://.godot/imported/saw_chain.png-426bf95addbff87985501cf0b0665d08.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/level_border_block_h.tscn b/level_border_block_h.tscn new file mode 100644 index 0000000..88bb68e --- /dev/null +++ b/level_border_block_h.tscn @@ -0,0 +1,20 @@ +[gd_scene format=3 uid="uid://crmvdya3m7mll"] + +[ext_resource type="Texture2D" uid="uid://blbaaqyrt8dtk" path="res://art/block/block.png" id="1_c1qw8"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_f3sb7"] +size = Vector2(16, 14) + +[node name="LevelBorderBlock" type="RigidBody2D" unique_id=1409784601] +gravity_scale = 0.0 +freeze = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1866755047] +scale = Vector2(64, 1) +shape = SubResource("RectangleShape2D_f3sb7") + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1680278216] +texture_repeat = 2 +texture = ExtResource("1_c1qw8") +region_enabled = true +region_rect = Rect2(-1024, -16, 1024, 16) diff --git a/level_border_block_v.tscn b/level_border_block_v.tscn new file mode 100644 index 0000000..b6eb79e --- /dev/null +++ b/level_border_block_v.tscn @@ -0,0 +1,21 @@ +[gd_scene format=3 uid="uid://b4221qweamyvs"] + +[ext_resource type="Texture2D" uid="uid://blbaaqyrt8dtk" path="res://art/block/block.png" id="1_jmk5n"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_f3sb7"] +size = Vector2(16, 14) + +[node name="LevelBorderBlockV" type="RigidBody2D" unique_id=1409784601] +gravity_scale = 0.0 +freeze = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1866755047] +scale = Vector2(1, 36.56) +shape = SubResource("RectangleShape2D_f3sb7") + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1680278216] +texture_repeat = 2 +rotation = 1.5707964 +texture = ExtResource("1_jmk5n") +region_enabled = true +region_rect = Rect2(-512, 16, 512, 16) diff --git a/saw_swinging.gd b/saw_swinging.gd new file mode 100644 index 0000000..a7e260e --- /dev/null +++ b/saw_swinging.gd @@ -0,0 +1,25 @@ +extends Node2D + +@export var max_distance = 260.0 +var alt_position = Vector2(position.x + max_distance,0) +@export var fullswing_cw = false +@export var fullswing_ccw = false +@export var halfswing_cw = false +@export var halfswing_ccw = false + +func _ready() -> void: + alt_position = Vector2(position.x + max_distance,0) + +func _process(delta: float) -> void: + if fullswing_cw: $AnimationPlayer.play("fullswing_cw") + elif fullswing_ccw: $AnimationPlayer.play("fullswing_ccw") + elif halfswing_cw: $AnimationPlayer.play("halfswing_cw") + else: + $AnimationPlayer.play("halfswing_ccw") + %Player2D.is_on_moving_platform = false + +func on_contact(body: Node2D) -> void: + if body==%Player2D and %Player2D.death_cooldown == 0: + print("SLASH KILL") + %Player2D/Jetpack/DeathSound.play() + %Player2D.on_death(false,%Player2D.position) diff --git a/saw_swinging.gd.uid b/saw_swinging.gd.uid new file mode 100644 index 0000000..afdf937 --- /dev/null +++ b/saw_swinging.gd.uid @@ -0,0 +1 @@ +uid://by82tj263c628 diff --git a/saw_swinging.tscn b/saw_swinging.tscn new file mode 100644 index 0000000..2467f33 --- /dev/null +++ b/saw_swinging.tscn @@ -0,0 +1,151 @@ +[gd_scene format=3 uid="uid://dgxovyasrduo5"] + +[ext_resource type="Script" uid="uid://by82tj263c628" path="res://saw_swinging.gd" id="1_n4mys"] +[ext_resource type="Texture2D" uid="uid://d22jcb3da431q" path="res://art/saw_chain.png" id="2_31jf1"] +[ext_resource type="Texture2D" uid="uid://cpftgnwkpx1rp" path="res://art/saw.png" id="2_vwlp5"] +[ext_resource type="Texture2D" uid="uid://dfdjachaibh2u" path="res://art/saw2.png" id="3_31jf1"] +[ext_resource type="Texture2D" uid="uid://cwvvgwo87pct0" path="res://art/saw3.png" id="4_3wt0e"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_ryup7"] +radius = 16.0 + +[sub_resource type="Animation" id="Animation_vwlp5"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} + +[sub_resource type="Animation" id="Animation_3wt0e"] +resource_name = "fullswing_ccw" +length = 2.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0.0, -6.2831855] +} + +[sub_resource type="Animation" id="Animation_31jf1"] +resource_name = "fullswing_cw" +length = 2.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0.0, 6.2831855] +} + +[sub_resource type="Animation" id="Animation_x3ve6"] +resource_name = "halfswing_ccw" +length = 2.0 +loop_mode = 2 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 5 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [1.5707963267948966, -1.5707963267948966] +} + +[sub_resource type="Animation" id="Animation_g2k3i"] +resource_name = "halfswing_cw" +length = 2.0 +loop_mode = 2 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 5 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [-1.5707963267948966, 1.5707963267948966] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_3wt0e"] +_data = { +&"RESET": SubResource("Animation_vwlp5"), +&"fullswing_ccw": SubResource("Animation_3wt0e"), +&"fullswing_cw": SubResource("Animation_31jf1"), +&"halfswing_ccw": SubResource("Animation_x3ve6"), +&"halfswing_cw": SubResource("Animation_g2k3i") +} + +[sub_resource type="SpriteFrames" id="SpriteFrames_lmieu"] +animations = [{ +"frames": [{ +"duration": 0.3, +"texture": ExtResource("2_vwlp5") +}, { +"duration": 0.3, +"texture": ExtResource("3_31jf1") +}, { +"duration": 0.3, +"texture": ExtResource("4_3wt0e") +}], +"loop": 1, +"name": &"default", +"speed": 5.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_vwlp5"] +radius = 18.0 + +[node name="SawSwinging" type="AnimatableBody2D" unique_id=1098290500] +script = ExtResource("1_n4mys") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1907671557] +position = Vector2(1.5195612e-05, 76) +shape = SubResource("CircleShape2D_ryup7") + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=141912847] +position = Vector2(5.9447484e-06, 34) +texture = ExtResource("2_31jf1") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1221437574] +libraries/ = SubResource("AnimationLibrary_3wt0e") + +[node name="SawBlade" type="AnimatedSprite2D" parent="." unique_id=760707152] +texture_filter = 1 +position = Vector2(1.5195612e-05, 76) +sprite_frames = SubResource("SpriteFrames_lmieu") +autoplay = "default" +frame_progress = 0.40998712 + +[node name="Area2D" type="Area2D" parent="." unique_id=1356546922] +position = Vector2(19.000013, 83) +rotation = -6.834404e-05 + +[node name="ShapeCast2D" type="CollisionShape2D" parent="Area2D" unique_id=1586514592] +position = Vector2(-18.999523, -7.0012984) +shape = SubResource("CircleShape2D_vwlp5") + +[connection signal="body_entered" from="Area2D" to="." method="on_contact"] diff --git a/world.tscn b/world.tscn index ff8b762..402f979 100644 --- a/world.tscn +++ b/world.tscn @@ -36,7 +36,10 @@ [ext_resource type="PackedScene" uid="uid://div6quttr84u1" path="res://horizontal_moving_block.tscn" id="34_w44yn"] [ext_resource type="PackedScene" uid="uid://b61sumdnt0qqh" path="res://hidden_horizontal_moving_block.tscn" id="35_6ah6f"] [ext_resource type="PackedScene" uid="uid://c13khrhjy5nrj" path="res://saw.tscn" id="37_my276"] +[ext_resource type="PackedScene" uid="uid://crmvdya3m7mll" path="res://level_border_block_h.tscn" id="38_1ew0l"] [ext_resource type="PackedScene" uid="uid://bnuiagw3bblfh" path="res://hat_pickup.tscn" id="38_yx0jh"] +[ext_resource type="PackedScene" uid="uid://b4221qweamyvs" path="res://level_border_block_v.tscn" id="39_ryup7"] +[ext_resource type="PackedScene" uid="uid://dgxovyasrduo5" path="res://saw_swinging.tscn" id="40_ryup7"] [node name="World" type="Node2D" unique_id=1327991900] process_mode = 1 @@ -2765,4 +2768,69 @@ hat_type = "cap1" position = Vector2(8510, -958.0709) hat_type = "wizard1" +[node name="LevelBorderBlockH" parent="." unique_id=974826545 instance=ExtResource("38_1ew0l")] +position = Vector2(-4760, -1535.0798) + +[node name="LevelBorderBlockH3" parent="." unique_id=1943781212 instance=ExtResource("38_1ew0l")] +position = Vector2(-6716, -100.435) + +[node name="LevelBorderBlockH2" parent="." unique_id=203676189 instance=ExtResource("38_1ew0l")] +position = Vector2(-4760, -2058.9175) + +[node name="LevelBorderBlockV" parent="." unique_id=1863499464 instance=ExtResource("39_ryup7")] +position = Vector2(-5264, -1796.9983) + +[node name="LevelBorderBlockV2" parent="." unique_id=1584857951 instance=ExtResource("39_ryup7")] +position = Vector2(-4256, -1796.9983) + +[node name="TeleporterLevelSelect" parent="." unique_id=1457473782 instance=ExtResource("4_gbfbk")] +position = Vector2(-5222, 353.49173) +paired_teleporter = "LVLSELECT" + +[node name="TeleporterLevelSelect2" parent="." unique_id=639660602 instance=ExtResource("4_gbfbk")] +position = Vector2(-7174, -172.31491) +paired_teleporter = "LVLSELECT" + +[node name="TeleporterLv1A2" parent="." unique_id=503216712 instance=ExtResource("4_gbfbk")] +position = Vector2(-6987, -128.99002) +paired_teleporter = "LVL1A" + +[node name="TeleporterLv1B2" parent="." unique_id=527073843 instance=ExtResource("4_gbfbk")] +position = Vector2(-7021, -687.29034) +paired_teleporter = "LVL1B" + +[node name="TeleporterLv1A" parent="." unique_id=789720442 instance=ExtResource("4_gbfbk")] +position = Vector2(-5227, -1803.8909) +paired_teleporter = "LVL1A" + +[node name="TeleporterLv1B" parent="." unique_id=1909239859 instance=ExtResource("4_gbfbk")] +position = Vector2(-4305, -1570.5273) +paired_teleporter = "LVL1B" + +[node name="Sign15" parent="." unique_id=1071149314 instance=ExtResource("24_wjb0r")] +position = Vector2(-7176, -110.28155) +sign_text = "LEVEL SELECT" + +[node name="Sign17" parent="." unique_id=364469894 instance=ExtResource("24_wjb0r")] +position = Vector2(-7176, -110.28155) +sign_text = "LEVEL SELECT" + +[node name="Sign16" parent="." unique_id=671241159 instance=ExtResource("24_wjb0r")] +position = Vector2(-7078, -142.77518) +scale = Vector2(-1, -1) +sign_text = "LEVEL 1" + +[node name="LongBlock12" parent="." unique_id=514950089 instance=ExtResource("3_dwbse")] +position = Vector2(-7031, -151.63712) + +[node name="SawSwinging" parent="." unique_id=1098290500 instance=ExtResource("40_ryup7")] +position = Vector2(-5048, -1800.937) +fullswing_cw = true + +[node name="Block31" parent="." unique_id=531402933 instance=ExtResource("2_036b0")] +position = Vector2(-5048, -1799.9523) + +[node name="Saw6" parent="." unique_id=960224204 instance=ExtResource("37_my276")] +position = Vector2(-4916, -1799.9523) + [connection signal="toggled" from="CanvasLayer/MusicButton" to="CanvasLayer/MusicButton" method="_on_toggled"]