feat:fix animations, add sfx + bgm, healthbar, spawner node #2

Merged
newt merged 2 commits from abstralexis/gmtk-2024:main into main 2024-08-18 15:30:55 +00:00
45 changed files with 1825 additions and 418 deletions

BIN
assets/EnemyHurt.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dxnxix8qrr6tq"
path="res://.godot/imported/EnemyHurt.wav-fb6c033455c8fd2c64ccfdf0c818a65a.sample"
[deps]
source_file="res://assets/EnemyHurt.wav"
dest_files=["res://.godot/imported/EnemyHurt.wav-fb6c033455c8fd2c64ccfdf0c818a65a.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
assets/Explode.wav Normal file

Binary file not shown.

24
assets/Explode.wav.import Normal file
View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dfrc2luquqqlw"
path="res://.godot/imported/Explode.wav-1025ed9a84beb2ef982eff388b1bbeea.sample"
[deps]
source_file="res://assets/Explode.wav"
dest_files=["res://.godot/imported/Explode.wav-1025ed9a84beb2ef982eff388b1bbeea.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
assets/Go.aseprite Normal file

Binary file not shown.

14
assets/Go.aseprite.import Normal file
View file

@ -0,0 +1,14 @@
[remap]
importer="aseprite_wizard.plugin.noop"
type="PackedDataContainer"
uid="uid://davrou2v4qw2i"
path="res://.godot/imported/Go.aseprite-25f8aee4e191af232eb3cbeb790ac21b.res"
[deps]
source_file="res://assets/Go.aseprite"
dest_files=["res://.godot/imported/Go.aseprite-25f8aee4e191af232eb3cbeb790ac21b.res"]
[params]

Binary file not shown.

View file

@ -0,0 +1,14 @@
[remap]
importer="aseprite_wizard.plugin.noop"
type="PackedDataContainer"
uid="uid://dgqr8sd2xeyni"
path="res://.godot/imported/HealthBorder.aseprite-114a2c214cb1e322dfa2a303d28a908a.res"
[deps]
source_file="res://assets/HealthBorder.aseprite"
dest_files=["res://.godot/imported/HealthBorder.aseprite-114a2c214cb1e322dfa2a303d28a908a.res"]
[params]

BIN
assets/Level1BGAudio.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ce3soc3run6um"
path="res://.godot/imported/Level1BGAudio.wav-e7b60b70a4523876968adf4a6c8994a4.sample"
[deps]
source_file="res://assets/Level1BGAudio.wav"
dest_files=["res://.godot/imported/Level1BGAudio.wav-e7b60b70a4523876968adf4a6c8994a4.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

BIN
assets/PlayerDeathSound.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://du0f57xgcxuxf"
path="res://.godot/imported/PlayerDeathSound.wav-064911359937abe1fa0c8cddb7e84ea4.sample"
[deps]
source_file="res://assets/PlayerDeathSound.wav"
dest_files=["res://.godot/imported/PlayerDeathSound.wav-064911359937abe1fa0c8cddb7e84ea4.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
assets/PlayerHurt.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cir5d1qi0hcev"
path="res://.godot/imported/PlayerHurt.wav-7dea0e9202985b5dd27d18b772b40ee2.sample"
[deps]
source_file="res://assets/PlayerHurt.wav"
dest_files=["res://.godot/imported/PlayerHurt.wav-7dea0e9202985b5dd27d18b772b40ee2.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
assets/TopBottom.aseprite Normal file

Binary file not shown.

View file

@ -0,0 +1,14 @@
[remap]
importer="aseprite_wizard.plugin.noop"
type="PackedDataContainer"
uid="uid://crfosyduwl8ln"
path="res://.godot/imported/TopBottom.aseprite-4492d70b38a804feac46851918def1b1.res"
[deps]
source_file="res://assets/TopBottom.aseprite"
dest_files=["res://.godot/imported/TopBottom.aseprite-4492d70b38a804feac46851918def1b1.res"]
[params]

Binary file not shown.

View file

@ -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]

BIN
assets/export/crawler-.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -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

BIN
assets/export/go-.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

View file

@ -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

BIN
assets/export/health-.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cliy3s4yykb3k"
path="res://.godot/imported/health-.png-4c2f44980382af653fa17687a74ed113.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/export/health-.png"
dest_files=["res://.godot/imported/health-.png-4c2f44980382af653fa17687a74ed113.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dailayr5c75eu"
path="res://.godot/imported/top-bottom-.png-f040386dc0350eeaa8c2f46c3e11e100.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/export/top-bottom-.png"
dest_files=["res://.godot/imported/top-bottom-.png-f040386dc0350eeaa8c2f46c3e11e100.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

291
components/Crawler.tscn Normal file
View file

@ -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)

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=27 format=3 uid="uid://bxbpvgteyfh02"] [gd_scene load_steps=28 format=3 uid="uid://bxbpvgteyfh02"]
[ext_resource type="Script" path="res://scripts/viruling.gd" id="1_eevnl"] [ext_resource type="Script" path="res://scripts/viruling.gd" id="1_eevnl"]
[ext_resource type="Texture2D" uid="uid://djjun1p0rx1ap" path="res://assets/export/viruling-.png" id="1_i45rj"] [ext_resource type="Texture2D" uid="uid://djjun1p0rx1ap" path="res://assets/export/viruling-.png" id="1_i45rj"]
[ext_resource type="AudioStream" uid="uid://dfrc2luquqqlw" path="res://assets/Explode.wav" id="3_hno7f"]
[sub_resource type="CircleShape2D" id="CircleShape2D_gi7h4"] [sub_resource type="CircleShape2D" id="CircleShape2D_gi7h4"]
radius = 17.0294 radius = 17.0294
@ -213,3 +214,7 @@ one_shot = true
[node name="DeathTimer" type="Timer" parent="."] [node name="DeathTimer" type="Timer" parent="."]
wait_time = 0.55 wait_time = 0.55
one_shot = true one_shot = true
[node name="ExplosionSFX" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_hno7f")
volume_db = 10.0

View file

@ -0,0 +1,3 @@
[gd_scene format=3 uid="uid://cvxh2yfe8k664"]
[node name="BossStage" type="Node2D"]

134
levels/level1/sta1692.tmp Normal file
View file

@ -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")

121
levels/level1/sta1910.tmp Normal file
View file

@ -0,0 +1,121 @@
[gd_scene load_steps=10 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"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_h5wua"]
size = Vector2(492, 101)
[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="."]
[node name="Viruling" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(528, -55)
[node name="Viruling7" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(827, 6)
[node name="Viruling6" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(923, -27)
[node name="Viruling5" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(727, -3)
[node name="Viruling4" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(431, -41)
[node name="Viruling3" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(334, -4)
[node name="Viruling2" parent="Level1Spawner" instance=ExtResource("5_w7lww")]
position = Vector2(627, -33)

View file

@ -1,23 +1,32 @@
[gd_scene load_steps=9 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="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://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://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" uid="uid://bxbpvgteyfh02" path="res://components/Viruling.tscn" id="5_w7lww"]
[ext_resource type="PackedScene" uid="uid://clptnshbcs6cn" path="res://components/Bars.tscn" id="6_u2jd3"] [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"]
[sub_resource type="QuadMesh" id="QuadMesh_seics"] [ext_resource type="Script" path="res://scripts/level_1_spawner.gd" id="8_rl47p"]
size = Vector2(480, 64) [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"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_h5wua"]
size = Vector2(492, 101) size = Vector2(492, 101)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wlwhn"]
size = Vector2(46, 359)
[node name="World" type="Node2D"] [node name="World" type="Node2D"]
position = Vector2(344, 240) position = Vector2(344, 240)
script = ExtResource("1_m1n7w") script = ExtResource("1_m1n7w")
next_stage = "res://levels/level1/stage2.tscn" 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")] [node name="Bars" parent="." instance=ExtResource("6_u2jd3")]
offset_left = -344.0 offset_left = -344.0
offset_top = -240.0 offset_top = -240.0
@ -25,40 +34,41 @@ offset_right = -304.0
offset_bottom = -200.0 offset_bottom = -200.0
[node name="Background" type="Sprite2D" parent="."] [node name="Background" type="Sprite2D" parent="."]
position = Vector2(-28, -64) position = Vector2(-27, -60)
scale = Vector2(1.01667, 1) scale = Vector2(1.01667, 1)
texture = ExtResource("2_48003") texture = ExtResource("2_48003")
[node name="Player" parent="." instance=ExtResource("2_sxo5w")]
position = Vector2(-233, -21)
[node name="Borders" parent="." instance=ExtResource("3_04xvl")] [node name="Borders" parent="." instance=ExtResource("3_04xvl")]
position = Vector2(-272, -240) position = Vector2(-272, -240)
[node name="Player" parent="." instance=ExtResource("2_sxo5w")]
position = Vector2(-240, -16)
[node name="Viruling" parent="." instance=ExtResource("5_w7lww")]
position = Vector2(440, -96)
[node name="Viruling2" parent="." instance=ExtResource("5_w7lww")]
position = Vector2(240, -48)
[node name="Viruling2" parent="Viruling2" instance=ExtResource("5_w7lww")]
position = Vector2(72, 40)
[node name="Viruling3" parent="." instance=ExtResource("5_w7lww")]
position = Vector2(424, -32)
[node name="Viruling4" parent="." instance=ExtResource("5_w7lww")]
position = Vector2(320, -104)
[node name="Viruling2" parent="Viruling4" instance=ExtResource("5_w7lww")]
position = Vector2(240, -48)
[node name="Floor" type="StaticBody2D" parent="."] [node name="Floor" type="StaticBody2D" parent="."]
[node name="MeshInstance2D" type="MeshInstance2D" parent="Floor"] [node name="Sprite2D" type="Sprite2D" parent="Floor"]
position = Vector2(-28, 68) z_index = 1
scale = Vector2(1.01667, 1.625) texture_filter = 1
mesh = SubResource("QuadMesh_seics") 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"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"]
position = Vector2(-28, 69) position = Vector2(-28, 69)
@ -66,11 +76,85 @@ shape = SubResource("RectangleShape2D_h5wua")
[node name="Ceiling" type="StaticBody2D" parent="."] [node name="Ceiling" type="StaticBody2D" parent="."]
[node name="MeshInstance2D" type="MeshInstance2D" parent="Ceiling"]
position = Vector2(-28, -192)
scale = Vector2(1.01667, 1.625)
mesh = SubResource("QuadMesh_seics")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ceiling"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Ceiling"]
position = Vector2(-30, -189.5) position = Vector2(-29, -190)
shape = SubResource("RectangleShape2D_h5wua") 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")
[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

View file

@ -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"] [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")

3
scripts/crawler.gd Normal file
View file

@ -0,0 +1,3 @@
class_name Crawler extends Entity
## Crawl towards the player but stay within striking distance and not super close

11
scripts/health_bar.gd Normal file
View file

@ -0,0 +1,11 @@
extends MeshInstance2D
@onready var border_sprite = $Border
# 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

15
scripts/killbox.gd Normal file
View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
extends Entity class_name Player extends Entity
@export var GRAVITY = 30 @export var GRAVITY = 30
@export var JUMP_FORCE = 500 @export var JUMP_FORCE = 500
@ -8,15 +8,20 @@ extends Entity
@onready var collider = $CollisionShape2D @onready var collider = $CollisionShape2D
@onready var punch_hitbox = $PunchHitbox @onready var punch_hitbox = $PunchHitbox
@onready var death_timer = $DeathTimer @onready var death_timer = $DeathTimer
@onready var player_hurt_sfx = $PlayerHurtSfx
@onready var player_death_sfx = $PlayerDeathSfx
@onready var hurt_timer = $HurtTimer
@onready var health_bar = $HealthBar
var jumping = false var jumping = false
var facing_right = true var facing_right = true
var right_punch = false var right_punch = false
var hurting = false var hurting = false
var is_dying = false var is_dying = false
var is_death_sfx = false
const ATTACK_DAMAGE = 25 const ATTACK_DAMAGE = 25
const INITIAL_HEALTH = 100 const INITIAL_HEALTH = 50
const SPEED_MULTIPLIER = 300 const SPEED_MULTIPLIER = 300
const ATTACK_KNOCKBACK = 5000 const ATTACK_KNOCKBACK = 5000
@ -44,6 +49,11 @@ func _physics_process(delta):
if velocity.y > 1000: if velocity.y > 1000:
velocity.y = 1000 velocity.y = 1000
if is_dying and !player_death_sfx.playing:
player_death_sfx.play()
elif hurting and !player_hurt_sfx.playing and death_timer.is_stopped():
player_hurt_sfx.play()
# perform horizontal movement # perform horizontal movement
var horizontal_direction = Input.get_axis("move_left", "move_right") var horizontal_direction = Input.get_axis("move_left", "move_right")
velocity.x = speed * horizontal_direction velocity.x = speed * horizontal_direction
@ -60,17 +70,8 @@ func _physics_process(delta):
if horizontal_direction != 0: if horizontal_direction != 0:
facing_right = horizontal_direction > 0 facing_right = horizontal_direction > 0
# figure out which animation should be played
# respecting the jump animation above all
if !jumping and !hurting and attack_timer.is_stopped():
if is_on_floor() && horizontal_direction != 0:
animated_sprite.play("walk")
else:
animated_sprite.play("idle")
super._physics_process(delta) super._physics_process(delta)
punch_hitbox.visible = true if !attack_timer.is_stopped() else false punch_hitbox.visible = true if !attack_timer.is_stopped() else false
func punch_connect(node: Node): func punch_connect(node: Node):
@ -82,12 +83,7 @@ func punch_connect(node: Node):
func hurt_anim(): func hurt_anim():
hurting = true hurting = true
animated_sprite.play("hurt") hurt_timer.start()
animated_sprite.animation_finished.connect(disable_hurt)
func disable_hurt():
hurting = false
animated_sprite.animation_finished.disconnect(disable_hurt)
func _process(delta: float) -> void: func _process(delta: float) -> void:
if health <= 0: if health <= 0:
@ -96,18 +92,45 @@ func _process(delta: float) -> void:
health = 99999 health = 99999
if is_dying: if is_dying:
animated_sprite.play("death") animated_sprite.play("death")
punch_hitbox.visible = false punch_hitbox.visible = false
speed = 0 speed = 0
# Reset to start on death
if death_timer.is_stopped(): 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"): if attack_timer.is_stopped() and Input.is_action_just_pressed("attack"):
attack_timer.start() attack_timer.start()
if is_on_floor(): if is_on_floor():
animated_sprite.play("right" if right_punch else "left") animated_sprite.play("Right" if right_punch else "Left")
right_punch = !right_punch right_punch = !right_punch
else: else:
animated_sprite.play("slam") animated_sprite.play("slam")
elif attack_timer.is_stopped() and !hurting and !is_dying and !jumping:
var horizontal_direction = Input.get_axis("move_left", "move_right")
if is_on_floor() && horizontal_direction != 0:
animated_sprite.play("walk")
else:
animated_sprite.play("idle")
if !hurt_timer.is_stopped():
animated_sprite.play("hurt")
else:
hurting = false
var health_percentage = health * 100 / INITIAL_HEALTH
if is_dying:
health_bar.play("0")
elif health_percentage > 80:
health_bar.play("100")
elif health_percentage > 60:
health_bar.play("80")
elif health_percentage > 40:
health_bar.play("40")
elif health_percentage > 20:
health_bar.play("20")

View file

@ -1,18 +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;
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)
func _on_trigger(body: Node) -> void:
get_tree().change_scene_to_file(next_stage)

View file

@ -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

44
scripts/stage_2.gd Normal file
View file

@ -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

View file

@ -1,4 +1,4 @@
extends Entity; class_name Viruling extends Entity;
@onready var animated_sprite = $AnimatedSprite2D @onready var animated_sprite = $AnimatedSprite2D
@onready var collider = $CollisionShape2D @onready var collider = $CollisionShape2D
@ -6,19 +6,21 @@ extends Entity;
@onready var collision_shape = collider.shape @onready var collision_shape = collider.shape
@onready var attack_timer = $AttackTimer @onready var attack_timer = $AttackTimer
@onready var death_timer = $DeathTimer @onready var death_timer = $DeathTimer
@onready var explosion_sfx = $ExplosionSFX
var is_dying = false var is_dying = false
var attack_speed = 0
const SPEED_MULTIPLIER = 100 var speed_multiplier = 100
const INITIAL_HEALTH = 10 const INITIAL_HEALTH = 10
const ATTACK_DAMAGE = 10 const ATTACK_DAMAGE = 10
const ATTACK_KNOCKBACK = 5000 const ATTACK_KNOCKBACK = 5000
func _init() -> void: 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. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
velocity.x = -speed velocity.x = attack_speed
contact_hitbox.body_entered.connect(body_connect) contact_hitbox.body_entered.connect(body_connect)
contact_hitbox.visible = false contact_hitbox.visible = false
animated_sprite.play("spin") animated_sprite.play("spin")
@ -28,7 +30,8 @@ func _physics_process(delta: float) -> void:
if !is_dying: if !is_dying:
contact_hitbox.visible = false if contact_hitbox.visible else true contact_hitbox.visible = false if contact_hitbox.visible else true
super._physics_process(delta) super._physics_process(delta)
velocity.x = -speed velocity.x = attack_speed
velocity.y = 0 # jank
move_and_slide() move_and_slide()
func _process(delta: float) -> void: func _process(delta: float) -> void:
@ -38,9 +41,11 @@ func _process(delta: float) -> void:
health = 99999 health = 99999
if is_dying: if is_dying:
animated_sprite.play("death") animated_sprite.play("death")
explosion_sfx.play()
contact_hitbox.visible = false contact_hitbox.visible = false
speed = 0 speed_multiplier = 0
if death_timer.is_stopped(): if death_timer.is_stopped():
queue_free() queue_free()
@ -52,3 +57,6 @@ func body_connect(node: Node):
node.take_knockback(ATTACK_KNOCKBACK) node.take_knockback(ATTACK_KNOCKBACK)
if node.has_method("hurt_anim"): if node.has_method("hurt_anim"):
node.call("hurt_anim") node.call("hurt_anim")
func charge() -> void:
attack_speed = -speed_multiplier