Major wave update #2

Merged
ultrablob merged 5 commits from dev into main 2025-02-12 10:36:37 -05:00
27 changed files with 300 additions and 125 deletions

View file

@ -35,7 +35,7 @@ jobs:
run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: https://code.forgejo.org/actions/checkout@v2
name: Checkout Files name: Checkout Files
- name: Download Godot - name: Download Godot

View file

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

Before After
Before After

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bikv7jgvwhcoy"
path="res://.godot/imported/prompt_a.png-97a05cf566b76ae895476618e8c733dc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png"
dest_files=["res://.godot/imported/prompt_a.png-97a05cf566b76ae895476618e8c733dc.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

View file

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

Before After
Before After

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cb0jbsmewh5ir" uid="uid://cb0jbsmewh5ir"
path="res://.godot/imported/tile_0289.png-8c9db24bb657563e4fdbf06f15b9a590.ctex" path="res://.godot/imported/prompt_esc.png-00149f6edf157296d91072ddb4c28746.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png" source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png"
dest_files=["res://.godot/imported/tile_0289.png-8c9db24bb657563e4fdbf06f15b9a590.ctex"] dest_files=["res://.godot/imported/prompt_esc.png-00149f6edf157296d91072ddb4c28746.ctex"]
[params] [params]

View file

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

Before After
Before After

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cqxvhnxgi4k7" uid="uid://cqxvhnxgi4k7"
path="res://.godot/imported/tile_0357.png-e226bbce15a13db50278679661e9ee5f.ctex" path="res://.godot/imported/prompt_q.png-3c3c5b7a9e7231a25d20d6531fb937f8.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png" source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png"
dest_files=["res://.godot/imported/tile_0357.png-e226bbce15a13db50278679661e9ee5f.ctex"] dest_files=["res://.godot/imported/prompt_q.png-3c3c5b7a9e7231a25d20d6531fb937f8.ctex"]
[params] [params]

View file

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 138 B

Before After
Before After

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b664lyfilq1kw"
path="res://.godot/imported/prompt_r.png-129f8c9696706c24d4294a0bcb1b79de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png"
dest_files=["res://.godot/imported/prompt_r.png-129f8c9696706c24d4294a0bcb1b79de.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

View file

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

Before After
Before After

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bdcjy1fcuq23s" uid="uid://bdcjy1fcuq23s"
path="res://.godot/imported/tile_0425.png-bb7d98afa87c8e4ee6f3e5e68b5b6877.ctex" path="res://.godot/imported/prompt_space.png-5ceabdad7d53da09738da849717a4ee9.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png" source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png"
dest_files=["res://.godot/imported/tile_0425.png-bb7d98afa87c8e4ee6f3e5e68b5b6877.ctex"] dest_files=["res://.godot/imported/prompt_space.png-5ceabdad7d53da09738da849717a4ee9.ctex"]
[params] [params]

View file

@ -1,6 +1,7 @@
extends Control extends Control
const MAIN_SCENE_PATH = "res://main.tscn" const MAIN_SCENE_PATH = "res://main.tscn"
const TUTORIAL_SCENE_PATH = "res://tutorial.tscn"
var tip_level = 1 var tip_level = 1
var config = ConfigFile.new() var config = ConfigFile.new()
@ -41,3 +42,12 @@ func play():
await get_tree().create_timer(0.8).timeout await get_tree().create_timer(0.8).timeout
var game = ResourceLoader.load_threaded_get(MAIN_SCENE_PATH) var game = ResourceLoader.load_threaded_get(MAIN_SCENE_PATH)
get_tree().change_scene_to_packed(game) get_tree().change_scene_to_packed(game)
func play_tutorial():
ResourceLoader.load_threaded_request(TUTORIAL_SCENE_PATH)
$"LoadingScreen".show()
var tip_options = []
$LoadingScreen/Tip.text = "Try different characters and movement settings"
await get_tree().create_timer(3).timeout
var game = ResourceLoader.load_threaded_get(TUTORIAL_SCENE_PATH)
get_tree().change_scene_to_packed(game)

View file

@ -2,6 +2,9 @@ extends TextureProgressBar
var animating = false var animating = false
signal done_countdown
signal done_countup
func start_countdown(time: float): func start_countdown(time: float):
material.set("shader_parameter/strength", 1) material.set("shader_parameter/strength", 1)
animating = true animating = true
@ -9,6 +12,7 @@ func start_countdown(time: float):
var tween = get_tree().create_tween() var tween = get_tree().create_tween()
tween.tween_property(self, "value", 0, time) tween.tween_property(self, "value", 0, time)
await tween.finished await tween.finished
done_countdown.emit()
animating = false animating = false
material.set("shader_parameter/strength", 0) material.set("shader_parameter/strength", 0)
@ -19,5 +23,6 @@ func start_countup(time: float):
var tween = get_tree().create_tween() var tween = get_tree().create_tween()
tween.tween_property(self, "value", 100, time) tween.tween_property(self, "value", 100, time)
await tween.finished await tween.finished
done_countup.emit()
animating = false animating = false
material.set("shader_parameter/strength", 0) material.set("shader_parameter/strength", 0)

View file

@ -62,6 +62,8 @@ func spawn(item: WaveEnemy):
var test_pos = Vector2(randf(), randf()) * Vector2(1920, 1080) var test_pos = Vector2(randf(), randf()) * Vector2(1920, 1080)
if not $"../CollisionCheck".is_clear(test_pos, item.check_distance): if not $"../CollisionCheck".is_clear(test_pos, item.check_distance):
continue continue
if Geometry2D.segment_intersects_circle($"../Player".global_position, $"../Player".global_position + $"../Player".linear_velocity, test_pos, 250) != -1:
continue
spawn_loc = test_pos spawn_loc = test_pos
break break

View file

@ -2,17 +2,23 @@ extends Line2D
@export var target_shield = false @export var target_shield = false
func _ready(): const PLAY_AREA = Rect2(0, 0, 1920, 1080)
$ShapeCast2D.target_position = $"..".linear_velocity * 1000
$ShapeCast2D.force_shapecast_update() @onready var player = $"/root/Node2D/Player"
func _physics_process(delta): func _physics_process(delta):
#global_rotation = $"..".linear_velocity.angle() #global_rotation = $"..".linear_velocity.angle()
$ShapeCast2D.target_position = to_local($"..".linear_velocity * 1000)
var poi = Geometry2D.segment_intersects_segment(player.global_position, player.global_position + player.linear_velocity, global_position, global_position + get_parent().linear_velocity)
if $ShapeCast2D.get_collider(0) != null and ["Player", "Shield" if target_shield else "None"].has($ShapeCast2D.get_collider(0).name): if poi != null and PLAY_AREA.has_point(poi):
points[1] = to_local($ShapeCast2D.get_collision_point(0)) set_point_position(1, Vector2.RIGHT * 1000)
visible = true visible = true
else: else:
visible = false visible = false
#queue_redraw()
#func _draw() -> void:
#
#draw_line(Vector2.ZERO, to_local(global_position + get_parent().linear_velocity), Color.RED)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://c6ybtahxwpukd"] [gd_scene load_steps=12 format=3 uid="uid://c6ybtahxwpukd"]
[ext_resource type="Script" path="res://bullet.gd" id="1_3q13i"] [ext_resource type="Script" path="res://bullet.gd" id="1_3q13i"]
[ext_resource type="Texture2D" uid="uid://fgfa8x6icumw" path="res://bullets.png" id="2_unua3"] [ext_resource type="Texture2D" uid="uid://fgfa8x6icumw" path="res://bullets.png" id="2_unua3"]
@ -53,9 +53,6 @@ animations = [{
"speed": 5.0 "speed": 5.0
}] }]
[sub_resource type="CircleShape2D" id="CircleShape2D_13gk7"]
radius = 30.0
[node name="Bullet" type="RigidBody2D" groups=["bullet", "destructible"]] [node name="Bullet" type="RigidBody2D" groups=["bullet", "destructible"]]
collision_layer = 2 collision_layer = 2
physics_material_override = SubResource("PhysicsMaterial_xnhwp") physics_material_override = SubResource("PhysicsMaterial_xnhwp")
@ -92,8 +89,4 @@ texture = ExtResource("4_h1jno")
texture_mode = 1 texture_mode = 1
script = ExtResource("5_0jcwc") script = ExtResource("5_0jcwc")
[node name="ShapeCast2D" type="ShapeCast2D" parent="TrajectoryDisplay"]
shape = SubResource("CircleShape2D_13gk7")
target_position = Vector2(500, 2.08165e-12)
[connection signal="body_entered" from="." to="." method="hit"] [connection signal="body_entered" from="." to="." method="hit"]

View file

@ -1,7 +1,6 @@
[gd_scene load_steps=10 format=3 uid="uid://c87easb8570vd"] [gd_scene load_steps=9 format=3 uid="uid://c87easb8570vd"]
[ext_resource type="PhysicsMaterial" uid="uid://c5tm7od8mwjjb" path="res://elastic.tres" id="1_1oplx"] [ext_resource type="PhysicsMaterial" uid="uid://c5tm7od8mwjjb" path="res://elastic.tres" id="1_1oplx"]
[ext_resource type="Script" path="res://Shield.gd" id="2_q7qjq"]
[ext_resource type="Texture2D" uid="uid://ciwpkhcp4pvqt" path="res://exagon.png" id="3_445cx"] [ext_resource type="Texture2D" uid="uid://ciwpkhcp4pvqt" path="res://exagon.png" id="3_445cx"]
[ext_resource type="AudioStream" uid="uid://b73ik24u615jc" path="res://phaserDown1.ogg" id="5_8ceda"] [ext_resource type="AudioStream" uid="uid://b73ik24u615jc" path="res://phaserDown1.ogg" id="5_8ceda"]
@ -43,7 +42,6 @@ radius = 25.0
collision_layer = 2 collision_layer = 2
collision_mask = 2 collision_mask = 2
physics_material_override = ExtResource("1_1oplx") physics_material_override = ExtResource("1_1oplx")
script = ExtResource("2_q7qjq")
[node name="Sprite" type="AnimatedSprite2D" parent="Shield"] [node name="Sprite" type="AnimatedSprite2D" parent="Shield"]
z_index = 2 z_index = 2

View file

@ -1,9 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://1ex46dwbqgdn"] [gd_scene load_steps=5 format=3 uid="uid://1ex46dwbqgdn"]
[ext_resource type="PackedScene" uid="uid://d2xigwib6hka4" path="res://quare_ability.tscn" id="1_k107v"] [ext_resource type="PackedScene" uid="uid://d2xigwib6hka4" path="res://quare_ability.tscn" id="1_k107v"]
[ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="2_6nuob"] [ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="2_6nuob"]
[ext_resource type="Texture2D" uid="uid://dtipytdgtqr88" path="res://laser-icon.png" id="2_wo0et"] [ext_resource type="Texture2D" uid="uid://dtipytdgtqr88" path="res://laser-icon.png" id="2_wo0et"]
[ext_resource type="Texture2D" uid="uid://dux6o222ain2r" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_mouse.png" id="4_krrm2"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hrqqm"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_hrqqm"]
resource_local_to_scene = true resource_local_to_scene = true
@ -17,10 +16,3 @@ stretch_margin_top = 0
stretch_margin_right = 0 stretch_margin_right = 0
stretch_margin_bottom = 0 stretch_margin_bottom = 0
texture_under = ExtResource("2_wo0et") texture_under = ExtResource("2_wo0et")
[node name="prompt" parent="." index="0"]
offset_left = -14.0
offset_top = 7.0
offset_right = 26.0
offset_bottom = 47.0
texture = ExtResource("4_krrm2")

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=121 format=3 uid="uid://bmd4m7lqj4v0x"] [gd_scene load_steps=116 format=3 uid="uid://bmd4m7lqj4v0x"]
[ext_resource type="Script" path="res://main.gd" id="1_3dydx"] [ext_resource type="Script" path="res://main.gd" id="1_3dydx"]
[ext_resource type="Script" path="res://Spawner.gd" id="1_ifu8g"] [ext_resource type="Script" path="res://Spawner.gd" id="1_ifu8g"]
@ -26,38 +26,6 @@
[ext_resource type="PackedScene" uid="uid://4sdwatj6up8i" path="res://tar.tscn" id="19_8258f"] [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"] [ext_resource type="AudioStream" uid="uid://b8soxqg0jquqg" path="res://Flow State 2.ogg" id="21_7hdkm"]
[sub_resource type="Resource" id="Resource_ur7l5"]
script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u")])
quantities = Array[int]([1])
spawning_duration = 1.0
wait = 1.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_kupyp"]
script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u")])
quantities = Array[int]([7])
spawning_duration = 25.0
wait = 3.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_o8cet"]
script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("3_xmk5u")])
quantities = Array[int]([1, 2])
spawning_duration = 2.0
wait = 5.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_0cevq"]
script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0")])
quantities = Array[int]([3])
spawning_duration = 10.0
wait = 1.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_eppj0"] [sub_resource type="Resource" id="Resource_eppj0"]
script = ExtResource("4_um0x7") script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u"), ExtResource("5_xdrk0")]) enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u"), ExtResource("5_xdrk0")])
@ -66,14 +34,6 @@ spawning_duration = 20.0
wait = 10.0 wait = 10.0
wait_for_killed = true wait_for_killed = true
[sub_resource type="Resource" id="Resource_rpu1y"]
script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf")])
quantities = Array[int]([3])
spawning_duration = 10.0
wait = 2.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_4b1vo"] [sub_resource type="Resource" id="Resource_4b1vo"]
script = ExtResource("4_um0x7") script = ExtResource("4_um0x7")
enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("5_e24vf")]) enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("5_e24vf")])
@ -688,12 +648,11 @@ colors = PackedColorArray(1, 0, 0, 1, 1, 0, 0, 1)
gradient = SubResource("Gradient_or5lt") gradient = SubResource("Gradient_or5lt")
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
position = Vector2(-2, -1)
script = ExtResource("1_3dydx") script = ExtResource("1_3dydx")
[node name="Spawner" type="Node2D" parent="." node_paths=PackedStringArray("wave_label")] [node name="Spawner" type="Node2D" parent="." node_paths=PackedStringArray("wave_label")]
script = ExtResource("1_ifu8g") 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")]) waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_eppj0"), 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") wave_label = NodePath("../UI/Wave Count")
[node name="Timer" type="Timer" parent="Spawner"] [node name="Timer" type="Timer" parent="Spawner"]
@ -965,8 +924,7 @@ script = ExtResource("13_lkv81")
process_mode = 3 process_mode = 3
script = ExtResource("1_k8sg3") script = ExtResource("1_k8sg3")
[node name="Music" type="AudioStreamPlayer2D" parent="."] [node name="Music" type="AudioStreamPlayer" parent="."]
position = Vector2(-13, 29)
stream = ExtResource("21_7hdkm") stream = ExtResource("21_7hdkm")
autoplay = true autoplay = true
bus = &"Music" bus = &"Music"

View file

@ -72,7 +72,7 @@ layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_fonts/font = ExtResource("4_ybv7t")
theme_override_font_sizes/font_size = 100 theme_override_font_sizes/font_size = 100
text = "CONFIG" text = "SETTINGS"
flat = true flat = true
alignment = 0 alignment = 0
@ -315,16 +315,16 @@ theme_override_font_sizes/normal_font_size = 200
bbcode_enabled = true bbcode_enabled = true
text = "[center][wave]LOADING..." text = "[center][wave]LOADING..."
[node name="Music" type="AudioStreamPlayer2D" parent="."] [node name="Music" type="AudioStreamPlayer" parent="."]
stream = ExtResource("9_rc4r7") stream = ExtResource("9_rc4r7")
autoplay = true autoplay = true
bus = &"Music" bus = &"Music"
[connection signal="pressed" from="Layout/Play" to="." method="play"] [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/Settings" to="Settings Panel" method="show"]
[connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="." method="play_tutorial"]
[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="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" method="check_valid"]
[connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [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"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"]

View file

@ -12,14 +12,16 @@ func _ready():
func _input(event): func _input(event):
if event.is_action_pressed("primary_fire") and can_jump: if event.is_action_pressed("primary_fire") and can_jump:
can_jump = false can_jump = false
$"../".get_node("%Ability/Portal").start_countup(0.5) $"../".get_node("%Ability/Portal").start_countup(1)
$Sprite.speed_scale = 1 $Sprite.speed_scale = 1
$Sprite.play("jump") $Sprite.play("jump")
await $Sprite.animation_finished await $Sprite.animation_finished
$"../".get_node("%Ability/Portal").start_countdown(0.5)
global_position = get_global_mouse_position() global_position = get_global_mouse_position()
$Sprite.speed_scale = -1 $Sprite.speed_scale = -1
$Sprite.play("jump") $Sprite.play("jump")
await $Sprite.animation_finished await $Sprite.animation_finished
$Sprite.play("idle") $Sprite.play("idle")
$"../".get_node("%Ability/Portal").start_countdown(5)
await $"../".get_node("%Ability/Portal").done_countdown
can_jump = true can_jump = true
$AbilityRechargeFX.play()

View file

@ -56,6 +56,8 @@ func fire_laser():
tween.tween_callback(set_laser_texture.bind(idle_texture)) tween.tween_callback(set_laser_texture.bind(idle_texture))
tween.tween_callback($Body.play.bind("idle")) tween.tween_callback($Body.play.bind("idle"))
tween.tween_property(self, "speed", 750, 0) tween.tween_property(self, "speed", 750, 0)
await tween.finished
$AbilityRechargeFX.play()

View file

@ -37,23 +37,23 @@ func _input(event):
new_quare.position = get_global_mouse_position() new_quare.position = get_global_mouse_position()
$/root/Node2D.add_child(new_quare) $/root/Node2D.add_child(new_quare)
new_quare.name = "Quare" new_quare.name = "Quare"
if event.is_action_pressed("secondary_fire"): #if event.is_action_pressed("secondary_fire"):
if exagons > 1: #if exagons > 1:
exagons = 1 #exagons = 1
if exagons <= 0: #if exagons <= 0:
notifier.notify("No Exagons!") #notifier.notify("No Exagons!")
return #return
#
if not $"../CollisionCheck".is_clear(get_global_mouse_position()): #if not $"../CollisionCheck".is_clear(get_global_mouse_position()):
$"../CollisionCheck".flash() #$"../CollisionCheck".flash()
notifier.notify("Too Close!") #notifier.notify("Too Close!")
return #return
exagons -= 1 #exagons -= 1
var new_exagon = exagon.instantiate() #var new_exagon = exagon.instantiate()
new_exagon.position = get_global_mouse_position() #new_exagon.position = get_global_mouse_position()
$/root/Node2D.add_child(new_exagon) #$/root/Node2D.add_child(new_exagon)
new_exagon.name = "Exagon" #new_exagon.name = "Exagon"
#$Gun.shoot() ##$Gun.shoot()
func aquire_quare(): func aquire_quare():
@ -63,9 +63,4 @@ func aquire_quare():
break break
await get_tree().create_timer(3).timeout await get_tree().create_timer(3).timeout
num_quares -= 1 num_quares -= 1
$QuareFX.play() $AbilityRechargeFX.play()
func aquire_exagon():
await get_tree().create_timer(15).timeout
exagons += 1
$ExagonFX.play()

View file

@ -1,10 +1,8 @@
[gd_scene load_steps=31 format=3 uid="uid://bfd8oqdyt6m3g"] [gd_scene load_steps=29 format=3 uid="uid://bfd8oqdyt6m3g"]
[ext_resource type="PackedScene" uid="uid://cgcjicue76wsr" path="res://player.tscn" id="1_r3mct"] [ext_resource type="PackedScene" uid="uid://cgcjicue76wsr" path="res://player.tscn" id="1_r3mct"]
[ext_resource type="Script" path="res://player-row.gd" id="2_ty4ic"] [ext_resource type="Script" path="res://player-row.gd" id="2_ty4ic"]
[ext_resource type="AudioStream" uid="uid://cbghiy80qmaa0" path="res://powerUp6.ogg" id="3_sk1xt"]
[ext_resource type="Texture2D" uid="uid://bd0inrlfuocmv" path="res://player_idle.png" id="3_yynte"] [ext_resource type="Texture2D" uid="uid://bd0inrlfuocmv" path="res://player_idle.png" id="3_yynte"]
[ext_resource type="AudioStream" uid="uid://mond5sdmukan" path="res://powerUp7.ogg" id="4_lwgj5"]
[ext_resource type="Texture2D" uid="uid://uy21l35yd3p5" path="res://player_moving.png" id="4_x5jjw"] [ext_resource type="Texture2D" uid="uid://uy21l35yd3p5" path="res://player_moving.png" id="4_x5jjw"]
[sub_resource type="AtlasTexture" id="AtlasTexture_7dffy"] [sub_resource type="AtlasTexture" id="AtlasTexture_7dffy"]
@ -198,13 +196,5 @@ speed_scale = 0.75
position = Vector2(3, 0) position = Vector2(3, 0)
shape = SubResource("CircleShape2D_caugh") shape = SubResource("CircleShape2D_caugh")
[node name="QuareFX" type="AudioStreamPlayer2D" parent="." index="3"] [node name="ShieldMarker" type="Marker2D" parent="." index="3"]
stream = ExtResource("3_sk1xt")
bus = &"SFX"
[node name="ExagonFX" type="AudioStreamPlayer2D" parent="." index="4"]
stream = ExtResource("4_lwgj5")
bus = &"SFX"
[node name="ShieldMarker" type="Marker2D" parent="." index="5"]
scale = Vector2(1.5, 1.5) scale = Vector2(1.5, 1.5)

View file

@ -39,6 +39,8 @@ func _physics_process(delta):
else: else:
apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed * linear_damp) apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed * linear_damp)
#queue_redraw()
func destroy(): func destroy():
if has_node("Shield"): if has_node("Shield"):
$Shield.destroy() $Shield.destroy()
@ -46,3 +48,8 @@ func destroy():
$DeathFX.play() $DeathFX.play()
get_tree().paused = true get_tree().paused = true
$"../GameOver".visible = true $"../GameOver".visible = true
func _draw():
if OS.is_debug_build():
draw_line(Vector2.ZERO, to_local(global_position + linear_velocity), Color.GREEN, 2, true)

View file

@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://cgcjicue76wsr"] [gd_scene load_steps=4 format=3 uid="uid://cgcjicue76wsr"]
[ext_resource type="Script" path="res://player.gd" id="1_p12hv"] [ext_resource type="Script" path="res://player.gd" id="1_p12hv"]
[ext_resource type="AudioStream" uid="uid://mond5sdmukan" path="res://powerUp7.ogg" id="3_71sa0"]
[ext_resource type="AudioStream" uid="uid://cuu1qqskoqabg" path="res://Taco_Bell_Bong.ogg" id="3_urvwh"] [ext_resource type="AudioStream" uid="uid://cuu1qqskoqabg" path="res://Taco_Bell_Bong.ogg" id="3_urvwh"]
[node name="Player" type="RigidBody2D" groups=["destructible"]] [node name="Player" type="RigidBody2D" groups=["destructible"]]
@ -9,6 +10,10 @@ gravity_scale = 1.66533e-16
linear_damp = 1.0 linear_damp = 1.0
script = ExtResource("1_p12hv") script = ExtResource("1_p12hv")
[node name="DeathFX" type="AudioStreamPlayer2D" parent="."] [node name="DeathFX" type="AudioStreamPlayer" parent="."]
process_mode = 3 process_mode = 3
stream = ExtResource("3_urvwh") stream = ExtResource("3_urvwh")
[node name="AbilityRechargeFX" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_71sa0")
bus = &"SFX"

142
tutorial.tscn Normal file
View file

@ -0,0 +1,142 @@
[gd_scene load_steps=19 format=3 uid="uid://c8rjblwa4g4h4"]
[ext_resource type="PackedScene" uid="uid://bmd4m7lqj4v0x" path="res://main.tscn" id="1_vbure"]
[ext_resource type="Script" path="res://wave.gd" id="2_ptga6"]
[ext_resource type="Script" path="res://wave_enemy.gd" id="3_0n5nc"]
[ext_resource type="Resource" uid="uid://du12lm5aq7g7f" path="res://ircle_enemy.tres" id="4_le7cn"]
[ext_resource type="Resource" uid="uid://3gxjbodh4fwe" path="res://riangle_enemy.tres" id="5_6ndf3"]
[ext_resource type="Resource" uid="uid://824inmsxuois" path="res://entagon_enemy.tres" id="6_yvkbu"]
[ext_resource type="FontFile" uid="uid://bpcp43g74vhgo" path="res://monogram-extended.ttf" id="7_cv2we"]
[ext_resource type="Texture2D" uid="uid://cqxvhnxgi4k7" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png" id="8_ix613"]
[ext_resource type="Texture2D" uid="uid://bdcjy1fcuq23s" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png" id="9_b2ggs"]
[ext_resource type="Texture2D" uid="uid://dux6o222ain2r" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_mouse.png" id="10_tpxnc"]
[ext_resource type="Texture2D" uid="uid://cb0jbsmewh5ir" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png" id="11_r8uaj"]
[ext_resource type="Texture2D" uid="uid://b664lyfilq1kw" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png" id="12_unp2s"]
[sub_resource type="Resource" id="Resource_ur7l5"]
script = ExtResource("2_ptga6")
enemies = Array[ExtResource("3_0n5nc")]([ExtResource("4_le7cn")])
quantities = Array[int]([1])
spawning_duration = 1.0
wait = 1.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_kupyp"]
script = ExtResource("2_ptga6")
enemies = Array[ExtResource("3_0n5nc")]([ExtResource("4_le7cn")])
quantities = Array[int]([7])
spawning_duration = 25.0
wait = 3.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_o8cet"]
script = ExtResource("2_ptga6")
enemies = Array[ExtResource("3_0n5nc")]([ExtResource("5_6ndf3"), ExtResource("4_le7cn")])
quantities = Array[int]([1, 2])
spawning_duration = 2.0
wait = 5.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_0cevq"]
script = ExtResource("2_ptga6")
enemies = Array[ExtResource("3_0n5nc")]([ExtResource("5_6ndf3")])
quantities = Array[int]([3])
spawning_duration = 10.0
wait = 1.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_eppj0"]
script = ExtResource("2_ptga6")
enemies = Array[ExtResource("3_0n5nc")]([ExtResource("4_le7cn"), ExtResource("5_6ndf3")])
quantities = Array[int]([7, 5])
spawning_duration = 20.0
wait = 10.0
wait_for_killed = true
[sub_resource type="Resource" id="Resource_rpu1y"]
script = ExtResource("2_ptga6")
enemies = Array[ExtResource("3_0n5nc")]([ExtResource("6_yvkbu")])
quantities = Array[int]([3])
spawning_duration = 10.0
wait = 2.0
wait_for_killed = true
[node name="Node2D" instance=ExtResource("1_vbure")]
[node name="Spawner" parent="." index="0"]
waves = Array[ExtResource("2_ptga6")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y")])
[node name="Stopwatch" parent="UI" index="1"]
text = "Tutorial"
script = null
[node name="HBoxContainer" type="HBoxContainer" parent="UI" index="2"]
modulate = Color(0.716296, 0.716296, 0.716296, 1)
layout_mode = 2
offset_left = 624.0
offset_top = 80.0
offset_right = 1296.0
offset_bottom = 144.0
[node name="Label" type="Label" parent="UI/HBoxContainer" index="0"]
layout_mode = 2
theme_override_fonts/font = ExtResource("7_cv2we")
theme_override_font_sizes/font_size = 48
text = "To use your ability press "
[node name="TextureRect" type="TextureRect" parent="UI/HBoxContainer" index="1"]
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
size_flags_horizontal = 4
texture = ExtResource("8_ix613")
[node name="TextureRect3" type="TextureRect" parent="UI/HBoxContainer" index="2"]
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
size_flags_horizontal = 4
texture = ExtResource("9_b2ggs")
[node name="TextureRect2" type="TextureRect" parent="UI/HBoxContainer" index="3"]
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
size_flags_horizontal = 4
texture = ExtResource("10_tpxnc")
[node name="GameOver" parent="." index="6"]
text = "GAME OVER"
[node name="Restart" parent="GameOver" index="0"]
offset_left = -175.5
offset_top = -151.0
offset_right = 619.5
text = "To leave
to restart"
horizontal_alignment = 0
[node name="Leaderboard" parent="GameOver" index="3"]
theme_override_fonts/normal_font = ExtResource("7_cv2we")
theme_override_font_sizes/normal_font_size = 100
text = "
[center]Go to config and set a username to start playing!
"
script = null
[node name="Leave Prompt" type="TextureRect" parent="GameOver" index="4"]
layout_mode = 0
offset_left = 695.0
offset_top = 926.0
offset_right = 735.0
offset_bottom = 966.0
scale = Vector2(2, 2)
texture = ExtResource("11_r8uaj")
[node name="Restart Prompt" type="TextureRect" parent="GameOver" index="5"]
layout_mode = 0
offset_left = 696.0
offset_top = 998.0
offset_right = 736.0
offset_bottom = 1038.0
scale = Vector2(2, 2)
texture = ExtResource("12_unp2s")