diff --git a/assets/crawler_walk.aseprite b/assets/crawler_walk.aseprite new file mode 100644 index 0000000..5c5ca31 Binary files /dev/null and b/assets/crawler_walk.aseprite differ diff --git a/assets/crawler_walk.aseprite.import b/assets/crawler_walk.aseprite.import new file mode 100644 index 0000000..46d5692 --- /dev/null +++ b/assets/crawler_walk.aseprite.import @@ -0,0 +1,14 @@ +[remap] + +importer="aseprite_wizard.plugin.noop" +type="PackedDataContainer" +uid="uid://2n7hoks84s1p" +path="res://.godot/imported/crawler_walk.aseprite-caf4c5c9e2cdaae93bd51260f88ba162.res" + +[deps] + +source_file="res://assets/crawler_walk.aseprite" +dest_files=["res://.godot/imported/crawler_walk.aseprite-caf4c5c9e2cdaae93bd51260f88ba162.res"] + +[params] + diff --git a/assets/export/crawler-.png b/assets/export/crawler-.png new file mode 100644 index 0000000..bbbe460 Binary files /dev/null and b/assets/export/crawler-.png differ diff --git a/assets/export/crawler-.png.import b/assets/export/crawler-.png.import new file mode 100644 index 0000000..3ac638f --- /dev/null +++ b/assets/export/crawler-.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b447sysxt4rhp" +path="res://.godot/imported/crawler-.png-d39abaa0a487f20b9ee2a51626debbbe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/crawler-.png" +dest_files=["res://.godot/imported/crawler-.png-d39abaa0a487f20b9ee2a51626debbbe.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/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/assets/export/go-.png b/assets/export/go-.png new file mode 100644 index 0000000..665c881 Binary files /dev/null and b/assets/export/go-.png differ diff --git a/assets/export/go-.png.import b/assets/export/go-.png.import new file mode 100644 index 0000000..baf18ef --- /dev/null +++ b/assets/export/go-.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://fnp2h8e01hi0" +path="res://.godot/imported/go-.png-572338eacc1746cd2ee375fe578adec4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/go-.png" +dest_files=["res://.godot/imported/go-.png-572338eacc1746cd2ee375fe578adec4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/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/components/Crawler.tscn b/components/Crawler.tscn new file mode 100644 index 0000000..64ae613 --- /dev/null +++ b/components/Crawler.tscn @@ -0,0 +1,291 @@ +[gd_scene load_steps=35 format=3 uid="uid://n65kl0jalqdt"] + +[ext_resource type="Texture2D" uid="uid://b447sysxt4rhp" path="res://assets/export/crawler-.png" id="1_bdup0"] +[ext_resource type="Script" path="res://scripts/crawler.gd" id="1_dcux3"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_k4vrw"] +size = Vector2(57, 63) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6iqis"] +atlas = ExtResource("1_bdup0") +region = Rect2(0, 0, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hk6n7"] +atlas = ExtResource("1_bdup0") +region = Rect2(128, 128, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i7pjq"] +atlas = ExtResource("1_bdup0") +region = Rect2(256, 128, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0bqgy"] +atlas = ExtResource("1_bdup0") +region = Rect2(384, 128, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b7rtd"] +atlas = ExtResource("1_bdup0") +region = Rect2(512, 128, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ma61w"] +atlas = ExtResource("1_bdup0") +region = Rect2(640, 128, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gxbrf"] +atlas = ExtResource("1_bdup0") +region = Rect2(0, 192, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jnxq4"] +atlas = ExtResource("1_bdup0") +region = Rect2(128, 192, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_61s2s"] +atlas = ExtResource("1_bdup0") +region = Rect2(256, 192, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4h7cf"] +atlas = ExtResource("1_bdup0") +region = Rect2(384, 192, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4x8lu"] +atlas = ExtResource("1_bdup0") +region = Rect2(512, 192, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3grt7"] +atlas = ExtResource("1_bdup0") +region = Rect2(640, 192, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kw6t0"] +atlas = ExtResource("1_bdup0") +region = Rect2(0, 256, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jc8y7"] +atlas = ExtResource("1_bdup0") +region = Rect2(128, 256, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bhh5b"] +atlas = ExtResource("1_bdup0") +region = Rect2(256, 256, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2w283"] +atlas = ExtResource("1_bdup0") +region = Rect2(384, 256, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xmmn0"] +atlas = ExtResource("1_bdup0") +region = Rect2(512, 256, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5emai"] +atlas = ExtResource("1_bdup0") +region = Rect2(512, 64, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6rkkd"] +atlas = ExtResource("1_bdup0") +region = Rect2(640, 64, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vb5jc"] +atlas = ExtResource("1_bdup0") +region = Rect2(0, 128, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3efcj"] +atlas = ExtResource("1_bdup0") +region = Rect2(128, 0, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bygap"] +atlas = ExtResource("1_bdup0") +region = Rect2(256, 0, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i5vmv"] +atlas = ExtResource("1_bdup0") +region = Rect2(384, 0, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f1jsj"] +atlas = ExtResource("1_bdup0") +region = Rect2(512, 0, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l74ua"] +atlas = ExtResource("1_bdup0") +region = Rect2(640, 0, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_iy6u6"] +atlas = ExtResource("1_bdup0") +region = Rect2(0, 64, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4xmi3"] +atlas = ExtResource("1_bdup0") +region = Rect2(128, 64, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4c0s3"] +atlas = ExtResource("1_bdup0") +region = Rect2(256, 64, 128, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3jc57"] +atlas = ExtResource("1_bdup0") +region = Rect2(384, 64, 128, 64) + +[sub_resource type="SpriteFrames" id="SpriteFrames_e3bx4"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6iqis") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hk6n7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i7pjq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0bqgy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b7rtd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ma61w") +}], +"loop": true, +"name": &"Whip", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6iqis") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gxbrf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jnxq4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_61s2s") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4h7cf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4x8lu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3grt7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kw6t0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jc8y7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bhh5b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2w283") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xmmn0") +}], +"loop": true, +"name": &"death", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6iqis") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5emai") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6rkkd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5emai") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vb5jc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5emai") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6iqis") +}], +"loop": true, +"name": &"jump away", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6iqis") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3efcj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bygap") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i5vmv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_f1jsj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l74ua") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_iy6u6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4xmi3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4c0s3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3jc57") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3jc57") +}], +"loop": true, +"name": &"walk", +"speed": 10.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_s2a15"] +size = Vector2(48, 28) + +[node name="Crawler" type="CharacterBody2D"] +script = ExtResource("1_dcux3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(-3.5, -0.5) +shape = SubResource("RectangleShape2D_k4vrw") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(-34, 0) +sprite_frames = SubResource("SpriteFrames_e3bx4") +animation = &"Whip" +frame_progress = 0.990945 +metadata/_aseprite_wizard_config_ = { +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "crawler-", +"only_visible": true, +"slice": "", +"source": "res://assets/crawler_walk.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "5428848d159be8aa5f91cd42b4e9cfca" + +[node name="WhipArea" type="Area2D" parent="."] + +[node name="Area2D" type="CollisionShape2D" parent="WhipArea"] +position = Vector2(-42, 2) +shape = SubResource("RectangleShape2D_s2a15") +debug_color = Color(0.949698, 0.110143, 0.492661, 0.42) diff --git a/levels/level1/boss_stage.tscn b/levels/level1/boss_stage.tscn new file mode 100644 index 0000000..44abcb4 --- /dev/null +++ b/levels/level1/boss_stage.tscn @@ -0,0 +1,3 @@ +[gd_scene format=3 uid="uid://cvxh2yfe8k664"] + +[node name="BossStage" type="Node2D"] diff --git a/levels/level1/sta1692.tmp b/levels/level1/sta1692.tmp new file mode 100644 index 0000000..9bfbe3b --- /dev/null +++ b/levels/level1/sta1692.tmp @@ -0,0 +1,134 @@ +[gd_scene load_steps=13 format=3 uid="uid://cei5gjgfoginb"] + +[ext_resource type="Script" path="res://scripts/stageController.gd" id="1_m1n7w"] +[ext_resource type="Texture2D" uid="uid://bynsxkfd4t4cn" path="res://assets/export/stage1.png" id="2_48003"] +[ext_resource type="AudioStream" uid="uid://ce3soc3run6um" path="res://assets/Level1BGAudio.wav" id="2_qcnna"] +[ext_resource type="PackedScene" uid="uid://cjiuycwqqxaxn" path="res://components/Player.tscn" id="2_sxo5w"] +[ext_resource type="PackedScene" uid="uid://bab4ac3s2n0o1" path="res://components/Borders.tscn" id="3_04xvl"] +[ext_resource type="PackedScene" uid="uid://bxbpvgteyfh02" path="res://components/Viruling.tscn" id="5_w7lww"] +[ext_resource type="PackedScene" path="res://components/Bars.tscn" id="6_u2jd3"] +[ext_resource type="Texture2D" uid="uid://dailayr5c75eu" path="res://assets/export/top-bottom-.png" id="7_gw1ay"] +[ext_resource type="Script" path="res://scripts/level_1_spawner.gd" id="8_rl47p"] +[ext_resource type="Script" path="res://scripts/killbox.gd" id="10_oh0qe"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_h5wua"] +size = Vector2(492, 101) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wlwhn"] +size = Vector2(46, 359) + +[node name="World" type="Node2D"] +position = Vector2(344, 240) +script = ExtResource("1_m1n7w") +next_stage = "res://levels/level1/stage2.tscn" + +[node name="BGM" type="AudioStreamPlayer2D" parent="."] +position = Vector2(-344, -240) +stream = ExtResource("2_qcnna") + +[node name="Bars" parent="." instance=ExtResource("6_u2jd3")] +offset_left = -344.0 +offset_top = -240.0 +offset_right = -304.0 +offset_bottom = -200.0 + +[node name="Background" type="Sprite2D" parent="."] +position = Vector2(-28, -64) +scale = Vector2(1.01667, 1) +texture = ExtResource("2_48003") + +[node name="Player" parent="." instance=ExtResource("2_sxo5w")] +position = Vector2(-233, -21) + +[node name="Borders" parent="." instance=ExtResource("3_04xvl")] +position = Vector2(-272, -240) + +[node name="Floor" type="StaticBody2D" parent="."] + +[node name="Sprite2D" type="Sprite2D" parent="Floor"] +z_index = 1 +texture_filter = 1 +position = Vector2(-28, -191) +scale = Vector2(1, 0.283333) +texture = ExtResource("7_gw1ay") +flip_v = true +metadata/_aseprite_wizard_config_ = { +"i_mode": 1, +"keep_anim_length": false, +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "top-bottom-", +"only_visible": true, +"player": "", +"slice": "", +"source": "res://assets/TopBottom.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "1b764edd2623a4481e3cf82f9aa840f7" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"] +position = Vector2(-28, 69) +shape = SubResource("RectangleShape2D_h5wua") + +[node name="Ceiling" type="StaticBody2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Ceiling"] +position = Vector2(-29, -190) +shape = SubResource("RectangleShape2D_h5wua") + +[node name="Sprite2D" type="Sprite2D" parent="Ceiling"] +z_index = 1 +texture_filter = 1 +position = Vector2(-28.5, 68.25) +scale = Vector2(0.99591, 0.284722) +texture = ExtResource("7_gw1ay") +metadata/_aseprite_wizard_config_ = { +"i_mode": 1, +"keep_anim_length": false, +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "top-bottom-", +"only_visible": true, +"player": "", +"slice": "", +"source": "res://assets/TopBottom.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "1b764edd2623a4481e3cf82f9aa840f7" + +[node name="Level1Spawner" type="Node2D" parent="."] +script = ExtResource("8_rl47p") + +[node name="Viruling" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(380, -3) + +[node name="Viruling7" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(721, -27) + +[node name="Viruling6" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(650, -55) + +[node name="Viruling5" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(560, -71) + +[node name="Viruling4" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(382, -85) + +[node name="Viruling3" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(616, -12) + +[node name="Viruling2" parent="Level1Spawner" instance=ExtResource("5_w7lww")] +position = Vector2(504, -39) + +[node name="Killbox" type="Area2D" parent="Level1Spawner"] +script = ExtResource("10_oh0qe") + +[node name="VirulingKillArea" type="CollisionShape2D" parent="Level1Spawner/Killbox"] +position = Vector2(-320, -58.5) +shape = SubResource("RectangleShape2D_wlwhn") diff --git a/levels/level1/stage1.tscn b/levels/level1/stage1.tscn index 894352c..b916769 100644 --- a/levels/level1/stage1.tscn +++ b/levels/level1/stage1.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=10 format=3 uid="uid://cei5gjgfoginb"] +[gd_scene load_steps=14 format=3 uid="uid://cei5gjgfoginb"] -[ext_resource type="Script" path="res://scripts/stageController.gd" id="1_m1n7w"] +[ext_resource type="Script" path="res://scripts/stage_1_controller.gd" id="1_m1n7w"] [ext_resource type="Texture2D" uid="uid://bynsxkfd4t4cn" path="res://assets/export/stage1.png" id="2_48003"] [ext_resource type="AudioStream" uid="uid://ce3soc3run6um" path="res://assets/Level1BGAudio.wav" id="2_qcnna"] [ext_resource type="PackedScene" uid="uid://cjiuycwqqxaxn" path="res://components/Player.tscn" id="2_sxo5w"] @@ -8,10 +8,16 @@ [ext_resource type="PackedScene" uid="uid://bxbpvgteyfh02" path="res://components/Viruling.tscn" id="5_w7lww"] [ext_resource type="PackedScene" path="res://components/Bars.tscn" id="6_u2jd3"] [ext_resource type="Texture2D" uid="uid://dailayr5c75eu" path="res://assets/export/top-bottom-.png" id="7_gw1ay"] +[ext_resource type="Script" path="res://scripts/level_1_spawner.gd" id="8_rl47p"] +[ext_resource type="Script" path="res://scripts/killbox.gd" id="10_oh0qe"] +[ext_resource type="Texture2D" uid="uid://fnp2h8e01hi0" path="res://assets/export/go-.png" id="11_2n86p"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_h5wua"] size = Vector2(492, 101) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wlwhn"] +size = Vector2(46, 359) + [node name="World" type="Node2D"] position = Vector2(344, 240) script = ExtResource("1_m1n7w") @@ -28,7 +34,7 @@ offset_right = -304.0 offset_bottom = -200.0 [node name="Background" type="Sprite2D" parent="."] -position = Vector2(-28, -64) +position = Vector2(-27, -60) scale = Vector2(1.01667, 1) texture = ExtResource("2_48003") @@ -98,24 +104,57 @@ metadata/_aseprite_wizard_interface_config_ = { metadata/_aseprite_wizard_source_file_hash_ = "1b764edd2623a4481e3cf82f9aa840f7" [node name="Level1Spawner" type="Node2D" parent="."] +script = ExtResource("8_rl47p") [node name="Viruling" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(528, -55) +position = Vector2(380, -3) [node name="Viruling7" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(827, 6) +position = Vector2(721, -27) [node name="Viruling6" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(923, -27) +position = Vector2(650, -55) [node name="Viruling5" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(727, -3) +position = Vector2(560, -71) [node name="Viruling4" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(431, -41) +position = Vector2(382, -85) [node name="Viruling3" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(334, -4) +position = Vector2(616, -12) [node name="Viruling2" parent="Level1Spawner" instance=ExtResource("5_w7lww")] -position = Vector2(627, -33) +position = Vector2(504, -39) + +[node name="Killbox" type="Area2D" parent="Level1Spawner"] +script = ExtResource("10_oh0qe") + +[node name="VirulingKillArea" type="CollisionShape2D" parent="Level1Spawner/Killbox"] +position = Vector2(-320, -58.5) +shape = SubResource("RectangleShape2D_wlwhn") + +[node name="GoArrow" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(174, -50) +texture = ExtResource("11_2n86p") +metadata/_aseprite_wizard_config_ = { +"i_mode": 1, +"keep_anim_length": false, +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "go-", +"only_visible": true, +"player": "", +"slice": "", +"source": "res://assets/Go.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "db984f52c5ed02484bd4226782968210" + +[node name="BlinkTimer" type="Timer" parent="."] +wait_time = 0.5 +one_shot = true diff --git a/levels/level1/stage2.tscn b/levels/level1/stage2.tscn index 2c53ff8..b880923 100644 --- a/levels/level1/stage2.tscn +++ b/levels/level1/stage2.tscn @@ -1,6 +1,128 @@ -[gd_scene load_steps=2 format=3 uid="uid://cnpspjqlc7b52"] +[gd_scene load_steps=11 format=3 uid="uid://cnpspjqlc7b52"] -[ext_resource type="Script" path="res://scripts/stageController.gd" id="1_0rodf"] +[ext_resource type="Script" path="res://scripts/stage_2.gd" id="1_pqela"] +[ext_resource type="AudioStream" uid="uid://ce3soc3run6um" path="res://assets/Level1BGAudio.wav" id="2_v7wia"] +[ext_resource type="PackedScene" path="res://components/Bars.tscn" id="3_n5aqu"] +[ext_resource type="Texture2D" uid="uid://bynsxkfd4t4cn" path="res://assets/export/stage1.png" id="4_d2h5p"] +[ext_resource type="PackedScene" uid="uid://cjiuycwqqxaxn" path="res://components/Player.tscn" id="5_kc5l1"] +[ext_resource type="PackedScene" uid="uid://bab4ac3s2n0o1" path="res://components/Borders.tscn" id="6_47554"] +[ext_resource type="Texture2D" uid="uid://dailayr5c75eu" path="res://assets/export/top-bottom-.png" id="7_gl8tg"] +[ext_resource type="Texture2D" uid="uid://fnp2h8e01hi0" path="res://assets/export/go-.png" id="8_usr2a"] +[ext_resource type="Script" path="res://scripts/level_2_spawner.gd" id="9_2n06p"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_a73r6"] +size = Vector2(492, 144.5) [node name="World" type="Node2D"] -script = ExtResource("1_0rodf") +position = Vector2(344, 241) +script = ExtResource("1_pqela") +next_stage = "res://levels/level1/boss_stage.tscn" + +[node name="BGM" type="AudioStreamPlayer2D" parent="."] +position = Vector2(-344, -240) +stream = ExtResource("2_v7wia") + +[node name="Bars" parent="." instance=ExtResource("3_n5aqu")] +offset_left = -344.0 +offset_top = -240.0 +offset_right = -304.0 +offset_bottom = -200.0 +metadata/_edit_use_anchors_ = true + +[node name="Background" type="Sprite2D" parent="."] +position = Vector2(-27, -60) +scale = Vector2(1.01667, 1) +texture = ExtResource("4_d2h5p") + +[node name="Player" parent="." instance=ExtResource("5_kc5l1")] +position = Vector2(-247, -41) + +[node name="Borders" parent="." instance=ExtResource("6_47554")] +position = Vector2(-272, -240) + +[node name="Floor" type="StaticBody2D" parent="."] + +[node name="Sprite2D" type="Sprite2D" parent="Floor"] +z_index = 1 +texture_filter = 1 +position = Vector2(-28, -168.5) +scale = Vector2(1, 0.408333) +texture = ExtResource("7_gl8tg") +flip_v = true +metadata/_aseprite_wizard_config_ = { +"i_mode": 1, +"keep_anim_length": false, +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "top-bottom-", +"only_visible": true, +"player": "", +"slice": "", +"source": "res://assets/TopBottom.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "1b764edd2623a4481e3cf82f9aa840f7" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"] +position = Vector2(-28, 69) +shape = SubResource("RectangleShape2D_a73r6") + +[node name="Ceiling" type="StaticBody2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Ceiling"] +position = Vector2(-29, -168.25) +shape = SubResource("RectangleShape2D_a73r6") + +[node name="Sprite2D" type="Sprite2D" parent="Ceiling"] +z_index = 1 +texture_filter = 1 +position = Vector2(-28.5, 57.75) +scale = Vector2(0.99591, 0.343055) +texture = ExtResource("7_gl8tg") +metadata/_aseprite_wizard_config_ = { +"i_mode": 1, +"keep_anim_length": false, +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "top-bottom-", +"only_visible": true, +"player": "", +"slice": "", +"source": "res://assets/TopBottom.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "1b764edd2623a4481e3cf82f9aa840f7" + +[node name="GoArrow" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(174, -50) +texture = ExtResource("8_usr2a") +metadata/_aseprite_wizard_config_ = { +"i_mode": 1, +"keep_anim_length": false, +"layer": "", +"o_ex_p": "", +"o_folder": "res://assets/export", +"o_name": "go-", +"only_visible": true, +"player": "", +"slice": "", +"source": "res://assets/Go.aseprite" +} +metadata/_aseprite_wizard_interface_config_ = { +"output_section": true +} +metadata/_aseprite_wizard_source_file_hash_ = "db984f52c5ed02484bd4226782968210" + +[node name="BlinkTimer" type="Timer" parent="."] +wait_time = 0.5 +one_shot = true + +[node name="Level2Spawner" type="Node2D" parent="."] +script = ExtResource("9_2n06p") diff --git a/scripts/crawler.gd b/scripts/crawler.gd new file mode 100644 index 0000000..091376c --- /dev/null +++ b/scripts/crawler.gd @@ -0,0 +1,3 @@ +class_name Crawler extends Entity + +## Crawl towards the player but stay within striking distance and not super close diff --git a/scripts/killbox.gd b/scripts/killbox.gd new file mode 100644 index 0000000..2b2d67b --- /dev/null +++ b/scripts/killbox.gd @@ -0,0 +1,15 @@ +extends Area2D + +@onready var kill_area = $VirulingKillArea + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + body_entered.connect(kill_enemy) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + +func kill_enemy(node: Node) -> void: + if node is Viruling: + node.is_dying = true diff --git a/scripts/level_1_spawner.gd b/scripts/level_1_spawner.gd new file mode 100644 index 0000000..7733894 --- /dev/null +++ b/scripts/level_1_spawner.gd @@ -0,0 +1,32 @@ +extends Node2D + +@onready var wave_1 = [$Viruling, $Viruling2, $Viruling3] +@onready var wave_2 = [$Viruling4, $Viruling5, $Viruling6, $Viruling7] +var complete = false +var wave_2_start = false + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + for viruling in wave_1: + viruling.charge() + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + for viruling in wave_1: + if viruling.is_dying: + wave_1.erase(viruling) + + for viruling in wave_2: + if viruling.is_dying: + wave_2.erase(viruling) + + if wave_1 == [] and !wave_2_start: + wave_2_start = true + for viruling in wave_2: + viruling.charge() + + if wave_2 == []: + complete = true + +func is_complete() -> bool: + return complete diff --git a/scripts/level_2_spawner.gd b/scripts/level_2_spawner.gd new file mode 100644 index 0000000..f1ed8f0 --- /dev/null +++ b/scripts/level_2_spawner.gd @@ -0,0 +1,15 @@ +extends Node2D + +@onready var complete = false + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + +func is_complete() -> bool: + return complete diff --git a/scripts/player.gd b/scripts/player.gd index 2c86b1b..92b65a1 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -1,4 +1,4 @@ -extends Entity +class_name Player extends Entity @export var GRAVITY = 30 @export var JUMP_FORCE = 500 @@ -97,8 +97,9 @@ func _process(delta: float) -> void: punch_hitbox.visible = false speed = 0 + # Reset to start on death if death_timer.is_stopped(): - queue_free() + get_tree().change_scene_to_file("res://levels/level1/stage1.tscn") if attack_timer.is_stopped() and Input.is_action_just_pressed("attack"): attack_timer.start() diff --git a/scripts/stageController.gd b/scripts/stageController.gd deleted file mode 100644 index 297ca8c..0000000 --- a/scripts/stageController.gd +++ /dev/null @@ -1,22 +0,0 @@ -extends Node - -@export var next_stage : String; -var completed = false; - -@onready var right_border = $Borders/Right/CollisionShape2D; -@onready var right_trigger = $Borders/Right/Trigger; -@onready var bgm = $BGM - -func _process(delta: float) -> void: - if Input.is_action_just_pressed("trigger_completed"): - completed = true - - if completed: - right_border.shape = null - right_trigger.body_entered.connect(_on_trigger) - - if !bgm.playing: - bgm.play() - -func _on_trigger(body: Node) -> void: - get_tree().change_scene_to_file(next_stage) diff --git a/scripts/stage_1_controller.gd b/scripts/stage_1_controller.gd new file mode 100644 index 0000000..f5a259a --- /dev/null +++ b/scripts/stage_1_controller.gd @@ -0,0 +1,42 @@ +extends Node + +@export var next_stage: String +var completed: bool +var go_arrow_blink_on: bool + +@onready var right_border = $Borders/Right/CollisionShape2D +@onready var right_trigger = $Borders/Right/Trigger +@onready var bgm = $BGM +@onready var spawner = $Level1Spawner +@onready var go_arrow = $GoArrow +@onready var blink_timer = $BlinkTimer + +func _ready() -> void: + completed = false + go_arrow_blink_on = false + go_arrow.hide() + +func _process(delta: float) -> void: + var completed = spawner.is_complete() + + if completed: + toggle_go_arrow() + right_border.shape = null + right_trigger.body_entered.connect(_on_trigger) + + if !bgm.playing: + bgm.play() + +func _on_trigger(body: Node) -> void: + if body is Player: + get_tree().change_scene_to_file(next_stage) + +func toggle_go_arrow() -> void: + if blink_timer.is_stopped(): + blink_timer.start() + if go_arrow_blink_on: + go_arrow.hide() + go_arrow_blink_on = false + else: + go_arrow.show() + go_arrow_blink_on = true diff --git a/scripts/stage_2.gd b/scripts/stage_2.gd new file mode 100644 index 0000000..506d4e4 --- /dev/null +++ b/scripts/stage_2.gd @@ -0,0 +1,44 @@ +extends Node2D + +@export var next_stage: String +var completed: bool +var go_arrow_blink_on: bool + +@onready var right_border = $Borders/Right/CollisionShape2D +@onready var right_trigger = $Borders/Right/Trigger +@onready var bgm = $BGM +@onready var spawner = $Level2Spawner +@onready var go_arrow = $GoArrow +@onready var blink_timer = $BlinkTimer + +#ctrlctrlv +func _ready() -> void: + completed = false + go_arrow_blink_on = false + go_arrow.hide() + +func _process(delta: float) -> void: + ## this wave just a few crawlers + var completed = spawner.is_complete() + + if completed: + toggle_go_arrow() + right_border.shape = null + right_trigger.body_entered.connect(_on_trigger) + + if !bgm.playing: + bgm.play() + +func _on_trigger(body: Node) -> void: + if body is Player: + get_tree().change_scene_to_file(next_stage) + +func toggle_go_arrow() -> void: + if blink_timer.is_stopped(): + blink_timer.start() + if go_arrow_blink_on: + go_arrow.hide() + go_arrow_blink_on = false + else: + go_arrow.show() + go_arrow_blink_on = true diff --git a/scripts/viruling.gd b/scripts/viruling.gd index a24562b..14a6bcf 100644 --- a/scripts/viruling.gd +++ b/scripts/viruling.gd @@ -1,4 +1,4 @@ -extends Entity; +class_name Viruling extends Entity; @onready var animated_sprite = $AnimatedSprite2D @onready var collider = $CollisionShape2D @@ -8,18 +8,19 @@ extends Entity; @onready var death_timer = $DeathTimer @onready var explosion_sfx = $ExplosionSFX var is_dying = false +var attack_speed = 0 -const SPEED_MULTIPLIER = 100 +var speed_multiplier = 100 const INITIAL_HEALTH = 10 const ATTACK_DAMAGE = 10 const ATTACK_KNOCKBACK = 5000 func _init() -> void: - super._init(INITIAL_HEALTH, SPEED_MULTIPLIER, ATTACK_DAMAGE) + super._init(INITIAL_HEALTH, speed_multiplier, ATTACK_DAMAGE) # Called when the node enters the scene tree for the first time. func _ready() -> void: - velocity.x = -speed + velocity.x = attack_speed contact_hitbox.body_entered.connect(body_connect) contact_hitbox.visible = false animated_sprite.play("spin") @@ -29,7 +30,8 @@ func _physics_process(delta: float) -> void: if !is_dying: contact_hitbox.visible = false if contact_hitbox.visible else true super._physics_process(delta) - velocity.x = -speed + velocity.x = attack_speed + velocity.y = 0 # jank move_and_slide() func _process(delta: float) -> void: @@ -43,7 +45,7 @@ func _process(delta: float) -> void: animated_sprite.play("death") explosion_sfx.play() contact_hitbox.visible = false - speed = 0 + speed_multiplier = 0 if death_timer.is_stopped(): queue_free() @@ -55,3 +57,6 @@ func body_connect(node: Node): node.take_knockback(ATTACK_KNOCKBACK) if node.has_method("hurt_anim"): node.call("hurt_anim") + +func charge() -> void: + attack_speed = -speed_multiplier