From bee8cf77f1ae4355b6916a62051bd46ba618a9b2 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 4 Mar 2026 12:17:43 +0000 Subject: [PATCH] Added starter bullet hell rotation for horse boss. --- export_presets.cfg | 49 ++++++++++++++++++++++++++++++++++++++ project.godot | 4 ---- scenes/boss.gd | 7 +++++- scenes/boss.tscn | 4 ++++ scenes/boss_horse.gd | 31 +++++++++++++++++------- scenes/enemy_bullet.tscn | 10 ++++---- scenes/explosion.tscn | 12 ++++------ scenes/progress_bar.tscn | 4 ++-- scenes/score_counter.tscn | 20 ++++++++-------- scenes/wave.gd | 4 ++-- sprites/explode.res | Bin 634 -> 1595 bytes 11 files changed, 106 insertions(+), 39 deletions(-) create mode 100644 export_presets.cfg diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..241e35f --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,49 @@ +[preset.0] + +name="Web" +platform="Web" +runnable=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../../Downloads/2026-03-04 115917 -The Third Place/index.html" +patches=PackedStringArray() +patch_delta_encoding=false +patch_delta_compression_level_zstd=19 +patch_delta_min_reduction=0.1 +patch_delta_include_filters="*" +patch_delta_exclude_filters="" +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +variant/extensions_support=false +variant/thread_support=false +vram_texture_compression/for_desktop=true +vram_texture_compression/for_mobile=false +html/export_icon=true +html/custom_html_shell="" +html/head_include="" +html/canvas_resize_policy=2 +html/focus_canvas_on_start=true +html/experimental_virtual_keyboard=false +progressive_web_app/enabled=false +progressive_web_app/ensure_cross_origin_isolation_headers=true +progressive_web_app/offline_page="" +progressive_web_app/display=3 +progressive_web_app/orientation=2 +progressive_web_app/icon_144x144="" +progressive_web_app/icon_180x180="" +progressive_web_app/icon_512x512="" +progressive_web_app/background_color=Color(0, 0, 0, 1) +threads/emscripten_pool_size=8 +threads/godot_pool_size=4 diff --git a/project.godot b/project.godot index fb5d8d7..8ff76a4 100644 --- a/project.godot +++ b/project.godot @@ -8,10 +8,6 @@ config_version=5 -[animation] - -compatibility/default_parent_skeleton_in_mesh_instance_3d=true - [application] config/name="the third place" diff --git a/scenes/boss.gd b/scenes/boss.gd index 93c86f6..b60cd43 100644 --- a/scenes/boss.gd +++ b/scenes/boss.gd @@ -24,6 +24,7 @@ func _ready(): func boss_intro(): + print("Boss intro!") await get_tree().create_timer(2).timeout boss.play("align") await get_tree().create_timer(2).timeout @@ -34,28 +35,32 @@ func boss_intro(): boss_horse() func boss_horse(): + $Horse.horse_phase = true + print("Boss horse!") await get_tree().create_timer(2).timeout EventBus.flash_screen.emit(.25) $Sprite2D.frame = 7 $Horse.show() + $Horse.start() var horse_player = $Horse/AnimationPlayer horse_player.play("run") await get_tree().create_timer(10).timeout EventBus.flash_screen.emit(.25) $Horse.hide() + $Horse.end() horse_counter += 1 await get_tree().create_timer(5).timeout lady_of_whispers() func lady_of_whispers(): + print("Lady of Whispers!") boss.play("rise") await get_tree().create_timer(4).timeout boss.play("whisper") await get_tree().create_timer(1).timeout boss_horse() - func hit_detection(): return diff --git a/scenes/boss.tscn b/scenes/boss.tscn index d16d161..fc02f43 100644 --- a/scenes/boss.tscn +++ b/scenes/boss.tscn @@ -203,9 +203,13 @@ texture = ExtResource("5_wqpjq") [node name="Rotater" type="Node2D" parent="Horse" unique_id=697300019] [node name="Sprite2D" type="Sprite2D" parent="Horse/Rotater" unique_id=1703348402] +visible = false self_modulate = Color(1, 0, 0, 1) scale = Vector2(0.453125, 0.453125) texture = ExtResource("5_wqpjq") [node name="ShootTimer" type="Timer" parent="Horse" unique_id=914903842] wait_time = 0.05 +one_shot = true + +[connection signal="timeout" from="Horse/ShootTimer" to="Horse" method="_on_shoot_timer_timeout"] diff --git a/scenes/boss_horse.gd b/scenes/boss_horse.gd index 8976504..6ad5b8c 100644 --- a/scenes/boss_horse.gd +++ b/scenes/boss_horse.gd @@ -10,18 +10,21 @@ var tween_speed: float = 1.4 var exploding = false var rotate_speed: int = 100 -var shooter_timer_wait_time: float = 0.2 +var shoot_timer_wait_time: float = 0.2 var spawn_point_count: int = 4 var spawn_radius = 100 +var horse_phase: bool = false + @onready var boss = $AnimationPlayer @onready var shoot_timer = $ShootTimer @onready var rotater = $Rotater @onready var screensize = get_viewport_rect().size -func _ready(): - spawn_bullet() +#func _ready(): + + #var step = 2 * PI / spawn_point_count @@ -36,23 +39,35 @@ func _ready(): #shoot_timer.start() #func _process(delta: float) -> void: - #var new_rotation = rotater.rotation_degrees + rotate_speed * delta - #rotater.rotation_degrees - fmod(new_rotation, 360 + #var new_rotation = rotater.ro tation_degrees + rotate_speed * delta + #rotater.rotation_degrees - fmod(new_rotation, 360) + +func start(): + shoot_timer.start() + print("Shoot timer started!") + +func end(): + shoot_timer.stop() func _process(delta): rotater.rotation_degrees += 2 # Adjust rotation speed func spawn_bullet(): + print("I'm spawning bullets!") var bullet = bullet_scene.instantiate() + get_tree().root.add_child(bullet) bullet.position = rotater.global_position - get_parent().add_child(bullet) + bullet.rotation = rotater.global_rotation + shoot_timer.wait_time = shoot_timer_wait_time + shoot_timer.start() - -func _on_ShootTimer_timeout() -> void: + +func _on_shoot_timer_timeout() -> void: + print("Shoot timer timeout!") spawn_bullet() #for s in rotater.get_children(): #var b = bullet_scene.instantiate() diff --git a/scenes/enemy_bullet.tscn b/scenes/enemy_bullet.tscn index 32d33aa..4d2dbbb 100644 --- a/scenes/enemy_bullet.tscn +++ b/scenes/enemy_bullet.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=4 format=3 uid="uid://3xbr5bnuk04u"] +[gd_scene format=3 uid="uid://3xbr5bnuk04u"] [ext_resource type="Texture2D" uid="uid://dubjbfdp6ep34" path="res://_graphics/Mini Pixel Pack 3/Projectiles/Enemy_projectile (16 x 16).png" id="1_1xapl"] [ext_resource type="Script" uid="uid://dusi2flaqer4b" path="res://scenes/enemy_bullet.gd" id="1_gl7bs"] @@ -6,17 +6,17 @@ [sub_resource type="RectangleShape2D" id="RectangleShape2D_gl7bs"] size = Vector2(6, 6) -[node name="EnemyBullet" type="Area2D" groups=["enemy_bullets"]] +[node name="EnemyBullet" type="Area2D" unique_id=1665087618 groups=["enemy_bullets"]] script = ExtResource("1_gl7bs") -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1140314631] texture = ExtResource("1_1xapl") hframes = 4 -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1998302798] shape = SubResource("RectangleShape2D_gl7bs") -[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] +[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="." unique_id=851849576] [connection signal="area_entered" from="." to="." method="_on_area_entered"] [connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"] diff --git a/scenes/explosion.tscn b/scenes/explosion.tscn index 94df773..82dc7a5 100644 --- a/scenes/explosion.tscn +++ b/scenes/explosion.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://4jvu41vu2557"] +[gd_scene format=3 uid="uid://4jvu41vu2557"] [ext_resource type="Texture2D" uid="uid://h04wm5a27u0" path="res://_graphics/Mini Pixel Pack 3/Effects/Explosion (16 x 16).png" id="1_q7epf"] @@ -40,12 +40,10 @@ _data = { &"explosion-one-shot": SubResource("Animation_vxas0") } -[node name="Explosion" type="Sprite2D"] +[node name="Explosion" type="Sprite2D" unique_id=1908879687] texture = ExtResource("1_q7epf") hframes = 6 -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_m5xho") -} -autoplay = "RESET" +[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=202074825] +libraries/ = SubResource("AnimationLibrary_m5xho") +autoplay = &"RESET" diff --git a/scenes/progress_bar.tscn b/scenes/progress_bar.tscn index e5377b9..36f6657 100644 --- a/scenes/progress_bar.tscn +++ b/scenes/progress_bar.tscn @@ -1,10 +1,10 @@ -[gd_scene load_steps=4 format=3 uid="uid://c8s7htpdg4v4i"] +[gd_scene format=3 uid="uid://c8s7htpdg4v4i"] [ext_resource type="Texture2D" uid="uid://d11molrkdjjh5" path="res://_graphics/bar_background.png" id="1_q0tf5"] [ext_resource type="Texture2D" uid="uid://bsl3pxvxiuoqg" path="res://_graphics/bar_foreground.png" id="2_5xu4y"] [ext_resource type="Script" uid="uid://b85ktxeoj4b2n" path="res://scenes/progress_bar.gd" id="3_5xu4y"] -[node name="ProgressBar" type="TextureProgressBar"] +[node name="ProgressBar" type="TextureProgressBar" unique_id=567200201] anchors_preset = 10 anchor_right = 1.0 offset_bottom = 20.0 diff --git a/scenes/score_counter.tscn b/scenes/score_counter.tscn index 554d290..3f890ac 100644 --- a/scenes/score_counter.tscn +++ b/scenes/score_counter.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=3 uid="uid://5qkcf1cpre32"] +[gd_scene format=3 uid="uid://5qkcf1cpre32"] [ext_resource type="Script" uid="uid://val4c82n4krk" path="res://scenes/score_counter.gd" id="1_t7i3n"] [ext_resource type="Texture2D" uid="uid://ddh7mk2ekhq3u" path="res://_graphics/Mini Pixel Pack 3/UI objects/Number_font (8 x 8).png" id="1_terno"] @@ -35,49 +35,49 @@ region = Rect2(32, 8, 8, 8) atlas = ExtResource("1_terno") region = Rect2(32, 8, 8, 8) -[node name="ScoreCounter" type="HBoxContainer"] +[node name="ScoreCounter" type="HBoxContainer" unique_id=1970265241] anchors_preset = 10 anchor_right = 1.0 grow_horizontal = 2 size_flags_horizontal = 8 script = ExtResource("1_t7i3n") -[node name="Digit0" type="TextureRect" parent="."] +[node name="Digit0" type="TextureRect" parent="." unique_id=264941948] layout_mode = 2 texture = SubResource("AtlasTexture_t7i3n") stretch_mode = 5 -[node name="Digit1" type="TextureRect" parent="."] +[node name="Digit1" type="TextureRect" parent="." unique_id=2027643592] layout_mode = 2 texture = SubResource("AtlasTexture_knege") stretch_mode = 5 -[node name="Digit2" type="TextureRect" parent="."] +[node name="Digit2" type="TextureRect" parent="." unique_id=1034152182] layout_mode = 2 texture = SubResource("AtlasTexture_qa8aw") stretch_mode = 5 -[node name="Digit3" type="TextureRect" parent="."] +[node name="Digit3" type="TextureRect" parent="." unique_id=1387400575] layout_mode = 2 texture = SubResource("AtlasTexture_pd82r") stretch_mode = 5 -[node name="Digit4" type="TextureRect" parent="."] +[node name="Digit4" type="TextureRect" parent="." unique_id=1715326887] layout_mode = 2 texture = SubResource("AtlasTexture_j44f5") stretch_mode = 5 -[node name="Digit5" type="TextureRect" parent="."] +[node name="Digit5" type="TextureRect" parent="." unique_id=755234748] layout_mode = 2 texture = SubResource("AtlasTexture_emiqc") stretch_mode = 5 -[node name="Digit6" type="TextureRect" parent="."] +[node name="Digit6" type="TextureRect" parent="." unique_id=1259223957] layout_mode = 2 texture = SubResource("AtlasTexture_inuy1") stretch_mode = 5 -[node name="Digit7" type="TextureRect" parent="."] +[node name="Digit7" type="TextureRect" parent="." unique_id=1114985963] layout_mode = 2 texture = SubResource("AtlasTexture_ke503") stretch_mode = 5 diff --git a/scenes/wave.gd b/scenes/wave.gd index c61b5ee..7ee9cb1 100644 --- a/scenes/wave.gd +++ b/scenes/wave.gd @@ -53,7 +53,7 @@ func spawn_enemies(): enemy_count = rows_mod * cols_mod await get_tree().process_frame - if wave_count == 0 : #This if for Mirror + if wave_count == 3 : #This if for Mirror print("Enemy Wave: ", wave_count) # Spawn Table @@ -89,7 +89,7 @@ func spawn_enemies(): s.start_all_animations() - if wave_count == 1 : #This is for Boss + if wave_count == 0 : #This is for Boss # Hide the player diff --git a/sprites/explode.res b/sprites/explode.res index e9ba4a70356b9b42280d5968cd5f40d09f33850a..8ac9399c99251328891a96a012cf09d88c82761e 100644 GIT binary patch literal 1595 zcmcIl$!^p@5N-B--*@ML1eY{6QiPB)5rjw_K#C?@I9ZL|Gt(L`t?o8VPUI&zgkRwo z!XI$s$bm0FqMpZgJTs2Og_cTPUF)lImE7Ozue0hLrTchAr|Eu?sZ=PAop3#}X`H2|BR^U08wzEabd^CFsTyOtIiI z+sG*G*db!^soza!hi2*}y=Y>da~=+j-1j%}bbyDFGl3>^rw zU3ru|7VP`po7FRw9?SMoB!y&Wi91Y$bB+i+D#Tn}FL}JCvI}%0H6)m_+7^Qe#K?l| zi0)KMNS7)JU6g-sl`!}CYeemizy@z5fc^$i-4T3?gF6Ci9OUil zz*N7pRzq%83>AVSDNb!NSJkabwO2hqv@I_ zDM0{308Ie@FC@lS?&E3p6y2L~+E=Z~TmN^QIn`><_J0B2%2f?X+lG~<{2%aN!aGjocW#6=bQEm_0D8Ac4X}3lQH( z3Q{42MV=^xQHbP(JR|j#NZfBVniAP!YQUbDcwKLcC$*ioL z$e3Iok?Z>KREzu1=FFuCMmb@ zGG7wLi}mARmt*CfgkW%Gdc;8<_l4c8i$b9D)FZP4$ea*Lq8rWy0QMDT21r!A$H*OkPS@k_jY+-Zr>jKG U%aloiLTQw@`Q{N6JW^9bLrwfGA^-pY