Added first setup of level-based system

This commit is contained in:
2026-02-05 05:03:53 +11:00
parent 2bacff5b7d
commit 067d8c29af
57 changed files with 906 additions and 82 deletions

BIN
BrickPile/brick_pile.glb Normal file

Binary file not shown.

View File

@@ -0,0 +1,50 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c432msvkrfva1"
path="res://.godot/imported/brick_pile.glb-932c44dfae50ab3e5b291c66d7513aee.scn"
[deps]
source_file="res://BrickPile/brick_pile.glb"
dest_files=["res://.godot/imported/brick_pile.glb-932c44dfae50ab3e5b291c66d7513aee.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Material.001": {
"use_external/enabled": true,
"use_external/fallback_path": "res://BrickPile/brick_pile_mat.tres",
"use_external/path": "uid://chic6b8ci1rrv"
}
}
}
gltf/naming_version=2
gltf/embedded_image_handling=1

View File

@@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://d1gauy86jxpnj"]
[ext_resource type="PackedScene" uid="uid://c432msvkrfva1" path="res://BrickPile/brick_pile.glb" id="1_x3ssl"]
[node name="Node3D" type="Node3D" unique_id=625195104]
[node name="brick_pile" parent="." unique_id=1818861113 instance=ExtResource("1_x3ssl")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cci7oyjxcvq0l"
path="res://.godot/imported/brick_pile_bricks.png-18a19526c6abf9ebf9bd3dc8b3bdb44c.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "bcdd6414a2f4ce476e1cfdafd881ca59"
}
[deps]
source_file="res://BrickPile/brick_pile_bricks.png"
dest_files=["res://.godot/imported/brick_pile_bricks.png-18a19526c6abf9ebf9bd3dc8b3bdb44c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=0

View File

@@ -0,0 +1,12 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://chic6b8ci1rrv"]
[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_3mueh"]
[ext_resource type="Texture2D" uid="uid://cci7oyjxcvq0l" path="res://BrickPile/brick_pile_bricks.png" id="2_yf724"]
[resource]
render_priority = 0
shader = ExtResource("1_3mueh")
shader_parameter/albedo = ExtResource("2_yf724")
shader_parameter/jitter_z_coordinate = true
shader_parameter/jitter_depth_independent = true
shader_parameter/alpha_scissor = 1.0

20
Level1/specs.tres Normal file
View File

@@ -0,0 +1,20 @@
[gd_resource type="Resource" script_class="LevelSpecs" format=3 uid="uid://b67b70x1uf2el"]
[ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_yuhm2"]
[ext_resource type="Script" uid="uid://dalgif6huggwg" path="res://Scripts/Resources/level_specs.gd" id="2_52rgn"]
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://Cards/assault.tres" id="2_vvycy"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="3_5cjqa"]
[ext_resource type="Resource" uid="uid://b5pc3frhx467q" path="res://Classes/Engineer/class.tres" id="3_ksxj8"]
[ext_resource type="Resource" uid="uid://cygfdfqhk2vhw" path="res://Level1/wave1.tres" id="6_xm2iu"]
[ext_resource type="Resource" uid="uid://bdqng70bpcvp8" path="res://Level1/wave2.tres" id="7_ginir"]
[ext_resource type="Resource" uid="uid://dasqxcoenje00" path="res://Level1/wave3.tres" id="8_heo8u"]
[ext_resource type="Resource" uid="uid://c0ln1sfxmvhaf" path="res://Level1/wave4.tres" id="9_5mf8a"]
[ext_resource type="Resource" uid="uid://b8e1xvwr2f4pf" path="res://Level1/wave5.tres" id="10_skwnu"]
[ext_resource type="Resource" uid="uid://bsmpkojn7bmqq" path="res://Level1/wave6.tres" id="11_rusuq"]
[resource]
script = ExtResource("2_52rgn")
hero_class = ExtResource("3_ksxj8")
allowed_cards = Array[ExtResource("1_yuhm2")]([ExtResource("2_vvycy")])
waves = Array[ExtResource("3_5cjqa")]([ExtResource("6_xm2iu"), ExtResource("7_ginir"), ExtResource("8_heo8u"), ExtResource("9_5mf8a"), ExtResource("10_skwnu"), ExtResource("11_rusuq")])
metadata/_custom_type_script = "uid://dalgif6huggwg"

13
Level1/wave1.tres Normal file
View File

@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://cygfdfqhk2vhw"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_ijigs"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_tihwe"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_ywnes"]
[resource]
script = ExtResource("2_tihwe")
enemies = Dictionary[ExtResource("1_ijigs"), int]({
ExtResource("2_ywnes"): 4
})
rewards_blank_cassette = true
metadata/_custom_type_script = "uid://bp6q371iypd06"

12
Level1/wave2.tres Normal file
View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://bdqng70bpcvp8"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_ddbxs"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_mjqnu"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_yby3c"]
[resource]
script = ExtResource("2_yby3c")
enemies = Dictionary[ExtResource("1_ddbxs"), int]({
ExtResource("2_mjqnu"): 7
})
metadata/_custom_type_script = "uid://bp6q371iypd06"

15
Level1/wave3.tres Normal file
View File

@@ -0,0 +1,15 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://dasqxcoenje00"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_8j1mh"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_cyr3d"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_mvtl1"]
[ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="3_6mlj7"]
[resource]
script = ExtResource("2_mvtl1")
enemies = Dictionary[ExtResource("1_8j1mh"), int]({
ExtResource("2_cyr3d"): 5,
ExtResource("3_6mlj7"): 2
})
rewards_blank_cassette = true
metadata/_custom_type_script = "uid://bp6q371iypd06"

14
Level1/wave4.tres Normal file
View File

@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://c0ln1sfxmvhaf"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_k10uy"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_6kjfn"]
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="2_htd28"]
[resource]
script = ExtResource("2_6kjfn")
enemies = Dictionary[ExtResource("1_k10uy"), int]({
ExtResource("2_htd28"): 10
})
new_shop = true
bonus_cash = 20
metadata/_custom_type_script = "uid://bp6q371iypd06"

14
Level1/wave5.tres Normal file
View File

@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://b8e1xvwr2f4pf"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_evs1i"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_38p3i"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_gexw5"]
[ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="3_8y41r"]
[resource]
script = ExtResource("2_gexw5")
enemies = Dictionary[ExtResource("1_evs1i"), int]({
ExtResource("2_38p3i"): 10,
ExtResource("3_8y41r"): 3
})
metadata/_custom_type_script = "uid://bp6q371iypd06"

12
Level1/wave6.tres Normal file
View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://bsmpkojn7bmqq"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_asx4x"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_ltlqs"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_u1tse"]
[resource]
script = ExtResource("2_ltlqs")
enemies = Dictionary[ExtResource("1_asx4x"), int]({
ExtResource("2_u1tse"): 25
})
metadata/_custom_type_script = "uid://bp6q371iypd06"

24
Level2/specs.tres Normal file
View File

@@ -0,0 +1,24 @@
[gd_resource type="Resource" script_class="LevelSpecs" format=3 uid="uid://dffoufw4bnfn7"]
[ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_rchhl"]
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://Cards/assault.tres" id="2_geygk"]
[ext_resource type="Script" uid="uid://dalgif6huggwg" path="res://Scripts/Resources/level_specs.gd" id="2_y3kr2"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="3_05rhi"]
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://Cards/rocket_launcher.tres" id="3_xdjpy"]
[ext_resource type="Resource" uid="uid://b5pc3frhx467q" path="res://Classes/Engineer/class.tres" id="4_ldc6i"]
[ext_resource type="Resource" uid="uid://7dqtd1owl7g3" path="res://Level2/wave1.tres" id="7_siv73"]
[ext_resource type="Resource" uid="uid://dafixx8vfmr3h" path="res://Level2/wave2.tres" id="8_kee6w"]
[ext_resource type="Resource" uid="uid://cricfym5wcf3w" path="res://Level2/wave3.tres" id="9_k6fmx"]
[ext_resource type="Resource" uid="uid://cky3wcbc3kob0" path="res://Level2/wave4.tres" id="10_dd7gv"]
[ext_resource type="Resource" uid="uid://b5wbmohc1ryla" path="res://Level2/wave5.tres" id="11_nmbqu"]
[ext_resource type="Resource" uid="uid://11e6ak5jg2pn" path="res://Level2/wave6.tres" id="12_p0fmg"]
[ext_resource type="Resource" uid="uid://cvtuui3grpslm" path="res://Level2/wave7.tres" id="13_alfsy"]
[ext_resource type="Resource" uid="uid://7t61us4e01bb" path="res://Level2/wave8.tres" id="14_jyonc"]
[resource]
script = ExtResource("2_y3kr2")
hero_class = ExtResource("4_ldc6i")
allowed_cards = Array[ExtResource("1_rchhl")]([ExtResource("2_geygk"), ExtResource("3_xdjpy")])
waves = Array[ExtResource("3_05rhi")]([ExtResource("7_siv73"), ExtResource("8_kee6w"), ExtResource("9_k6fmx"), ExtResource("10_dd7gv"), ExtResource("11_nmbqu"), ExtResource("12_p0fmg"), ExtResource("13_alfsy"), ExtResource("14_jyonc")])
points_blocked = Array[int]([40, 41, 42])
metadata/_custom_type_script = "uid://dalgif6huggwg"

13
Level2/wave1.tres Normal file
View File

@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://7dqtd1owl7g3"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_dhlut"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_50dab"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_iaotk"]
[resource]
script = ExtResource("2_50dab")
enemies = Dictionary[ExtResource("1_dhlut"), int]({
ExtResource("2_iaotk"): 5
})
rewards_blank_cassette = true
metadata/_custom_type_script = "uid://bp6q371iypd06"

13
Level2/wave2.tres Normal file
View File

@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://dafixx8vfmr3h"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_rhace"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_l5n6q"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="2_n5glm"]
[resource]
script = ExtResource("2_l5n6q")
enemies = Dictionary[ExtResource("1_rhace"), int]({
ExtResource("2_n5glm"): 6
})
new_shop = true
metadata/_custom_type_script = "uid://bp6q371iypd06"

13
Level2/wave3.tres Normal file
View File

@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://cricfym5wcf3w"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_a61ug"]
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="2_3ov7j"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_47xps"]
[resource]
script = ExtResource("2_47xps")
enemies = Dictionary[ExtResource("1_a61ug"), int]({
ExtResource("2_3ov7j"): 10
})
rewards_blank_cassette = true
metadata/_custom_type_script = "uid://bp6q371iypd06"

16
Level2/wave4.tres Normal file
View File

@@ -0,0 +1,16 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://cky3wcbc3kob0"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_7c1qm"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_6m45b"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_n286l"]
[ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="3_qjnea"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="4_8uy8t"]
[resource]
script = ExtResource("2_n286l")
enemies = Dictionary[ExtResource("1_7c1qm"), int]({
ExtResource("2_6m45b"): 6,
ExtResource("3_qjnea"): 2,
ExtResource("4_8uy8t"): 8
})
metadata/_custom_type_script = "uid://bp6q371iypd06"

15
Level2/wave5.tres Normal file
View File

@@ -0,0 +1,15 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://b5wbmohc1ryla"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_yfa3k"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_84e3q"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="2_ugnlg"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="3_3e1qp"]
[resource]
script = ExtResource("2_84e3q")
enemies = Dictionary[ExtResource("1_yfa3k"), int]({
ExtResource("2_ugnlg"): 10,
ExtResource("3_3e1qp"): 10
})
rewards_blank_cassette = true
metadata/_custom_type_script = "uid://bp6q371iypd06"

18
Level2/wave6.tres Normal file
View File

@@ -0,0 +1,18 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://11e6ak5jg2pn"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_n1yiu"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_f752f"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="3_uomax"]
[ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="4_mu3r3"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="4_wrrsl"]
[resource]
script = ExtResource("2_f752f")
enemies = Dictionary[ExtResource("1_n1yiu"), int]({
ExtResource("3_uomax"): 6,
ExtResource("4_mu3r3"): 3,
ExtResource("4_wrrsl"): 8
})
new_shop = true
bonus_cash = 3
metadata/_custom_type_script = "uid://bp6q371iypd06"

14
Level2/wave7.tres Normal file
View File

@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://cvtuui3grpslm"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_j1606"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="2_6r48e"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_uttqy"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="3_ptl2k"]
[resource]
script = ExtResource("2_uttqy")
enemies = Dictionary[ExtResource("1_j1606"), int]({
ExtResource("2_6r48e"): 35,
ExtResource("3_ptl2k"): 5
})
metadata/_custom_type_script = "uid://bp6q371iypd06"

14
Level2/wave8.tres Normal file
View File

@@ -0,0 +1,14 @@
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://7t61us4e01bb"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="1_f4qev"]
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_3trsl"]
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="2_r8dsv"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="3_o75u5"]
[resource]
script = ExtResource("2_3trsl")
enemies = Dictionary[ExtResource("1_f4qev"), int]({
ExtResource("2_r8dsv"): 25,
ExtResource("3_o75u5"): 5
})
metadata/_custom_type_script = "uid://bp6q371iypd06"

View File

@@ -262,7 +262,18 @@ func _unhandled_input(event: InputEvent) -> void:
var wave_preview: WaveViewer = wave_preview_scene.instantiate() as WaveViewer var wave_preview: WaveViewer = wave_preview_scene.instantiate() as WaveViewer
pause() pause()
hud.add_child(wave_preview) hud.add_child(wave_preview)
wave_preview.set_waves(game_manager.pre_generate_waves(), game_manager.wave) var wave_list: Array[Wave] = []
var i: int = -1
for wave: WaveConfig in game_manager.level_specs.waves.slice(game_manager.wave - 1):
i += 1
var new_wave: Wave = Wave.new()
for enemy: Enemy in game_manager.level_specs.waves[game_manager.wave - 1 + i].enemies.keys():
var enemy_card: EnemyCard = EnemyCard.new()
enemy_card.enemy = enemy
enemy_card.count = game_manager.level_specs.waves[game_manager.wave - 1 + i].enemies[enemy]
new_wave.enemy_groups.append(enemy_card)
wave_list.append(new_wave)
wave_preview.set_waves(wave_list, game_manager.wave)
wave_preview.closed.connect(unpause) wave_preview.closed.connect(unpause)

View File

@@ -72,9 +72,13 @@ func randomize_cards(faction: Card.Faction) -> void:
spawned_cards.append(item) spawned_cards.append(item)
func find_cards(faction: Card.Faction) -> void: func find_cards(faction: Card.Faction, rarity: Data.Rarity, allowed_cards: Array[Card]) -> void:
var decided_rarity: int = generate_rarity() var decided_rarity: int = rarity
var card_choices: Array[Card] = get_faction_cards(faction) if !decided_rarity:
decided_rarity = generate_rarity()
var card_choices: Array[Card] = allowed_cards
if !card_choices:
card_choices = get_faction_cards(faction)
var cards: Array[Card] = [] var cards: Array[Card] = []
var valid_cards_found: bool = false var valid_cards_found: bool = false
var testing_rarity: int = decided_rarity var testing_rarity: int = decided_rarity
@@ -123,4 +127,4 @@ func _on_static_body_3d_button_interacted(_value: int, reply: Hero) -> void:
return return
button_collider.disabled = true button_collider.disabled = true
$StaticBody3D/AudioStreamPlayer3D.play() $StaticBody3D/AudioStreamPlayer3D.play()
find_cards(reply.hero_class.faction) find_cards(reply.hero_class.faction, reply.game_manager.level_specs.waves[reply.game_manager.wave].station, reply.game_manager.level_specs.allowed_cards)

View File

@@ -9,28 +9,8 @@ extends Resource
@export var death_sprite: Texture @export var death_sprite: Texture
@export var sprite: AtlasTexture @export var sprite: AtlasTexture
@export var spawn_power: int = 10 @export var spawn_power: int = 10
@export var group_size: int = 5
@export var health: int = 100 @export var health: int = 100
@export var penalty: int = 10 @export var penalty: int = 10
@export var movement_speed: float = 0.5 @export var movement_speed: float = 0.5
@export var spawn_cooldown: float = 1.0 @export var spawn_cooldown: float = 1.0
@export_group("Spawner Card")
@export_subgroup("Common")
@export var common_group: int = 1
@export var common_cost: int = 1
@export_subgroup("Uncommon")
@export var uncommon_group: int = 1
@export var uncommon_cost: int = 1
@export_subgroup("Rare")
@export var rare_group: int = 1
@export var rare_cost: int = 1
@export_subgroup("Epic")
@export var epic_group: int = 1
@export var epic_cost: int = 1
@export_subgroup("Legendary")
@export var legendary_group: int = 1
@export var legendary_cost: int = 1

View File

@@ -0,0 +1,6 @@
class_name LevelSpecs extends Resource
@export var hero_class: HeroClass
@export var allowed_cards: Array[Card]
@export var waves: Array[WaveConfig]
@export var points_blocked: Array[int]

View File

@@ -0,0 +1 @@
uid://dalgif6huggwg

View File

@@ -25,7 +25,7 @@ static var target_type_names: Dictionary[TargetType, String] = {
} }
static var weapon_recharge_delay: float = 0.5 static var weapon_recharge_delay: float = 0.5
static var starting_blanks: int = 1 static var starting_blanks: int = 0
static var starting_cash: int = 15 static var starting_cash: int = 15
static var starting_lives: int = 144 static var starting_lives: int = 144
static var player_energy: int = 6 static var player_energy: int = 6
@@ -103,6 +103,7 @@ func load_mods(mod_list: Dictionary[String, bool]) -> void:
load_classes() load_classes()
load_cards("res://Cards") load_cards("res://Cards")
func _ready() -> void: func _ready() -> void:
var mod_dir: DirAccess = DirAccess.open("res://Mods") var mod_dir: DirAccess = DirAccess.open("res://Mods")
if mod_dir: if mod_dir:

View File

@@ -3,4 +3,4 @@ extends RefCounted
var enemy: Enemy = null var enemy: Enemy = null
var rarity: Data.Rarity = Data.Rarity.COMMON var count: int

View File

@@ -32,6 +32,12 @@ func _process(delta: float) -> void:
return return
for enemy: Enemy in enemy_spawn_timers: for enemy: Enemy in enemy_spawn_timers:
var enemy_code: int = -1
for enemy_in_pool: Enemy in game_manager.level.enemy_pool:
enemy_code += 1
if enemy.title == enemy_in_pool.title:
break
if enemies_spawned[enemy] == enemy_types_to_spawn[enemy]: if enemies_spawned[enemy] == enemy_types_to_spawn[enemy]:
continue continue
@@ -40,12 +46,15 @@ func _process(delta: float) -> void:
if enemy_spawn_timers[enemy] >= enemy.spawn_cooldown: if enemy_spawn_timers[enemy] >= enemy.spawn_cooldown:
if is_multiplayer_authority(): if is_multiplayer_authority():
if type == Data.EnemyType.LAND: if type == Data.EnemyType.LAND:
networked_spawn_land_enemy.rpc(game_manager.level.enemy_pool.find(enemy), own_id, enemy_id) #print(enemy)
#print(game_manager.level.enemy_pool[0])
#print("Finding " + enemy.title + " in enemy pool and sending to spawn with num " + str(enemy_code))
networked_spawn_land_enemy.rpc(enemy_code, own_id, enemy_id)
if type == Data.EnemyType.AIR: if type == Data.EnemyType.AIR:
var radius: float = 10.0 var radius: float = 10.0
var random_dir: Vector3 = Vector3(randf_range(-1, 1), randf_range(-1, 1), randf_range(-1, 1)) var random_dir: Vector3 = Vector3(randf_range(-1, 1), randf_range(-1, 1), randf_range(-1, 1))
var random_pos: Vector3 = randf_range(0, radius) * random_dir.normalized() var random_pos: Vector3 = randf_range(0, radius) * random_dir.normalized()
networked_spawn_air_enemy.rpc(game_manager.level.enemy_pool.find(enemy), random_pos, own_id, enemy_id) networked_spawn_air_enemy.rpc(enemy_code, random_pos, own_id, enemy_id)
enemy_spawn_timers[enemy] -= enemy.spawn_cooldown enemy_spawn_timers[enemy] -= enemy.spawn_cooldown
enemy_spawned.emit() enemy_spawned.emit()
@@ -58,6 +67,7 @@ func _process(delta: float) -> void:
@rpc("reliable", "call_local") @rpc("reliable", "call_local")
func networked_spawn_land_enemy(enemy_num: int, id1: int, id2: int) -> void: func networked_spawn_land_enemy(enemy_num: int, id1: int, id2: int) -> void:
var enemy: EnemyController var enemy: EnemyController
#print("Received spawn rpc code " + str(enemy_num) + " for " + game_manager.level.enemy_pool[enemy_num].title)
enemy = game_manager.level.enemy_pool[enemy_num].scene.instantiate() enemy = game_manager.level.enemy_pool[enemy_num].scene.instantiate()
enemy.stats = game_manager.level.enemy_pool[enemy_num] enemy.stats = game_manager.level.enemy_pool[enemy_num]
enemy.corpse_root = game_manager.level.corpses enemy.corpse_root = game_manager.level.corpses
@@ -116,22 +126,9 @@ func spawn_wave() -> void:
enemies_to_spawn = 0 enemies_to_spawn = 0
enemy_spawn_timers = {} enemy_spawn_timers = {}
for card: EnemyCard in current_wave: for card: EnemyCard in current_wave:
match(card.rarity): enemy_types_to_spawn[card.enemy] += card.count
Data.Rarity.COMMON: enemies_to_spawn += card.count
enemy_types_to_spawn[card.enemy] += card.enemy.common_group #print(card.enemy.title + ": " + str(card.count))
enemies_to_spawn += card.enemy.common_group
Data.Rarity.UNCOMMON:
enemy_types_to_spawn[card.enemy] += card.enemy.uncommon_group
enemies_to_spawn += card.enemy.uncommon_group
Data.Rarity.RARE:
enemy_types_to_spawn[card.enemy] += card.enemy.rare_group
enemies_to_spawn += card.enemy.rare_group
Data.Rarity.EPIC:
enemy_types_to_spawn[card.enemy] += card.enemy.epic_group
enemies_to_spawn += card.enemy.epic_group
Data.Rarity.LEGENDARY:
enemy_types_to_spawn[card.enemy] += card.enemy.legendary_group
enemies_to_spawn += card.enemy.legendary_group
enemy_spawn_timers[card.enemy] = 0.0 enemy_spawn_timers[card.enemy] = 0.0
enemies_spawned[card.enemy] = 0 enemies_spawned[card.enemy] = 0
current_wave = [] current_wave = []

View File

@@ -33,6 +33,7 @@ var shop_chance: float = 0.0
var stats: RoundStats var stats: RoundStats
var card_gameplay: bool = false var card_gameplay: bool = false
var level_layout: FlowFieldData var level_layout: FlowFieldData
var level_specs: LevelSpecs
#TODO: Create a reference to some generic Lobby object that wraps the multiplayer players list stuff #TODO: Create a reference to some generic Lobby object that wraps the multiplayer players list stuff
@@ -196,13 +197,22 @@ func set_wave_to_spawners(wave_thing: Wave, wave_number: int) -> void:
func set_upcoming_wave() -> void: func set_upcoming_wave() -> void:
if is_multiplayer_authority(): if is_multiplayer_authority():
var spawn_power: int = WaveManager.calculate_spawn_power(wave, connected_players_nodes.size()) if level_specs.waves.size() == 0:
#var new_wave: Dictionary = WaveManager.generate_wave(spawn_power, level.enemy_pool) var spawn_power: int = WaveManager.calculate_spawn_power(wave, connected_players_nodes.size())
var new_wave: Wave = WaveManager.generate_wave(spawn_power, level.enemy_pool) #var new_wave: Dictionary = WaveManager.generate_wave(spawn_power, level.enemy_pool)
#var new_wave: Wave = WaveManager.get_test_wave(level.enemy_pool) var new_wave: Wave = WaveManager.generate_wave(spawn_power, level.enemy_pool)
set_wave_to_spawners(new_wave, wave) set_wave_to_spawners(new_wave, wave)
temp_set_upcoming_wave(new_wave, WaveManager.calculate_pot(wave, connected_players_nodes.size())) temp_set_upcoming_wave(new_wave, WaveManager.calculate_pot(wave, connected_players_nodes.size()))
#networked_set_upcoming_wave.rpc(new_wave, 6 + floori(spawn_power / 70.0)) #networked_set_upcoming_wave.rpc(new_wave, 6 + floori(spawn_power / 70.0))
else:
var new_wave: Wave = Wave.new()
for enemy: Enemy in level_specs.waves[wave - 1].enemies.keys():
var enemy_card: EnemyCard = EnemyCard.new()
enemy_card.enemy = enemy
enemy_card.count = level_specs.waves[wave - 1].enemies[enemy]
new_wave.enemy_groups.append(enemy_card)
set_wave_to_spawners(new_wave, wave)
temp_set_upcoming_wave(new_wave, WaveManager.calculate_pot(wave, connected_players_nodes.size()))
func temp_set_upcoming_wave(new_wave: Wave, coins: int) -> void: func temp_set_upcoming_wave(new_wave: Wave, coins: int) -> void:
@@ -267,7 +277,9 @@ func end_wave() -> void:
var player: Hero = connected_players_nodes[peer_id] as Hero var player: Hero = connected_players_nodes[peer_id] as Hero
player.hud.set_wave_count(wave) player.hud.set_wave_count(wave)
player.currency += ceili(pot / connected_players_nodes.size()) player.currency += ceili(pot / connected_players_nodes.size())
player.currency += level_specs.waves[wave - 1].bonus_cash
player.energy = Data.player_energy player.energy = Data.player_energy
player.blank_cassettes += 1 if level_specs.waves[wave - 1].rewards_blank_cassette else 0
#if wave % 2 == 0: #if wave % 2 == 0:
# player.blank_cassettes += 1 # player.blank_cassettes += 1
if card_gameplay: if card_gameplay:
@@ -281,11 +293,13 @@ func end_wave() -> void:
#tower_base.enable_duration_sprites() #tower_base.enable_duration_sprites()
tower_base.iterate_duration() tower_base.iterate_duration()
if is_multiplayer_authority(): if is_multiplayer_authority():
if NoiseRandom.randf_in_range(23 * wave, 0.0, 1.0) <= shop_chance: if level_specs.waves[wave - 1].new_shop:
networked_spawn_shop.rpc() networked_spawn_shop.rpc()
shop_chance = 0.0 #if NoiseRandom.randf_in_range(23 * wave, 0.0, 1.0) <= shop_chance:
else: #networked_spawn_shop.rpc()
shop_chance += 0.09 #shop_chance = 0.0
#else:
#shop_chance += 0.09
wave_finished.emit() wave_finished.emit()
set_upcoming_wave() set_upcoming_wave()
@@ -319,6 +333,7 @@ func setup() -> void:
objective_health = Data.starting_lives objective_health = Data.starting_lives
wave = 1 wave = 1
stats = RoundStats.new() stats = RoundStats.new()
wave_limit = level_specs.waves.size()
game_setup.emit() game_setup.emit()
@@ -352,7 +367,7 @@ func start() -> void:
#Start game #Start game
game_active = true game_active = true
chatbox.append_message("SERVER", Color.TOMATO, "Started with seed: " + str(NoiseRandom.noise.seed)) chatbox.append_message("SERVER", Color.TOMATO, "Started with seed: " + str(NoiseRandom.noise.seed))
networked_spawn_shop.rpc() #networked_spawn_shop.rpc()
game_started.emit() game_started.emit()

View File

@@ -11,7 +11,7 @@ extends Node3D
@export var printer: CardPrinter @export var printer: CardPrinter
@export var shop: ShopStand @export var shop: ShopStand
@export var obstacle_scenes: Array[PackedScene] @export var obstacle_scenes: Array[PackedScene]
@export var obstacles: Array[PackedScene]
var walls: Dictionary[FlowNode, TowerBase] = {} var walls: Dictionary[FlowNode, TowerBase] = {}
var wall_id: int = 0 var wall_id: int = 0
var tower_base_scene: PackedScene = load("res://Scenes/TowerBase/tower_base.tscn") var tower_base_scene: PackedScene = load("res://Scenes/TowerBase/tower_base.tscn")

View File

@@ -9,16 +9,7 @@ func to_dict() -> Dictionary:
var dict: Dictionary = {} var dict: Dictionary = {}
for group: EnemyCard in enemy_groups: for group: EnemyCard in enemy_groups:
var enemy_count: int = 0 var enemy_count: int = 0
if group.rarity == Data.Rarity.COMMON: enemy_count = group.count
enemy_count = group.enemy.common_group
elif group.rarity == Data.Rarity.UNCOMMON:
enemy_count = group.enemy.uncommon_group
elif group.rarity == Data.Rarity.RARE:
enemy_count = group.enemy.rare_group
elif group.rarity == Data.Rarity.EPIC:
enemy_count = group.enemy.epic_group
elif group.rarity == Data.Rarity.LEGENDARY:
enemy_count = group.enemy.legendary_group
if !dict.has(group.enemy.title): if !dict.has(group.enemy.title):
dict[group.enemy.title] = 0 dict[group.enemy.title] = 0
dict[group.enemy.title] += enemy_count dict[group.enemy.title] += enemy_count

7
Scripts/wave_config.gd Normal file
View File

@@ -0,0 +1,7 @@
class_name WaveConfig extends Resource
@export var enemies: Dictionary[Enemy, int]
@export var station: Data.Rarity
@export var new_shop: bool
@export var rewards_blank_cassette: bool
@export var bonus_cash: int

View File

@@ -0,0 +1 @@
uid://bp6q371iypd06

View File

@@ -0,0 +1,30 @@
class_name MainMenuLevelSelector extends PanelContainer
signal level_selected(specs: LevelSpecs)
var side: int = 0
@export var levels: Array[LevelSpecs] = []
func _on_button_pressed() -> void:
side = 0
$VBoxContainer/Label.text = "Standard Campaign Mode"
func _on_button_2_pressed() -> void:
side = 1
$VBoxContainer/Label.text = "Endless Mode with random waves and all unlocked equipment"
func _ready() -> void:
var i: int = 0
for level: LevelSpecs in levels:
i += 1
var button: Button = Button.new()
button.text = "Level " + str(i)
$VBoxContainer.add_child(button)
button.pressed.connect(start_level.bind(i - 1))
func start_level(level: int) -> void:
level_selected.emit(levels[level])

View File

@@ -0,0 +1 @@
uid://bwsw4oq150v3p

View File

@@ -104,6 +104,7 @@ func open_game_menu() -> void:
func _on_back_button_pressed() -> void: func _on_back_button_pressed() -> void:
main_controls.visible = true main_controls.visible = true
game_select_menu.visible = false game_select_menu.visible = false
func generate_seed() -> void: func generate_seed() -> void:
@@ -117,6 +118,14 @@ func generate_seed() -> void:
gamemode.rng_seed = randi() gamemode.rng_seed = randi()
func level_selected(level: LevelSpecs) -> void:
generate_seed()
gamemode.endless = false
gamemode.daily = false
game.level_specs = level
start_game()
func _on_standard_button_pressed() -> void: func _on_standard_button_pressed() -> void:
generate_seed() generate_seed()
gamemode.endless = false gamemode.endless = false

View File

@@ -2,6 +2,10 @@
[ext_resource type="Script" uid="uid://ci8vq73u23viy" path="res://UI/Menus/MainMenu/main_menu.gd" id="2_ivytu"] [ext_resource type="Script" uid="uid://ci8vq73u23viy" path="res://UI/Menus/MainMenu/main_menu.gd" id="2_ivytu"]
[ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://UI/drop_003.ogg" id="5_cwn2i"] [ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://UI/drop_003.ogg" id="5_cwn2i"]
[ext_resource type="Script" uid="uid://bwsw4oq150v3p" path="res://UI/Menus/MainMenu/level_selecter_main_menu.gd" id="8_qshe4"]
[ext_resource type="Script" uid="uid://dalgif6huggwg" path="res://Scripts/Resources/level_specs.gd" id="9_nt3t4"]
[ext_resource type="Resource" uid="uid://b67b70x1uf2el" path="res://Level1/specs.tres" id="10_kjkav"]
[ext_resource type="Resource" uid="uid://dffoufw4bnfn7" path="res://Level2/specs.tres" id="11_kjkav"]
[ext_resource type="Texture2D" uid="uid://cr1ucbuw3iotp" path="res://Assets/Textures/first_win_achievements.png" id="15_74epv"] [ext_resource type="Texture2D" uid="uid://cr1ucbuw3iotp" path="res://Assets/Textures/first_win_achievements.png" id="15_74epv"]
[ext_resource type="Script" uid="uid://cjr0pbqisd51v" path="res://UI/Menus/MainMenu/achievements_menu.gd" id="15_sv1gy"] [ext_resource type="Script" uid="uid://cjr0pbqisd51v" path="res://UI/Menus/MainMenu/achievements_menu.gd" id="15_sv1gy"]
[ext_resource type="Texture2D" uid="uid://cpa1hl36xfplg" path="res://Assets/Textures/first_scroll_seen.png" id="16_sv1gy"] [ext_resource type="Texture2D" uid="uid://cpa1hl36xfplg" path="res://Assets/Textures/first_scroll_seen.png" id="16_sv1gy"]
@@ -33,8 +37,7 @@ anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("2_ivytu") script = ExtResource("2_ivytu")
bg_level = NodePath("") game_select_menu = NodePath("PanelContainer")
game_select_menu = NodePath("GameSelectMenu")
main_controls = NodePath("MainControls") main_controls = NodePath("MainControls")
seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit") seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit")
profile_controls = NodePath("ProfileManager") profile_controls = NodePath("ProfileManager")
@@ -424,6 +427,49 @@ text = "BUTTON_CANCEL"
layout_mode = 2 layout_mode = 2
text = "BUTTON_CONFIRM" text = "BUTTON_CONFIRM"
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=1673631030]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -6.0
offset_top = -6.0
offset_right = 6.0
offset_bottom = 6.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("8_qshe4")
levels = Array[ExtResource("9_nt3t4")]([ExtResource("10_kjkav"), ExtResource("11_kjkav")])
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer" unique_id=507718308]
layout_mode = 2
[node name="Button" type="Button" parent="PanelContainer/VBoxContainer" unique_id=2127573853]
layout_mode = 2
size_flags_horizontal = 0
text = "BUTTON_BACK"
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer" unique_id=654891125]
layout_mode = 2
text = "Standard Campaign Mode"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer" unique_id=776357424]
layout_mode = 2
alignment = 1
[node name="Button" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=1722538738]
layout_mode = 2
text = "A-SIDE"
[node name="Button2" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer" unique_id=708845101]
layout_mode = 2
text = "B-SIDE"
[connection signal="mouse_entered" from="MainControls/PlayButton" to="." method="_on_button_mouse_entered"] [connection signal="mouse_entered" from="MainControls/PlayButton" to="." method="_on_button_mouse_entered"]
[connection signal="pressed" from="MainControls/PlayButton" to="." method="_on_play_button_pressed"] [connection signal="pressed" from="MainControls/PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="mouse_entered" from="MainControls/ModsButton" to="." method="_on_button_mouse_entered"] [connection signal="mouse_entered" from="MainControls/ModsButton" to="." method="_on_button_mouse_entered"]
@@ -445,3 +491,7 @@ text = "BUTTON_CONFIRM"
[connection signal="pressed" from="AchievementsMenu/VBoxContainer/HBoxContainer/Button" to="." method="_on_achievements_back_button_pressed"] [connection signal="pressed" from="AchievementsMenu/VBoxContainer/HBoxContainer/Button" to="." method="_on_achievements_back_button_pressed"]
[connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/CancelMods" to="." method="_on_cancel_mods_pressed"] [connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/CancelMods" to="." method="_on_cancel_mods_pressed"]
[connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/ConfirmMods" to="." method="_on_confirm_mods_pressed"] [connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/ConfirmMods" to="." method="_on_confirm_mods_pressed"]
[connection signal="level_selected" from="PanelContainer" to="." method="level_selected"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Button" to="." method="_on_back_button_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/Button" to="PanelContainer" method="_on_button_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/Button2" to="PanelContainer" method="_on_button_2_pressed"]

View File

@@ -7,6 +7,7 @@
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="4_uh5sr"] [ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="4_uh5sr"]
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="5_g08yk"] [ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="5_g08yk"]
[ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="6_asmpj"] [ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="6_asmpj"]
[ext_resource type="PackedScene" uid="uid://d1gauy86jxpnj" path="res://BrickPile/brick_pile.tscn" id="7_6tcu8"]
[ext_resource type="PackedScene" uid="uid://1b2ikdanl66b" path="res://Scenes/CardPrinter/card_printer.tscn" id="9_r25gu"] [ext_resource type="PackedScene" uid="uid://1b2ikdanl66b" path="res://Scenes/CardPrinter/card_printer.tscn" id="9_r25gu"]
[ext_resource type="Script" uid="uid://cxwtuxytavfu5" path="res://Scripts/enemy_goal.gd" id="9_s3rd7"] [ext_resource type="Script" uid="uid://cxwtuxytavfu5" path="res://Scripts/enemy_goal.gd" id="9_s3rd7"]
[ext_resource type="Script" uid="uid://yk54owkf7pgj" path="res://Scripts/cinema_cam.gd" id="9_xuyhn"] [ext_resource type="Script" uid="uid://yk54owkf7pgj" path="res://Scripts/cinema_cam.gd" id="9_xuyhn"]
@@ -247,7 +248,7 @@ size = Vector2(7.84, 3.69)
[node name="Bridge" type="Node3D" unique_id=1906077552 node_paths=PackedStringArray("tower_path", "player_spawns", "enemy_spawns", "enemy_goals", "corpses", "cinematic_cam", "printer", "shop")] [node name="Bridge" type="Node3D" unique_id=1906077552 node_paths=PackedStringArray("tower_path", "player_spawns", "enemy_spawns", "enemy_goals", "corpses", "cinematic_cam", "printer", "shop")]
script = ExtResource("1_ws6nn") script = ExtResource("1_ws6nn")
enemy_pool = Array[ExtResource("2_ks6qx")]([ExtResource("3_6tcu8"), ExtResource("4_uh5sr"), ExtResource("5_g08yk"), ExtResource("6_asmpj")]) enemy_pool = Array[ExtResource("2_ks6qx")]([ExtResource("3_6tcu8"), ExtResource("6_asmpj"), ExtResource("5_g08yk"), ExtResource("4_uh5sr")])
tower_path = NodePath("Towers") tower_path = NodePath("Towers")
player_spawns = [NodePath("PlayerSpawnLocations/PlayerSpawn1"), NodePath("PlayerSpawnLocations/PlayerSpawn2"), NodePath("PlayerSpawnLocations/PlayerSpawn3"), NodePath("PlayerSpawnLocations/PlayerSpawn4")] player_spawns = [NodePath("PlayerSpawnLocations/PlayerSpawn1"), NodePath("PlayerSpawnLocations/PlayerSpawn2"), NodePath("PlayerSpawnLocations/PlayerSpawn3"), NodePath("PlayerSpawnLocations/PlayerSpawn4")]
enemy_spawns = [NodePath("GroundSpawn"), NodePath("GroundSpawn2"), NodePath("GroundSpawn3"), NodePath("GroundSpawn4"), NodePath("GroundSpawn5"), NodePath("AirSpawn")] enemy_spawns = [NodePath("GroundSpawn"), NodePath("GroundSpawn2"), NodePath("GroundSpawn3"), NodePath("GroundSpawn4"), NodePath("GroundSpawn5"), NodePath("AirSpawn")]
@@ -256,6 +257,7 @@ corpses = NodePath("Corpses")
cinematic_cam = NodePath("CinemaCam") cinematic_cam = NodePath("CinemaCam")
printer = NodePath("CardPrinter") printer = NodePath("CardPrinter")
shop = NodePath("ShopStand") shop = NodePath("ShopStand")
obstacles = Array[PackedScene]([ExtResource("7_6tcu8")])
metadata/_custom_type_script = "uid://cvejbo3srx8py" metadata/_custom_type_script = "uid://cvejbo3srx8py"
metadata/_editor_floor_ = Vector3(4, -10, 8) metadata/_editor_floor_ = Vector3(4, -10, 8)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bx1fk6yke4k4o"
path="res://.godot/imported/cassette_test_image-export.png-7e83f82ae1d195bed706ada854536b41.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://cassette_test_image-export.png"
dest_files=["res://.godot/imported/cassette_test_image-export.png-7e83f82ae1d195bed706ada854536b41.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

18
floating_element.gd Normal file
View File

@@ -0,0 +1,18 @@
class_name FloatingElement extends MarginContainer
var dest: Vector2 = Vector2.ZERO
var velocity: Vector2 = Vector2.ZERO
var acceleration: float = 3.0
var max_speed: float = 30.0
func _process(delta: float) -> void:
#var direction: Vector2 = (dest - position).normalized()
#velocity += direction * acceleration
#velocity = velocity.limit_length(max_speed)
#position += velocity * delta
position = position.lerp(dest, 15.0 * delta)
func set_text(text: String) -> void:
$Label.text = text

1
floating_element.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://c4clky2q4uxm8

26
floating_element.tscn Normal file
View File

@@ -0,0 +1,26 @@
[gd_scene format=3 uid="uid://d2vsrj65smnv6"]
[ext_resource type="Script" uid="uid://c4clky2q4uxm8" path="res://floating_element.gd" id="1_jnblp"]
[ext_resource type="Texture2D" uid="uid://bx1fk6yke4k4o" path="res://cassette_test_image-export.png" id="2_mjx08"]
[node name="Control" type="MarginContainer" unique_id=1662494820]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_jnblp")
[node name="TextureRect" type="TextureRect" parent="." unique_id=1181502411]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2_mjx08")
stretch_mode = 5
[node name="Label" type="Label" parent="." unique_id=228649740]
layout_mode = 2
size_flags_horizontal = 4
text = "LEVEL 0"
horizontal_alignment = 1
vertical_alignment = 1

30
lavel_sel.tscn Normal file
View File

@@ -0,0 +1,30 @@
[gd_scene format=3 uid="uid://bxdr8webgx483"]
[ext_resource type="Script" uid="uid://dlhwckf6tnx2p" path="res://level_select.gd" id="1_eshvk"]
[ext_resource type="Texture2D" uid="uid://p0dxw3i45wor" path="res://wrench.png" id="2_ce83v"]
[ext_resource type="Texture2D" uid="uid://doexsqcmd58yh" path="res://wand.png" id="3_veguw"]
[ext_resource type="Texture2D" uid="uid://dlrmfamsk3cr2" path="res://tool3.png" id="4_ro7qf"]
[ext_resource type="Texture2D" uid="uid://c4ck0kcqrvm2a" path="res://tool4.png" id="5_43akl"]
[ext_resource type="Texture2D" uid="uid://bx1fk6yke4k4o" path="res://cassette_test_image-export.png" id="6_veguw"]
[ext_resource type="PackedScene" uid="uid://d2vsrj65smnv6" path="res://floating_element.tscn" id="7_ro7qf"]
[node name="Control" type="Control" unique_id=444351615]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_eshvk")
icons = Array[Texture]([ExtResource("2_ce83v"), ExtResource("3_veguw"), ExtResource("4_ro7qf"), ExtResource("5_43akl")])
cassette_image = ExtResource("6_veguw")
level_scene = ExtResource("7_ro7qf")
[node name="Label" type="Label" parent="." unique_id=1955641701]
layout_mode = 0
offset_left = 73.0
offset_top = 83.0
offset_right = 113.0
offset_bottom = 91.0
horizontal_alignment = 1
vertical_alignment = 1

99
level_select.gd Normal file
View File

@@ -0,0 +1,99 @@
class_name MenuLevelSelect extends Control
@export var icons: Array[Texture] = []
@export var cassette_image: Texture
var biomes: Dictionary[String, HBoxContainer] = {}
var selected_biome: String = ""
var levels: Array[FloatingElement] = []
@export var level_scene: PackedScene
func _ready() -> void:
#create_classes()
make_level_labels()
func make_level_labels() -> void:
for x: int in 10:
var margin: FloatingElement = level_scene.instantiate() as FloatingElement
add_child(margin)
levels.append(margin)
margin.set_text("Level " + str(x))
margin.dest = Vector2(x * 50.0, 0.0)
func move_right() -> void:
for x: FloatingElement in levels:
x.dest += (Vector2.LEFT * 50.0)
func move_left() -> void:
for x: FloatingElement in levels:
x.dest += (Vector2.RIGHT * 50.0)
func create_classes() -> void:
var centre: Vector2 = Vector2(get_viewport_rect().size.x / 2.0, get_viewport_rect().size.y / 2.0)
biomes["Engineer"] = create_sprite("Engineer", icons[0])
biomes["Engineer"].set_position(centre + Vector2(-32.0, 0.0 - 32.0))
biomes["Mage"] = create_sprite("Mage", icons[1])
biomes["Mage"].set_position(centre + Vector2(-32.0, 80.0 - 32.0))
biomes["ThirdClass"] = create_sprite("ThirdClass", icons[2])
biomes["ThirdClass"].set_position(centre + Vector2(-32.0, 160.0 - 32.0))
biomes["FourthClass"] = create_sprite("FourthClass", icons[3])
biomes["FourthClass"].set_position(centre + Vector2(-32.0, 240.0 - 32.0))
selected_biome = "Engineer"
$Label.text = selected_biome
func move_down() -> void:
for x: HBoxContainer in biomes.values():
var tween: Tween = create_tween()
tween.tween_property(x, "position", x.position + Vector2(0.0, -80.0), 0.3)
var y: int = biomes.keys().find(selected_biome)
if y + 1 >= biomes.keys().size():
y = -1
selected_biome = biomes.keys()[y + 1]
$Label.text = selected_biome
func move_up() -> void:
for x: HBoxContainer in biomes.values():
var tween: Tween = create_tween()
tween.tween_property(x, "position", x.position + Vector2(0.0, 80.0), 0.3)
var y: int = biomes.keys().find(selected_biome)
if y - 1 < 0:
y = biomes.keys().size()
selected_biome = biomes.keys()[y - 1]
$Label.text = selected_biome
func _process(delta: float) -> void:
if Input.is_action_just_pressed("Move Backward"):
move_down()
if Input.is_action_just_pressed("Move Forward"):
move_up()
if Input.is_action_just_pressed("Move Right"):
move_right()
if Input.is_action_just_pressed("Move Left"):
move_left()
func create_sprite(text: String, icon: Texture) -> HBoxContainer:
var hbox: HBoxContainer = HBoxContainer.new()
var sprite: TextureRect = TextureRect.new()
var label: Label = Label.new()
add_child(hbox)
hbox.add_child(sprite)
hbox.add_child(label)
label.text = text
sprite.texture = icon
return hbox

1
level_select.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://dlhwckf6tnx2p

BIN
tool3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

40
tool3.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dlrmfamsk3cr2"
path="res://.godot/imported/tool3.png-f2dc4d1dc31e25861ec3b12ecbaefc22.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tool3.png"
dest_files=["res://.godot/imported/tool3.png-f2dc4d1dc31e25861ec3b12ecbaefc22.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
tool4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

40
tool4.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c4ck0kcqrvm2a"
path="res://.godot/imported/tool4.png-9bee59f280ae6fd1b68a8ec453f902a2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tool4.png"
dest_files=["res://.godot/imported/tool4.png-9bee59f280ae6fd1b68a8ec453f902a2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
wand.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

40
wand.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://doexsqcmd58yh"
path="res://.godot/imported/wand.png-fe18440e78220c0866c5420a9025c37f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://wand.png"
dest_files=["res://.godot/imported/wand.png-fe18440e78220c0866c5420a9025c37f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

@@ -33,16 +33,7 @@ func set_waves(waves: Array[Wave], starting_wave_number: int) -> void:
func group_to_count(group: EnemyCard) -> int: func group_to_count(group: EnemyCard) -> int:
var count: int = 0 var count: int = 0
if group.rarity == Data.Rarity.COMMON: count = group.count
count += group.enemy.common_group
elif group.rarity == Data.Rarity.UNCOMMON:
count += group.enemy.uncommon_group
elif group.rarity == Data.Rarity.RARE:
count += group.enemy.rare_group
elif group.rarity == Data.Rarity.EPIC:
count += group.enemy.epic_group
elif group.rarity == Data.Rarity.LEGENDARY:
count += group.enemy.legendary_group
return count return count

BIN
wrench.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

40
wrench.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://p0dxw3i45wor"
path="res://.godot/imported/wrench.png-3fc6e657ff73e8f0e538027d00374a3e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://wrench.png"
dest_files=["res://.godot/imported/wrench.png-3fc6e657ff73e8f0e538027d00374a3e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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