From 84ca23f486edbf65fe9d9fe23e63a3949dc5a51e Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 10:40:18 -0500 Subject: [PATCH 01/19] Added eart --- eart.gd | 2 +- eart.tscn | 1 - main.gd | 2 +- main.tscn | 6 +-- main_menu.tscn | 4 +- player-row.tscn | 1 - player-shield.gd | 4 ++ player-shield.tscn | 125 +++++++++++++++++++++++++++++++++++++++++++++ player.gd | 7 ++- project.godot | 30 +++++------ shield bullet.tscn | 2 +- shield.gd | 4 +- shield.tscn | 5 +- shield_bullet.gd | 18 ++++++- tar.tscn | 2 +- 15 files changed, 180 insertions(+), 33 deletions(-) create mode 100644 player-shield.gd create mode 100644 player-shield.tscn diff --git a/eart.gd b/eart.gd index ebffe73..7ebf226 100644 --- a/eart.gd +++ b/eart.gd @@ -16,7 +16,7 @@ func shoot(): $Turret.target = find_target() - $ShootTimer.start(1) + #$ShootTimer.start(1) func find_target(): diff --git a/eart.tscn b/eart.tscn index 9d700f2..6541a8f 100644 --- a/eart.tscn +++ b/eart.tscn @@ -140,7 +140,6 @@ radius = 44.1475 script = ExtResource("1_xkxbf") [node name="ShootTimer" type="Timer" parent="."] -one_shot = true autostart = true [node name="Turret" type="Node2D" parent="."] diff --git a/main.gd b/main.gd index 88d0c28..7baf6c7 100644 --- a/main.gd +++ b/main.gd @@ -5,7 +5,7 @@ var config = ConfigFile.new() func _init(): if OS.is_debug_build(): - Engine.set_time_scale(0.25) + Engine.set_time_scale(1) if config.load("user://settings.cfg") == OK: var player = load(config.get_value("gameplay", "class", "res://player-row.tscn")).instantiate() diff --git a/main.tscn b/main.tscn index 0300133..1e45ebb 100644 --- a/main.tscn +++ b/main.tscn @@ -12,12 +12,12 @@ [ext_resource type="Texture2D" uid="uid://yvrhlh04k8w1" path="res://background space.png" id="6_yg4g1"] [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] -[ext_resource type="Resource" uid="uid://dd8me0deake37" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] [ext_resource type="Resource" uid="uid://c805aej5v7cvr" path="res://eart.tres" id="10_jib8h"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] -[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] @@ -670,7 +670,7 @@ script = ExtResource("1_3dydx") script = ExtResource("1_ifu8g") waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) wave_label = NodePath("../UI/Wave Count") -start_wave = 8 +start_wave = 10 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/main_menu.tscn b/main_menu.tscn index 37e837c..c0e6a86 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -161,9 +161,9 @@ text = "Movement " layout_mode = 2 theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 54 -selected = 0 item_count = 2 popup/item_0/text = "Relative" +popup/item_0/id = 0 popup/item_1/text = "Absolute" popup/item_1/id = 1 @@ -179,9 +179,9 @@ text = "CLASS" layout_mode = 2 theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 54 -selected = 0 item_count = 3 popup/item_0/text = "Row" +popup/item_0/id = 0 popup/item_1/text = "Ite" popup/item_1/id = 1 popup/item_2/text = "Iamond" diff --git a/player-row.tscn b/player-row.tscn index 6faa3c8..ef435b8 100644 --- a/player-row.tscn +++ b/player-row.tscn @@ -207,5 +207,4 @@ stream = ExtResource("4_lwgj5") bus = &"SFX" [node name="ShieldMarker" type="Marker2D" parent="." index="5"] -position = Vector2(4, 0) scale = Vector2(1.5, 1.5) diff --git a/player-shield.gd b/player-shield.gd new file mode 100644 index 0000000..dd0c732 --- /dev/null +++ b/player-shield.gd @@ -0,0 +1,4 @@ +extends CollisionShape2D + +func destroy(): + $AnimatedSprite2D.play("die") diff --git a/player-shield.tscn b/player-shield.tscn new file mode 100644 index 0000000..6746af2 --- /dev/null +++ b/player-shield.tscn @@ -0,0 +1,125 @@ +[gd_scene load_steps=19 format=3 uid="uid://b11jmnjkk6ibm"] + +[ext_resource type="Script" path="res://player-shield.gd" id="1_wq4q6"] +[ext_resource type="Texture2D" uid="uid://cc3nl13t7c4mj" path="res://eart-shield.png" id="2_iu5tn"] +[ext_resource type="Texture2D" uid="uid://dysewmpj8nvgx" path="res://eart-shield-break.png" id="3_yw3j3"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_0lade"] +radius = 24.3425 + +[sub_resource type="AtlasTexture" id="AtlasTexture_mcb3o"] +atlas = ExtResource("2_iu5tn") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l8lnp"] +atlas = ExtResource("2_iu5tn") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_so4um"] +atlas = ExtResource("2_iu5tn") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sel7y"] +atlas = ExtResource("2_iu5tn") +region = Rect2(192, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_iumxh"] +atlas = ExtResource("2_iu5tn") +region = Rect2(256, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jb6hd"] +atlas = ExtResource("2_iu5tn") +region = Rect2(320, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5xoy6"] +atlas = ExtResource("2_iu5tn") +region = Rect2(384, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a5ids"] +atlas = ExtResource("3_yw3j3") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x2842"] +atlas = ExtResource("3_yw3j3") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ckp3b"] +atlas = ExtResource("3_yw3j3") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b6w7a"] +atlas = ExtResource("3_yw3j3") +region = Rect2(192, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_m7ilu"] +atlas = ExtResource("3_yw3j3") +region = Rect2(256, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w1mec"] +atlas = ExtResource("3_yw3j3") +region = Rect2(320, 0, 64, 64) + +[sub_resource type="SpriteFrames" id="SpriteFrames_gcmwu"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_mcb3o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l8lnp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_so4um") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sel7y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_iumxh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jb6hd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5xoy6") +}], +"loop": true, +"name": &"default", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_a5ids") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x2842") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ckp3b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b6w7a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m7ilu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w1mec") +}], +"loop": false, +"name": &"die", +"speed": 7.0 +}] + +[node name="Shield" type="CollisionShape2D" groups=["destructible"]] +scale = Vector2(3, 3) +shape = SubResource("CircleShape2D_0lade") +script = ExtResource("1_wq4q6") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_gcmwu") +autoplay = "default" +frame = 4 +frame_progress = 0.495833 + +[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="queue_free"] diff --git a/player.gd b/player.gd index edd0bbf..3785928 100644 --- a/player.gd +++ b/player.gd @@ -27,10 +27,10 @@ func _physics_process(delta): return var move_input = Input.get_axis("down", "up") var side_input = Input.get_axis("right", "left") - if move_input > 0 and not moving: + if move_input != 0 or side_input != 0: moving = true update_animation() - elif move_input <= 0 and moving: + else: moving = false update_animation() @@ -40,6 +40,9 @@ func _physics_process(delta): apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed * linear_damp) func destroy(): + if has_node("Shield"): + $Shield.destroy() + return $DeathFX.play() get_tree().paused = true $"../GameOver".visible = true diff --git a/project.godot b/project.godot index e13206e..b38e186 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Countdown" run/main_scene="res://main_menu.tscn" -config/features=PackedStringArray("4.3", "GL Compatibility") +config/features=PackedStringArray("4.2", "GL Compatibility") run/max_fps=60 config/icon="res://icon.svg" @@ -37,58 +37,58 @@ enemy="Enemies" up={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null) ] } down={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null) ] } left={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null) ] } right={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null) ] } restart={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"echo":false,"script":null) ] } jump={ "deadzone": 0.5, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(130, 40),"global_position":Vector2(138, 120),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) ] } quare={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"echo":false,"script":null) ] } exagon={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"echo":false,"script":null) ] } quit={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null) ] } shoot={ "deadzone": 0.5, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(91, 32),"global_position":Vector2(99, 112),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) ] } diff --git a/shield bullet.tscn b/shield bullet.tscn index d9542f2..4e82d6f 100644 --- a/shield bullet.tscn +++ b/shield bullet.tscn @@ -55,8 +55,8 @@ radius = 30.0 collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 -contact_monitor = true max_contacts_reported = 1 +contact_monitor = true linear_velocity = Vector2(2.08165e-12, 2.08165e-12) script = ExtResource("1_dsvm1") diff --git a/shield.gd b/shield.gd index c37ac2a..12a1ee6 100644 --- a/shield.gd +++ b/shield.gd @@ -1,4 +1,4 @@ -extends PhysicsBody2D +extends Node2D #! egregious code @@ -13,7 +13,7 @@ func _ready() -> void: if find_collisionshape(): print(find_collisionshape().get_parent().name) find_collisionshape().set_deferred("disabled", true) - #$Collider.set_deferred("disabled", false) + $Collider.set_deferred("disabled", false) func destroy(): if find_collisionshape(): diff --git a/shield.tscn b/shield.tscn index 1b8347c..9524d4d 100644 --- a/shield.tscn +++ b/shield.tscn @@ -111,8 +111,8 @@ animations = [{ [sub_resource type="CircleShape2D" id="CircleShape2D_00lvq"] radius = 25.1794 -[node name="Shield" type="AnimatableBody2D" groups=["destructible"]] -scale = Vector2(3, 3) +[node name="Shield" type="StaticBody2D" groups=["destructible"]] +scale = Vector2(3.5, 3.5) script = ExtResource("1_ni0ln") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] @@ -123,5 +123,6 @@ autoplay = "default" [node name="Collider" type="CollisionShape2D" parent="."] position = Vector2(-1, 0) shape = SubResource("CircleShape2D_00lvq") +disabled = true [connection signal="animation_finished" from="AnimatedSprite2D" to="." method="queue_free"] diff --git a/shield_bullet.gd b/shield_bullet.gd index b76dc5a..a315d78 100644 --- a/shield_bullet.gd +++ b/shield_bullet.gd @@ -3,6 +3,7 @@ extends RigidBody2D @onready var player = $"../Player" var shield_scene = preload("res://shield.tscn") +var player_shield = preload("res://player-shield.tscn") func _physics_process(delta): rotation = linear_velocity.angle() @@ -14,8 +15,23 @@ func hit(body): var shield = shield_scene.instantiate() + if body.has_node("Shield"): + queue_free() + return - if body.has_node("ShieldMarker"): + if body.name == "Player": + shield = player_shield.instantiate() + var marker = body.get_node("ShieldMarker") + + shield.position = marker.position + shield.scale = marker.scale + + body.add_child(shield) + + elif body.has_node("ShieldMarker"): + if body.get_node("ShieldMarker").has_node("Shield"): + queue_free() + return shield.scale = Vector2.ONE body.get_node("ShieldMarker").add_child(shield) else: diff --git a/tar.tscn b/tar.tscn index 4044f7a..d5593c0 100644 --- a/tar.tscn +++ b/tar.tscn @@ -467,8 +467,8 @@ animations = [{ position = Vector2(386, 292) gravity_scale = 1.66533e-16 freeze = true -contact_monitor = true max_contacts_reported = 5 +contact_monitor = true linear_damp = 2.0 script = ExtResource("1_7s3by") From c11bd8ef9bfb1c7243327a5da4355f6877d3548b Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 11:17:05 -0500 Subject: [PATCH 02/19] Update github action to build debug versions on pull requests --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e79812c..a4c1499 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: mkdir -v -p build/web EXPORT_DIR="$(readlink -f build)" cd $GITHUB_WORKSPACE - /usr/bin/godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html" + /usr/bin/godot --headless --verbose --export-${{ env.GITHUB_EVENT_NAME == "pull" && "release" || "debug" }} "Web" "$EXPORT_DIR/web/index.html" - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 From 7198be18a04b25f4449a2319b4e25257cfa145d6 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 11:35:06 -0500 Subject: [PATCH 03/19] revert update From 427ed6b4a7fe3d9a569f920809ead215431f2c7a Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 11:35:16 -0500 Subject: [PATCH 04/19] revert update --- Entagon.gd | 2 +- Shield.gd | 18 ------------------ bullet.tscn | 2 +- entagon.tscn | 4 ++-- main.tscn | 5 +++-- main_menu.tscn | 2 +- player-ite.gd | 2 +- riangle.tscn | 6 ++++-- 8 files changed, 13 insertions(+), 28 deletions(-) delete mode 100644 Shield.gd diff --git a/Entagon.gd b/Entagon.gd index b4e729a..c916b00 100644 --- a/Entagon.gd +++ b/Entagon.gd @@ -21,4 +21,4 @@ func spawn_explosion(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _physics_process(delta): - apply_central_force((global_position - (player.global_position + player.linear_velocity * 3)).normalized() * -1200) + apply_central_force((global_position - player.global_position).normalized() * -1400) diff --git a/Shield.gd b/Shield.gd deleted file mode 100644 index 3ad1fe5..0000000 --- a/Shield.gd +++ /dev/null @@ -1,18 +0,0 @@ -extends StaticBody2D - -@export var health = 10 -var max_health = 10.0 - -func destroy(): - health -= 1 - - if health == 1: - $PowerDownFX.play() - - if health <= 0: - if not is_queued_for_deletion(): - $"..".queue_free() - $"../../Player".aquire_exagon() - - modulate = Color(Color.CYAN, 0.7 - lerp(0.7, 0.1, health / max_health)) - diff --git a/bullet.tscn b/bullet.tscn index 45568ea..2398538 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -55,8 +55,8 @@ radius = 30.0 collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 -max_contacts_reported = 1 contact_monitor = true +max_contacts_reported = 1 linear_velocity = Vector2(2.08165e-12, 2.08165e-12) script = ExtResource("1_3q13i") diff --git a/entagon.tscn b/entagon.tscn index 8106dd9..8690ab3 100644 --- a/entagon.tscn +++ b/entagon.tscn @@ -65,9 +65,9 @@ radius = 30.0 collision_mask = 0 physics_material_override = SubResource("PhysicsMaterial_odemo") gravity_scale = 1.66533e-16 -max_contacts_reported = 2 contact_monitor = true -linear_damp = 3.0 +max_contacts_reported = 2 +linear_damp = 2.0 angular_velocity = 0.174533 script = ExtResource("1_726g8") diff --git a/main.tscn b/main.tscn index 01639cd..d39d166 100644 --- a/main.tscn +++ b/main.tscn @@ -12,11 +12,11 @@ [ext_resource type="Texture2D" uid="uid://yvrhlh04k8w1" path="res://background space.png" id="6_yg4g1"] [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] -[ext_resource type="Resource" uid="uid://dd8me0deake37" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] -[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] @@ -669,6 +669,7 @@ script = ExtResource("1_3dydx") script = ExtResource("1_ifu8g") waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) wave_label = NodePath("../UI/Wave Count") +start_wave = 3 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/main_menu.tscn b/main_menu.tscn index 37e837c..578b891 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -325,8 +325,8 @@ bus = &"Music" [connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"] diff --git a/player-ite.gd b/player-ite.gd index 75aa6a5..3ff3d2a 100644 --- a/player-ite.gd +++ b/player-ite.gd @@ -46,7 +46,7 @@ func fire_laser(): tween.set_parallel(false) tween.tween_callback(set_laser_texture.bind(active_texture)) tween.tween_property(self, "can_damage", true, 0) - tween.tween_interval(0.5) + tween.tween_interval(0.25) tween.tween_property(self, "can_damage", false, 0) tween.tween_callback(set_laser_texture.bind(aiming_texture)) tween.set_parallel(true) diff --git a/riangle.tscn b/riangle.tscn index 057f708..9c24a59 100644 --- a/riangle.tscn +++ b/riangle.tscn @@ -66,7 +66,7 @@ animations = [{ }], "loop": true, "name": &"default", -"speed": 10.0 +"speed": 5.0 }] [node name="Riangle" type="StaticBody2D" groups=["destructible", "enemy"]] @@ -80,6 +80,8 @@ rotation = 1.5708 scale = Vector2(5.50033, 5.50033) sprite_frames = SubResource("SpriteFrames_p5dvv") autoplay = "default" +frame = 6 +frame_progress = 0.850246 [node name="Gun2" type="Marker2D" parent="."] position = Vector2(-224, 284) @@ -99,7 +101,7 @@ script = ExtResource("3_kffl0") bullet = ExtResource("4_tfncc") [node name="Timer" type="Timer" parent="."] -wait_time = 3.0 +wait_time = 1.5 autostart = true [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] From 221dad8551b6812f3850ed649a5fe84d8773c39d Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 11:38:37 -0500 Subject: [PATCH 05/19] revert workflow changes for now --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4c1499..e79812c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: mkdir -v -p build/web EXPORT_DIR="$(readlink -f build)" cd $GITHUB_WORKSPACE - /usr/bin/godot --headless --verbose --export-${{ env.GITHUB_EVENT_NAME == "pull" && "release" || "debug" }} "Web" "$EXPORT_DIR/web/index.html" + /usr/bin/godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html" - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 From 6f97c10178874fe6ffda3d8dd9c9c44f9b13f5f4 Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 12:03:33 -0500 Subject: [PATCH 06/19] fix builds again --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e79812c..2ca31c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: mkdir -v -p build/web EXPORT_DIR="$(readlink -f build)" cd $GITHUB_WORKSPACE - /usr/bin/godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html" + /usr/bin/godot --headless --verbose --export-${{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }} "Web" "$EXPORT_DIR/web/index.html" - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 From a1a01711ecb1f9e474a039c19f1134fd33192f41 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 13:13:17 -0500 Subject: [PATCH 07/19] minor changes --- shield.gd | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 shield.gd diff --git a/shield.gd b/shield.gd deleted file mode 100644 index 12a1ee6..0000000 --- a/shield.gd +++ /dev/null @@ -1,21 +0,0 @@ -extends Node2D - -#! egregious code - -func find_collisionshape(): - if get_parent().name == "ShieldMarker": - return get_parent().get_parent().get_node("CollisionShape2D") - elif get_parent().has_node("CollisionShape2D"): - return get_parent().get_node("CollisionShape2D") - return null - -func _ready() -> void: - if find_collisionshape(): - print(find_collisionshape().get_parent().name) - find_collisionshape().set_deferred("disabled", true) - $Collider.set_deferred("disabled", false) - -func destroy(): - if find_collisionshape(): - find_collisionshape().set_deferred("disabled", false) - $AnimatedSprite2D.play("die") From f0c26f6c10aa93fb796bf7287fcbdf9a27e1406c Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 13:13:44 -0500 Subject: [PATCH 08/19] change stuff --- bullet.tscn | 2 +- entagon.tscn | 2 +- main.tscn | 5 ++--- main_menu.tscn | 4 +--- tar.tscn | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/bullet.tscn b/bullet.tscn index 45568ea..2398538 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -55,8 +55,8 @@ radius = 30.0 collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 -max_contacts_reported = 1 contact_monitor = true +max_contacts_reported = 1 linear_velocity = Vector2(2.08165e-12, 2.08165e-12) script = ExtResource("1_3q13i") diff --git a/entagon.tscn b/entagon.tscn index 8106dd9..4d15de3 100644 --- a/entagon.tscn +++ b/entagon.tscn @@ -65,8 +65,8 @@ radius = 30.0 collision_mask = 0 physics_material_override = SubResource("PhysicsMaterial_odemo") gravity_scale = 1.66533e-16 -max_contacts_reported = 2 contact_monitor = true +max_contacts_reported = 2 linear_damp = 3.0 angular_velocity = 0.174533 script = ExtResource("1_726g8") diff --git a/main.tscn b/main.tscn index 1e45ebb..f39d532 100644 --- a/main.tscn +++ b/main.tscn @@ -13,7 +13,7 @@ [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] [ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] -[ext_resource type="Resource" uid="uid://c805aej5v7cvr" path="res://eart.tres" id="10_jib8h"] +[ext_resource type="Resource" path="res://eart.tres" id="10_jib8h"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] @@ -129,7 +129,7 @@ wait_for_killed = true [sub_resource type="Resource" id="Resource_2j32b"] script = ExtResource("4_um0x7") -enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf"), ExtResource("9_q67ak")]) +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("9_q67ak")]) quantities = Array[int]([2, 2]) spawning_duration = 10.0 wait = 3.0 @@ -670,7 +670,6 @@ script = ExtResource("1_3dydx") script = ExtResource("1_ifu8g") waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) wave_label = NodePath("../UI/Wave Count") -start_wave = 10 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/main_menu.tscn b/main_menu.tscn index c0e6a86..7e447e5 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -163,7 +163,6 @@ theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 54 item_count = 2 popup/item_0/text = "Relative" -popup/item_0/id = 0 popup/item_1/text = "Absolute" popup/item_1/id = 1 @@ -181,7 +180,6 @@ theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 54 item_count = 3 popup/item_0/text = "Row" -popup/item_0/id = 0 popup/item_1/text = "Ite" popup/item_1/id = 1 popup/item_2/text = "Iamond" @@ -325,8 +323,8 @@ bus = &"Music" [connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"] diff --git a/tar.tscn b/tar.tscn index d5593c0..4044f7a 100644 --- a/tar.tscn +++ b/tar.tscn @@ -467,8 +467,8 @@ animations = [{ position = Vector2(386, 292) gravity_scale = 1.66533e-16 freeze = true -max_contacts_reported = 5 contact_monitor = true +max_contacts_reported = 5 linear_damp = 2.0 script = ExtResource("1_7s3by") From abc4b2d9df957aeb941d648ca7cfcaac4eaff507 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 13:21:23 -0500 Subject: [PATCH 09/19] fix wave spawning issues From 8a43f067808fd7db884ca5bc5ff906fc75e5e0d0 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 13:21:34 -0500 Subject: [PATCH 10/19] actually fix it --- main.tscn | 3 +-- project.godot | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/main.tscn b/main.tscn index f810f52..42edd15 100644 --- a/main.tscn +++ b/main.tscn @@ -13,7 +13,7 @@ [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] [ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] -[ext_resource type="Resource" path="res://eart.tres" id="10_jib8h"] +[ext_resource type="Resource" uid="uid://c805aej5v7cvr" path="res://eart.tres" id="10_jib8h"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] @@ -670,7 +670,6 @@ script = ExtResource("1_3dydx") script = ExtResource("1_ifu8g") waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) wave_label = NodePath("../UI/Wave Count") -start_wave = 3 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/project.godot b/project.godot index b38e186..e13206e 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Countdown" run/main_scene="res://main_menu.tscn" -config/features=PackedStringArray("4.2", "GL Compatibility") +config/features=PackedStringArray("4.3", "GL Compatibility") run/max_fps=60 config/icon="res://icon.svg" @@ -37,58 +37,58 @@ enemy="Enemies" up={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) ] } down={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) ] } left={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) ] } right={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) ] } restart={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) ] } jump={ "deadzone": 0.5, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(130, 40),"global_position":Vector2(138, 120),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) ] } quare={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) ] } exagon={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) ] } quit={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } shoot={ "deadzone": 0.5, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(91, 32),"global_position":Vector2(99, 112),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) ] } From 90256944ab63e9e67659b2b2da752b9fddff478c Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 14:44:04 -0500 Subject: [PATCH 11/19] add new waves From 42e68814539182e596a9cc1544ad082a33387f9b Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 6 Feb 2025 14:49:13 -0500 Subject: [PATCH 12/19] add new waves for real --- Entagon.gd | 2 +- Spawner.gd | 2 +- bullet.gd | 1 + bullet.tscn | 24 ++++++++++++++++-------- eart.tres | 2 +- entagon.tscn | 3 +++ entagon_enemy.tres | 2 +- eptagon.tscn | 3 +++ main.gd | 2 +- main.tscn | 33 +++++++++++++++++++++++++++++---- shield.gd | 21 +++++++++++++++++++++ shield.tscn | 4 ++-- 12 files changed, 80 insertions(+), 19 deletions(-) create mode 100644 shield.gd diff --git a/Entagon.gd b/Entagon.gd index c916b00..9ddafe9 100644 --- a/Entagon.gd +++ b/Entagon.gd @@ -8,7 +8,7 @@ func hit(body): body.destroy() else: body.queue_free() - spawn_explosion() + spawn_explosion() queue_free() if body.name == "Border": queue_free() diff --git a/Spawner.gd b/Spawner.gd index 59af8f7..560e264 100644 --- a/Spawner.gd +++ b/Spawner.gd @@ -56,7 +56,7 @@ func spawn(item: WaveEnemy): print("Spawning Boss!") spawn_loc = Vector2(1920/2, 1080/2) else: - for i in range(100): + for i in range(1000): var test_pos = Vector2(randf(), randf()) * Vector2(1920, 1080) if not $"../CollisionCheck".is_clear(test_pos, item.check_distance): continue diff --git a/bullet.gd b/bullet.gd index 6b54bf3..8f3a48f 100644 --- a/bullet.gd +++ b/bullet.gd @@ -21,6 +21,7 @@ func hit(body): queue_free() else: bounces += 1 + $Sprite2D.play("depleted") #print(bounces) if bounces >= 2: diff --git a/bullet.tscn b/bullet.tscn index 2398538..8af497f 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -20,11 +20,11 @@ region = Rect2(0, 0, 40, 40) atlas = ExtResource("2_unua3") region = Rect2(40, 0, 40, 40) -[sub_resource type="AtlasTexture" id="AtlasTexture_u3ov1"] +[sub_resource type="AtlasTexture" id="AtlasTexture_m7c0a"] atlas = ExtResource("2_unua3") region = Rect2(80, 0, 40, 40) -[sub_resource type="AtlasTexture" id="AtlasTexture_ia1sw"] +[sub_resource type="AtlasTexture" id="AtlasTexture_uq6kd"] atlas = ExtResource("2_unua3") region = Rect2(120, 0, 40, 40) @@ -36,16 +36,21 @@ animations = [{ }, { "duration": 1.0, "texture": SubResource("AtlasTexture_ldqff") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_u3ov1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ia1sw") }], "loop": true, "name": &"default", "speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_m7c0a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_uq6kd") +}], +"loop": true, +"name": &"depleted", +"speed": 5.0 }] [sub_resource type="CircleShape2D" id="CircleShape2D_13gk7"] @@ -70,7 +75,10 @@ position = Vector2(-0.0234375, -0.00781251) rotation = 1.5708 scale = Vector2(4, 4) sprite_frames = SubResource("SpriteFrames_pacu6") +animation = &"depleted" autoplay = "default" +frame = 1 +frame_progress = 0.323082 offset = Vector2(7.05637, 10.7826) [node name="TrajectoryDisplay" type="Line2D" parent="."] diff --git a/eart.tres b/eart.tres index 886e17f..ba101e4 100644 --- a/eart.tres +++ b/eart.tres @@ -9,4 +9,4 @@ script = ExtResource("1_0iu7m") enemy = ExtResource("1_hy2xe") boss = false portal_texture = ExtResource("2_nxpif") -check_distance = 100 +check_distance = 150 diff --git a/entagon.tscn b/entagon.tscn index 8690ab3..139d3ce 100644 --- a/entagon.tscn +++ b/entagon.tscn @@ -100,4 +100,7 @@ target_shield = true shape = SubResource("CircleShape2D_eo18f") target_position = Vector2(2.08165e-12, 500) +[node name="ShieldMarker" type="Marker2D" parent="."] +scale = Vector2(1.5, 1.5) + [connection signal="body_entered" from="." to="." method="hit"] diff --git a/entagon_enemy.tres b/entagon_enemy.tres index a1d3fbc..bae3c74 100644 --- a/entagon_enemy.tres +++ b/entagon_enemy.tres @@ -9,4 +9,4 @@ script = ExtResource("3_t4kaf") enemy = ExtResource("1_mfudl") boss = false portal_texture = ExtResource("2_2xm8e") -check_distance = 250 +check_distance = 200 diff --git a/eptagon.tscn b/eptagon.tscn index 233b17b..945adf6 100644 --- a/eptagon.tscn +++ b/eptagon.tscn @@ -64,4 +64,7 @@ bullet = ExtResource("4_cyd7j") [node name="Collider" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_03ifk") +[node name="ShieldMarker" type="Marker2D" parent="."] +scale = Vector2(2, 2) + [connection signal="animation_looped" from="Turret/AnimatedSprite2D" to="Turret/Gun" method="shoot"] diff --git a/main.gd b/main.gd index 7baf6c7..11e4902 100644 --- a/main.gd +++ b/main.gd @@ -5,7 +5,7 @@ var config = ConfigFile.new() func _init(): if OS.is_debug_build(): - Engine.set_time_scale(1) + Engine.set_time_scale(0.75) if config.load("user://settings.cfg") == OK: var player = load(config.get_value("gameplay", "class", "res://player-row.tscn")).instantiate() diff --git a/main.tscn b/main.tscn index 42edd15..74e1879 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=117 format=3 uid="uid://bmd4m7lqj4v0x"] +[gd_scene load_steps=120 format=3 uid="uid://bmd4m7lqj4v0x"] [ext_resource type="Script" path="res://main.gd" id="1_3dydx"] [ext_resource type="Script" path="res://Spawner.gd" id="1_ifu8g"] @@ -129,12 +129,36 @@ wait_for_killed = true [sub_resource type="Resource" id="Resource_2j32b"] script = ExtResource("4_um0x7") -enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("9_q67ak")]) -quantities = Array[int]([2, 2]) +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("9_q67ak"), ExtResource("10_jib8h")]) +quantities = Array[int]([2, 2, 1]) spawning_duration = 10.0 wait = 3.0 wait_for_killed = true +[sub_resource type="Resource" id="Resource_viqo8"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("9_q67ak"), ExtResource("10_jib8h")]) +quantities = Array[int]([15, 3, 4]) +spawning_duration = 30.0 +wait = 10.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_o3j5s"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf"), ExtResource("3_xmk5u"), ExtResource("10_jib8h")]) +quantities = Array[int]([5, 5, 3]) +spawning_duration = 20.0 +wait = 5.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_cygv1"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf"), ExtResource("10_jib8h"), ExtResource("3_xmk5u"), ExtResource("5_xdrk0"), ExtResource("9_q67ak")]) +quantities = Array[int]([5, 5, 10, 15, 5]) +spawning_duration = 30.0 +wait = 1.0 +wait_for_killed = true + [sub_resource type="RectangleShape2D" id="RectangleShape2D_7w8g6"] size = Vector2(328, 185.333) @@ -668,8 +692,9 @@ script = ExtResource("1_3dydx") [node name="Spawner" type="Node2D" parent="." node_paths=PackedStringArray("wave_label")] script = ExtResource("1_ifu8g") -waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) +waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b"), SubResource("Resource_viqo8"), SubResource("Resource_o3j5s"), SubResource("Resource_cygv1")]) wave_label = NodePath("../UI/Wave Count") +start_wave = 15 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/shield.gd b/shield.gd new file mode 100644 index 0000000..18aa90d --- /dev/null +++ b/shield.gd @@ -0,0 +1,21 @@ +extends PhysicsBody2D + +#! egregious code + +func find_collisionshape(): + if get_parent().name == "ShieldMarker": + return get_parent().get_parent().get_node("CollisionShape2D") + elif get_parent().has_node("CollisionShape2D"): + return get_parent().get_node("CollisionShape2D") + return null + +func _ready() -> void: + if find_collisionshape(): + print(find_collisionshape().get_parent().name) + find_collisionshape().set_deferred("disabled", true) + $Collider.set_deferred("disabled", false) + +func destroy(): + if find_collisionshape(): + find_collisionshape().set_deferred("disabled", false) + $AnimatedSprite2D.play("die") diff --git a/shield.tscn b/shield.tscn index 9524d4d..7edd12e 100644 --- a/shield.tscn +++ b/shield.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=19 format=3 uid="uid://c3s8as813frjc"] -[ext_resource type="Script" path="res://shield.gd" id="1_ni0ln"] +[ext_resource type="Script" path="res://shield.gd" id="1_v4v4e"] [ext_resource type="Texture2D" uid="uid://cc3nl13t7c4mj" path="res://eart-shield.png" id="2_2bt8h"] [ext_resource type="Texture2D" uid="uid://dysewmpj8nvgx" path="res://eart-shield-break.png" id="3_1tta6"] @@ -113,7 +113,7 @@ radius = 25.1794 [node name="Shield" type="StaticBody2D" groups=["destructible"]] scale = Vector2(3.5, 3.5) -script = ExtResource("1_ni0ln") +script = ExtResource("1_v4v4e") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] sprite_frames = SubResource("SpriteFrames_gcmwu") From 78beac9009b34b8541138dcf39a28f212595410e Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 18:05:06 -0500 Subject: [PATCH 13/19] try something else to build the game --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ca31c1..eb1ebf0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ on: env: GODOT_VERSION: "4.3" GODOT_BUILD: "stable" + BUILD_TYPE: "{{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }}" # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -57,7 +58,7 @@ jobs: mkdir -v -p build/web EXPORT_DIR="$(readlink -f build)" cd $GITHUB_WORKSPACE - /usr/bin/godot --headless --verbose --export-${{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }} "Web" "$EXPORT_DIR/web/index.html" + /usr/bin/godot --headless --verbose --export-$BUILD_TYPE "Web" "$EXPORT_DIR/web/index.html" - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 From d77daedf56c17dbe631a52f1c2ba79a8ac7ba621 Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 18:05:31 -0500 Subject: [PATCH 14/19] fix it --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb1ebf0..b26cd6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,8 @@ on: env: GODOT_VERSION: "4.3" GODOT_BUILD: "stable" - BUILD_TYPE: "{{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }}" + BUILD_TYPE: > + {{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: From 3d6a18c21ee9089b5c110c1339df8a26e96af779 Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 18:31:18 -0500 Subject: [PATCH 15/19] Add automatic deployments --- .github/workflows/build.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b26cd6b..4af64f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: CI # Controls when the action will run. @@ -16,8 +14,6 @@ on: env: GODOT_VERSION: "4.3" GODOT_BUILD: "stable" - BUILD_TYPE: > - {{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -30,6 +26,14 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Build Release + if: env.GITHUB_EVENT_NAME == "push" + run: echo "BUILD_TYPE=release" >> $GITHUB_ENV + + - name: Build Debug/Beta + if: env.GITHUB_EVENT_NAME == "pull_request" + run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 name: Checkout Files @@ -63,9 +67,14 @@ jobs: - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + id: upload-build with: name: Web Build path: build/web retention-days: 3 overwrite: true compression-level: 0 + + - name: "Trigger Deployment" + run: curl "http://webhookd:8080/deploy_game?ID=${{ steps.upload-build.outputs.artifact-id }}" + if: env.GITHUB_EVENT_NAME == "push" From 4f499c7ead14d3954bcfee42dce6cddde09df989 Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 18:36:16 -0500 Subject: [PATCH 16/19] update workflow to ffix it --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4af64f8..9d4ffa5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,11 +27,11 @@ jobs: steps: - name: Build Release - if: env.GITHUB_EVENT_NAME == "push" + if: env.GITHUB_EVENT_NAME == 'push' run: echo "BUILD_TYPE=release" >> $GITHUB_ENV - name: Build Debug/Beta - if: env.GITHUB_EVENT_NAME == "pull_request" + if: env.GITHUB_EVENT_NAME == 'pull_request' run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -63,7 +63,7 @@ jobs: mkdir -v -p build/web EXPORT_DIR="$(readlink -f build)" cd $GITHUB_WORKSPACE - /usr/bin/godot --headless --verbose --export-$BUILD_TYPE "Web" "$EXPORT_DIR/web/index.html" + /usr/bin/godot --headless --verbose --export-${{ env.BUILD_TYPE }} "Web" "$EXPORT_DIR/web/index.html" - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 From bad3e85cb0261ab85eb354394aac096d71e46ae0 Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 18:42:11 -0500 Subject: [PATCH 17/19] remove auto-deployments --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d4ffa5..c8038f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,3 @@ jobs: retention-days: 3 overwrite: true compression-level: 0 - - - name: "Trigger Deployment" - run: curl "http://webhookd:8080/deploy_game?ID=${{ steps.upload-build.outputs.artifact-id }}" - if: env.GITHUB_EVENT_NAME == "push" From 0916a187694e60e6702a395eeb11d476deb2fa3b Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 6 Feb 2025 18:47:23 -0500 Subject: [PATCH 18/19] fix wave start --- main.gd | 2 +- main.tscn | 5 ++--- main_menu.tscn | 2 +- shield bullet.tscn | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main.gd b/main.gd index 11e4902..7baf6c7 100644 --- a/main.gd +++ b/main.gd @@ -5,7 +5,7 @@ var config = ConfigFile.new() func _init(): if OS.is_debug_build(): - Engine.set_time_scale(0.75) + Engine.set_time_scale(1) if config.load("user://settings.cfg") == OK: var player = load(config.get_value("gameplay", "class", "res://player-row.tscn")).instantiate() diff --git a/main.tscn b/main.tscn index 74e1879..4d8377e 100644 --- a/main.tscn +++ b/main.tscn @@ -12,12 +12,12 @@ [ext_resource type="Texture2D" uid="uid://yvrhlh04k8w1" path="res://background space.png" id="6_yg4g1"] [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] -[ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://dd8me0deake37" path="res://eptagon_enemy.tres" id="9_q67ak"] [ext_resource type="Resource" uid="uid://c805aej5v7cvr" path="res://eart.tres" id="10_jib8h"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] -[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] @@ -694,7 +694,6 @@ script = ExtResource("1_3dydx") script = ExtResource("1_ifu8g") waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b"), SubResource("Resource_viqo8"), SubResource("Resource_o3j5s"), SubResource("Resource_cygv1")]) wave_label = NodePath("../UI/Wave Count") -start_wave = 15 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/main_menu.tscn b/main_menu.tscn index 7e447e5..721df7f 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -323,8 +323,8 @@ bus = &"Music" [connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"] diff --git a/shield bullet.tscn b/shield bullet.tscn index 4e82d6f..d9542f2 100644 --- a/shield bullet.tscn +++ b/shield bullet.tscn @@ -55,8 +55,8 @@ radius = 30.0 collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 -max_contacts_reported = 1 contact_monitor = true +max_contacts_reported = 1 linear_velocity = Vector2(2.08165e-12, 2.08165e-12) script = ExtResource("1_dsvm1") From 88c05bbd8cbf40066ff6351def0860509d0d3459 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Fri, 7 Feb 2025 13:37:10 -0500 Subject: [PATCH 19/19] new input system, add pausing --- .DS_Store | Bin 22532 -> 22532 bytes .../{tile_0366.png => prompt_p.png} | Bin ...le_0366.png.import => prompt_p.png.import} | 6 +- Spawner.gd | 2 + bullet.tscn | 2 +- eptagon base.png | Bin 0 -> 2646 bytes eptagon base.png.import | 34 ++++++++++ eptagon shoot.png | Bin 0 -> 12660 bytes eptagon shoot.png.import | 34 ++++++++++ eptagon.gd | 11 ++++ eptagon.tscn | 61 ++++++++++++------ main.gd | 3 + main.tscn | 36 ++++++++++- main_menu.tscn | 2 +- pause_game.gd | 11 ++++ player-iamond.gd | 2 +- player-ite.gd | 2 +- player-row.gd | 4 +- portal-ability.tscn | 10 +-- project.godot | 31 ++++----- quare_ability.tscn | 18 +----- 21 files changed, 194 insertions(+), 75 deletions(-) rename 1-Bit Input Prompts Pixel 16/Tiles (White)/{tile_0366.png => prompt_p.png} (100%) rename 1-Bit Input Prompts Pixel 16/Tiles (White)/{tile_0366.png.import => prompt_p.png.import} (69%) create mode 100644 eptagon base.png create mode 100644 eptagon base.png.import create mode 100644 eptagon shoot.png create mode 100644 eptagon shoot.png.import create mode 100644 pause_game.gd diff --git a/.DS_Store b/.DS_Store index 6866fca3e66cafba8ae2079ef2af2509cace7c58..293e2646503d6c3ac8e671871a78e419123a32ac 100644 GIT binary patch delta 153 zcmZqKz}T{Zae_bN>5T!5jEww~1sudDZ)OymT<##i$TrzQzG%HDgjx1=1S!sKQ4wv)>p_$J3Q8f@lwXk*{ZYazi-MLVQ6vj==)+1%*D G%?tnwaZPam diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png.import similarity index 69% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png.import index 15759ee..00479ef 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cpjtncjaomqwm" -path="res://.godot/imported/tile_0366.png-edb08678f52d381824bd466af55fc5c0.ctex" +path="res://.godot/imported/prompt_p.png-9bae51d7552c94969996b613509af9e3.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png" -dest_files=["res://.godot/imported/tile_0366.png-edb08678f52d381824bd466af55fc5c0.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png" +dest_files=["res://.godot/imported/prompt_p.png-9bae51d7552c94969996b613509af9e3.ctex"] [params] diff --git a/Spawner.gd b/Spawner.gd index 560e264..de62d4c 100644 --- a/Spawner.gd +++ b/Spawner.gd @@ -45,6 +45,8 @@ func spawn_loop(): func spawn_enemies(count: int, duration: float, enemy: WaveEnemy): var delay = duration / count for i in range(count): + if get_tree().paused: + await get_parent().unpaused spawn(enemy) await get_tree().create_timer(delay).timeout diff --git a/bullet.tscn b/bullet.tscn index 8af497f..94c210d 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -56,7 +56,7 @@ animations = [{ [sub_resource type="CircleShape2D" id="CircleShape2D_13gk7"] radius = 30.0 -[node name="Bullet" type="RigidBody2D" groups=["bullet"]] +[node name="Bullet" type="RigidBody2D" groups=["bullet", "destructible"]] collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 diff --git a/eptagon base.png b/eptagon base.png new file mode 100644 index 0000000000000000000000000000000000000000..52a42b4b7b3be08a48f414b0eee5ef262b754c58 GIT binary patch literal 2646 zcmb7``9BkmAIImusZW-|9I1@tw&t4q47rKYp=EL(IY&g~uH0A1&EyCr$5vt`*T`~& zVT>@uWH$5h`3Js_$M^ksz249F5AW9x@88}@)>bBb+``-d0D#ZT)X?^XF(-b)$$rwM z4+l6-z!YR_q7QgGEV>2&aP6BJ>e+`CZ5EAWh?)SgI+Xg(Y7gwXnVjH#1&E|%a+WC4 zz=qYs*PmnOh9T!mQ?TtDL$I`Ok>27!npgZAPAk}58T~x4WQg30yFPv)AtaN~fEseh z$i^U}DfE4($GnN~rg!Mb-g-o1Pvgfs6EPB;PyeT8jn#Z~4GyMhDbwtjzRoa#?cRmR zi3A-Vv_nrf!iVWrQ3{N3U?l%Y0=3(Rhcm26xj&wkJ}92ya30~&YI!f7n^MZX9&(SN zDvCBe&AE($&}$J}OPG4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4pRQ~$pZO2-@*td=)5{B*oe-a&r2v)MySOMvXj W%z5JfYRoS4KbRR=8NSuO`}AL8l^&b` literal 0 HcmV?d00001 diff --git a/eptagon base.png.import b/eptagon base.png.import new file mode 100644 index 0000000..aa6fc9e --- /dev/null +++ b/eptagon base.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ccbd4o2iasbun" +path="res://.godot/imported/eptagon base.png-f7cfa0569b442888d2d8722ed916ca54.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://eptagon base.png" +dest_files=["res://.godot/imported/eptagon base.png-f7cfa0569b442888d2d8722ed916ca54.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/eptagon shoot.png b/eptagon shoot.png new file mode 100644 index 0000000000000000000000000000000000000000..907509dab8e7847da3bedac8a25c320d9733caff GIT binary patch literal 12660 zcmdtJi9b|t_&y9;%(9J5L7yz^VK9RJ8$s z0)7dgX{q7o#xaH-_<(TMR#O3r`!B2jz(wG`s;Krk&zUG(IQw&f3xB!pcz&h0I2BEu zC1}wdi%$uk$NIb=z?X%n#$P#zFfJ_L^zOt{&Tn7_Vl zlqNKtvS7$J&iUj0PnA3yD)X0|g9{_3r$3u$l4GgTyvNl-j#ydIi#IMq9Ts#-IiRN% zDhJ8L2L(%P{ki6~$ZcgXpC`u50>qK`OhHMJL)K zTx9xw{LmV9{whY9@z-FH@dkkczQTRNv6T(-jIgSWbKHlq*S?5q`XgiY$L+)G-Qa76 z_Ele!Ovon=Ml?#VT&}r%MhlDl5kZvF)gw!|_l*dbGEk-Q;7c%i^iV8e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mode 100644 index 0000000..bbd242e --- /dev/null +++ b/eptagon shoot.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://da478jrss0ira" +path="res://.godot/imported/eptagon shoot.png-5691739fab2bd478303ccc7f4ddc2612.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://eptagon shoot.png" +dest_files=["res://.godot/imported/eptagon shoot.png-5691739fab2bd478303ccc7f4ddc2612.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/eptagon.gd b/eptagon.gd index d3bbb2f..993581b 100644 --- a/eptagon.gd +++ b/eptagon.gd @@ -1,10 +1,21 @@ extends StaticBody2D +var dying = false + # Called when the node enters the scene tree for the first time. func _ready(): $Turret.target = $"../Player" #print($Turret.target) +func destroy(): + if dying: + return + dying = true + var explosion = load("res://explosion.tscn").instantiate() + $"/root/Node2D".add_child(explosion) + explosion.global_position = global_position + await get_tree().create_timer(0.2).timeout + queue_free() # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): diff --git a/eptagon.tscn b/eptagon.tscn index 945adf6..3cdc55e 100644 --- a/eptagon.tscn +++ b/eptagon.tscn @@ -1,39 +1,60 @@ -[gd_scene load_steps=12 format=3 uid="uid://bda763f0fxh5k"] +[gd_scene load_steps=15 format=3 uid="uid://bda763f0fxh5k"] [ext_resource type="Script" path="res://eptagon.gd" id="1_d0pdl"] -[ext_resource type="Texture2D" uid="uid://d4f0f3ggnd3rl" path="res://eptagon.png" id="1_kwkxh"] [ext_resource type="Script" path="res://Turret.gd" id="2_6tkha"] +[ext_resource type="Texture2D" uid="uid://ccbd4o2iasbun" path="res://eptagon base.png" id="2_ook2g"] [ext_resource type="Script" path="res://Gun.gd" id="2_sea5o"] -[ext_resource type="Texture2D" uid="uid://d1wxsdwad10p6" path="res://eptagon-turret.png" id="3_jhgw8"] [ext_resource type="PackedScene" uid="uid://c6ybtahxwpukd" path="res://bullet.tscn" id="4_cyd7j"] +[ext_resource type="Texture2D" uid="uid://da478jrss0ira" path="res://eptagon shoot.png" id="4_unb6p"] -[sub_resource type="AtlasTexture" id="AtlasTexture_1fcnk"] -atlas = ExtResource("3_jhgw8") -region = Rect2(0, 0, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_ynjjr"] +atlas = ExtResource("4_unb6p") +region = Rect2(0, 0, 128, 128) -[sub_resource type="AtlasTexture" id="AtlasTexture_hhi7e"] -atlas = ExtResource("3_jhgw8") -region = Rect2(32, 0, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_7lu72"] +atlas = ExtResource("4_unb6p") +region = Rect2(128, 0, 128, 128) -[sub_resource type="AtlasTexture" id="AtlasTexture_lo0cp"] -atlas = ExtResource("3_jhgw8") -region = Rect2(0, 32, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_i6mfs"] +atlas = ExtResource("4_unb6p") +region = Rect2(256, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g3rpy"] +atlas = ExtResource("4_unb6p") +region = Rect2(384, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4lb8x"] +atlas = ExtResource("4_unb6p") +region = Rect2(512, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bkh2l"] +atlas = ExtResource("4_unb6p") +region = Rect2(640, 0, 128, 128) [sub_resource type="SpriteFrames" id="SpriteFrames_1fj5a"] animations = [{ "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_1fcnk") +"texture": SubResource("AtlasTexture_ynjjr") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_hhi7e") +"texture": SubResource("AtlasTexture_7lu72") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_lo0cp") +"texture": SubResource("AtlasTexture_i6mfs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g3rpy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4lb8x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bkh2l") }], "loop": true, "name": &"default", -"speed": 3.0 +"speed": 7.0 }] [sub_resource type="CircleShape2D" id="CircleShape2D_03ifk"] @@ -43,18 +64,18 @@ radius = 36.0139 script = ExtResource("1_d0pdl") [node name="Sprite2D" type="Sprite2D" parent="."] -scale = Vector2(3, 3) -texture = ExtResource("1_kwkxh") +position = Vector2(1, 5) +texture = ExtResource("2_ook2g") [node name="Turret" type="Node2D" parent="."] script = ExtResource("2_6tkha") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Turret"] -position = Vector2(14, 0) +position = Vector2(5, 0) rotation = -1.5708 -scale = Vector2(3, 3) sprite_frames = SubResource("SpriteFrames_1fj5a") autoplay = "default" +frame_progress = 0.726849 [node name="Gun" type="Marker2D" parent="Turret"] position = Vector2(56, 0) diff --git a/main.gd b/main.gd index 7baf6c7..622b378 100644 --- a/main.gd +++ b/main.gd @@ -1,6 +1,9 @@ extends Node2D var config = ConfigFile.new() +signal paused +signal unpaused + # Called when the node enters the scene tree for the first time. func _init(): diff --git a/main.tscn b/main.tscn index 4d8377e..02619d5 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=120 format=3 uid="uid://bmd4m7lqj4v0x"] +[gd_scene load_steps=121 format=3 uid="uid://bmd4m7lqj4v0x"] [ext_resource type="Script" path="res://main.gd" id="1_3dydx"] [ext_resource type="Script" path="res://Spawner.gd" id="1_ifu8g"] @@ -12,15 +12,16 @@ [ext_resource type="Texture2D" uid="uid://yvrhlh04k8w1" path="res://background space.png" id="6_yg4g1"] [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] -[ext_resource type="Resource" uid="uid://dd8me0deake37" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] [ext_resource type="Resource" uid="uid://c805aej5v7cvr" path="res://eart.tres" id="10_jib8h"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] -[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] +[ext_resource type="Script" path="res://pause_game.gd" id="16_bto6x"] [ext_resource type="FontFile" uid="uid://bpcp43g74vhgo" path="res://monogram-extended.ttf" id="16_s4rjt"] [ext_resource type="PackedScene" uid="uid://4sdwatj6up8i" path="res://tar.tscn" id="19_8258f"] [ext_resource type="AudioStream" uid="uid://b8soxqg0jquqg" path="res://Flow State 2.ogg" id="21_7hdkm"] @@ -759,6 +760,35 @@ position = Vector2(1920, 540) rotation = -1.5708 shape = SubResource("WorldBoundaryShape2D_rmvst") +[node name="PauseButton" type="ColorRect" parent="."] +process_mode = 3 +visible = false +z_index = 1000 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_right = 1920.0 +offset_bottom = 1080.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 0.466667) +script = ExtResource("16_bto6x") + +[node name="Label" type="Label" parent="PauseButton"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_fonts/font = ExtResource("11_s4q6p") +theme_override_font_sizes/font_size = 100 +text = "PAUSED" +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="UI" type="Control" parent="."] z_index = 10 layout_mode = 3 diff --git a/main_menu.tscn b/main_menu.tscn index 721df7f..7e447e5 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -323,8 +323,8 @@ bus = &"Music" [connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"] diff --git a/pause_game.gd b/pause_game.gd new file mode 100644 index 0000000..e77d83a --- /dev/null +++ b/pause_game.gd @@ -0,0 +1,11 @@ +extends Control + +func _input(event): + if event.is_action_pressed("pause"): + get_tree().paused = not get_tree().paused + visible = not visible + if get_tree().paused: + get_parent().paused.emit() + else: + get_parent().unpaused.emit() + diff --git a/player-iamond.gd b/player-iamond.gd index 531da0a..0253bf9 100644 --- a/player-iamond.gd +++ b/player-iamond.gd @@ -10,7 +10,7 @@ func _ready(): absolute_movement = not config.get_value("config", "relative_controls") func _input(event): - if event.is_action_pressed("jump") and can_jump: + if event.is_action_pressed("primary_fire") and can_jump: can_jump = false $"../".get_node("%Ability/Portal").start_countup(0.5) $Sprite.speed_scale = 1 diff --git a/player-ite.gd b/player-ite.gd index 3ff3d2a..ddcca2b 100644 --- a/player-ite.gd +++ b/player-ite.gd @@ -21,7 +21,7 @@ func update_animation(): $Engine.play("idle") func _input(event): - if event.is_action_pressed("shoot") and speed != 0: + if event.is_action_pressed("primary_fire") and speed != 0: fire_laser() func _process(delta): diff --git a/player-row.gd b/player-row.gd index 0707f74..80db79a 100644 --- a/player-row.gd +++ b/player-row.gd @@ -20,7 +20,7 @@ func _ready(): absolute_movement = not config.get_value("config", "relative_controls") func _input(event): - if event.is_action_pressed("quare"): + if event.is_action_pressed("primary_fire"): if num_quares >= max_quares: notifier.notify("All Quares in Use!") return @@ -37,7 +37,7 @@ func _input(event): new_quare.position = get_global_mouse_position() $/root/Node2D.add_child(new_quare) new_quare.name = "Quare" - if event.is_action_pressed("exagon"): + if event.is_action_pressed("secondary_fire"): if exagons > 1: exagons = 1 if exagons <= 0: diff --git a/portal-ability.tscn b/portal-ability.tscn index d6d30be..dcb35a9 100644 --- a/portal-ability.tscn +++ b/portal-ability.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=6 format=3 uid="uid://bl3178jc8lq1x"] +[gd_scene load_steps=5 format=3 uid="uid://bl3178jc8lq1x"] [ext_resource type="PackedScene" uid="uid://d2xigwib6hka4" path="res://quare_ability.tscn" id="1_ttx3n"] [ext_resource type="Texture2D" uid="uid://dgd2mofq75e01" path="res://portal-icon.png" id="2_2epev"] [ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="2_s8u32"] -[ext_resource type="Texture2D" uid="uid://dux6o222ain2r" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_mouse.png" id="4_kefbp"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_ia5nv"] resource_local_to_scene = true @@ -13,10 +12,3 @@ shader_parameter/strength = null [node name="Portal" instance=ExtResource("1_ttx3n")] material = SubResource("ShaderMaterial_ia5nv") texture_under = ExtResource("2_2epev") - -[node name="prompt" parent="." index="0"] -offset_left = -20.0 -offset_top = 3.0 -offset_right = 20.0 -offset_bottom = 43.0 -texture = ExtResource("4_kefbp") diff --git a/project.godot b/project.godot index e13206e..f8386a5 100644 --- a/project.godot +++ b/project.godot @@ -64,31 +64,28 @@ restart={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) ] } -jump={ -"deadzone": 0.5, -"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(130, 40),"global_position":Vector2(138, 120),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) -] -} -quare={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) -] -} -exagon={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) -] -} quit={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } -shoot={ +primary_fire={ "deadzone": 0.5, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(91, 32),"global_position":Vector2(99, 112),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +] +} +secondary_fire={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +pause={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":112,"location":0,"echo":false,"script":null) ] } diff --git a/quare_ability.tscn b/quare_ability.tscn index 12b65f5..4dde334 100644 --- a/quare_ability.tscn +++ b/quare_ability.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://d2xigwib6hka4"] +[gd_scene load_steps=7 format=3 uid="uid://d2xigwib6hka4"] [ext_resource type="Texture2D" uid="uid://ba2tcipuc8rdi" path="res://quare 2.png" id="1_thx02"] [ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="1_unkpb"] [ext_resource type="Texture2D" uid="uid://barlie6sierj" path="res://square.png" id="2_odtey"] [ext_resource type="Script" path="res://RechargeProgress.gd" id="3_gufwx"] -[ext_resource type="Texture2D" uid="uid://cqxvhnxgi4k7" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png" id="5_isqlk"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_5a8v0"] resource_local_to_scene = true @@ -30,18 +29,3 @@ texture_progress = ExtResource("2_odtey") texture_progress_offset = Vector2(2.08165e-12, 2.08165e-12) tint_progress = Color(0, 0, 0, 0.443137) script = ExtResource("3_gufwx") - -[node name="prompt" type="TextureRect" parent="."] -self_modulate = Color(1, 1, 1, 0.552941) -layout_mode = 1 -anchors_preset = 7 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -17.0 -offset_right = 23.0 -offset_bottom = 40.0 -grow_horizontal = 2 -grow_vertical = 0 -texture = ExtResource("5_isqlk")