diff --git a/Enemies/BabyEyeDog/baby_eye_dog.tscn b/Enemies/BabyEyeDog/baby_eye_dog.tscn index dd2f98a..dda9231 100644 --- a/Enemies/BabyEyeDog/baby_eye_dog.tscn +++ b/Enemies/BabyEyeDog/baby_eye_dog.tscn @@ -18,7 +18,7 @@ radius = 0.150315 [sub_resource type="ViewportTexture" id="ViewportTexture_1kwxq"] viewport_path = NodePath("SubViewport") -[node name="BabyEyeDog" type="CharacterBody3D" unique_id=1710427344 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n") groups=["Enemies"]] +[node name="BabyEyeDog" type="CharacterBody3D" unique_id=1710427344 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n", "health_bar") groups=["Enemies"]] collision_layer = 4 collision_mask = 0 script = ExtResource("1_8k5ts") @@ -26,6 +26,7 @@ status_manager = NodePath("StatusEffector") movement_controller = NodePath("PathingController") d_n = NodePath("Node3D") corpse_scene = ExtResource("2_vl30x") +health_bar = NodePath("SubViewport/HealthBar") metadata/_custom_type_script = "uid://ejqql2660u6h" [node name="Hitbox" type="CollisionShape3D" parent="." unique_id=351984421] diff --git a/Enemies/ElderEyeDog/elder_eye_dog.tscn b/Enemies/ElderEyeDog/elder_eye_dog.tscn index 7de085a..3ab1019 100644 --- a/Enemies/ElderEyeDog/elder_eye_dog.tscn +++ b/Enemies/ElderEyeDog/elder_eye_dog.tscn @@ -18,7 +18,7 @@ radius = 0.269705 [sub_resource type="ViewportTexture" id="ViewportTexture_1kwxq"] viewport_path = NodePath("SubViewport") -[node name="ElderEyeDog" type="CharacterBody3D" unique_id=1106613653 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n") groups=["Enemies"]] +[node name="ElderEyeDog" type="CharacterBody3D" unique_id=1106613653 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n", "health_bar") groups=["Enemies"]] collision_layer = 4 collision_mask = 0 script = ExtResource("1_17xxt") @@ -26,6 +26,7 @@ status_manager = NodePath("StatusEffector") movement_controller = NodePath("PathingController") d_n = NodePath("Node3D") corpse_scene = ExtResource("2_lirjc") +health_bar = NodePath("SubViewport/HealthBar") metadata/_custom_type_script = "uid://ejqql2660u6h" [node name="Hitbox" type="CollisionShape3D" parent="." unique_id=542685682] diff --git a/Enemies/EyeDog/eye_dog.tscn b/Enemies/EyeDog/eye_dog.tscn index 0097056..5eb9026 100644 --- a/Enemies/EyeDog/eye_dog.tscn +++ b/Enemies/EyeDog/eye_dog.tscn @@ -18,7 +18,7 @@ radius = 0.25 [sub_resource type="ViewportTexture" id="ViewportTexture_1kwxq"] viewport_path = NodePath("SubViewport") -[node name="EyeDog" type="CharacterBody3D" unique_id=1016179251 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n") groups=["Enemies"]] +[node name="EyeDog" type="CharacterBody3D" unique_id=1016179251 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n", "health_bar") groups=["Enemies"]] collision_layer = 4 collision_mask = 0 script = ExtResource("1_1dh2f") @@ -26,6 +26,7 @@ status_manager = NodePath("StatusEffector") movement_controller = NodePath("PathingController") d_n = NodePath("Node3D") corpse_scene = ExtResource("2_1dh2f") +health_bar = NodePath("SubViewport/HealthBar") metadata/_custom_type_script = "uid://ejqql2660u6h" [node name="Hitbox" type="CollisionShape3D" parent="." unique_id=1815903905] diff --git a/Gauntlet/gauntlet.glb b/Gauntlet/gauntlet.glb index e232bcf..902cb72 100644 Binary files a/Gauntlet/gauntlet.glb and b/Gauntlet/gauntlet.glb differ diff --git a/Gauntlet/gauntlet.glb.import b/Gauntlet/gauntlet.glb.import index 06e48a8..34c66d9 100644 --- a/Gauntlet/gauntlet.glb.import +++ b/Gauntlet/gauntlet.glb.import @@ -43,6 +43,11 @@ _subresources={ "use_external/enabled": true, "use_external/fallback_path": "res://Gauntlet/gauntlet_mat.tres", "use_external/path": "uid://b2rsi4vlkfpp1" +}, +"steel1": { +"use_external/enabled": true, +"use_external/fallback_path": "res://Materials/metal2/metal2.tres", +"use_external/path": "uid://cjvmf0bl70x6q" } }, "meshes": { @@ -72,15 +77,6 @@ _subresources={ "save_to_file/enabled": false, "save_to_file/fallback_path": "", "save_to_file/path": "" -}, -"gauntlet_Plane_005": { -"generate/lightmap_uv": 0, -"generate/lods": 2, -"generate/shadow_meshes": 0, -"lods/normal_merge_angle": 20.0, -"save_to_file/enabled": false, -"save_to_file/fallback_path": "", -"save_to_file/path": "" } } } diff --git a/Gauntlet/gauntlet_cassette_tex.png b/Gauntlet/gauntlet_cassette_tex.png deleted file mode 100644 index 7da6f77..0000000 Binary files a/Gauntlet/gauntlet_cassette_tex.png and /dev/null differ diff --git a/Gauntlet/gauntlet_gauntlet_test_sprite.png b/Gauntlet/gauntlet_gauntlet_test_sprite.png deleted file mode 100644 index a94ae34..0000000 Binary files a/Gauntlet/gauntlet_gauntlet_test_sprite.png and /dev/null differ diff --git a/Gauntlet/gauntlet_mat.tres b/Gauntlet/gauntlet_mat.tres deleted file mode 100644 index 5eca275..0000000 --- a/Gauntlet/gauntlet_mat.tres +++ /dev/null @@ -1,12 +0,0 @@ -[gd_resource type="ShaderMaterial" format=3 uid="uid://b2rsi4vlkfpp1"] - -[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_i1hsh"] -[ext_resource type="Texture2D" uid="uid://b5es3jtoiurk0" path="res://Gauntlet/gauntlet_gauntlet_test_sprite.png" id="2_vslqm"] - -[resource] -render_priority = 0 -shader = ExtResource("1_i1hsh") -shader_parameter/albedo = ExtResource("2_vslqm") -shader_parameter/jitter_z_coordinate = true -shader_parameter/jitter_depth_independent = true -shader_parameter/alpha_scissor = 1.0 diff --git a/Levels/Level2/specs.tres b/Levels/Level2/specs.tres index 2b061f4..2a6d7ba 100644 --- a/Levels/Level2/specs.tres +++ b/Levels/Level2/specs.tres @@ -18,6 +18,8 @@ [resource] script = ExtResource("2_y3kr2") +author = "PuppyFruitGames" +display_title = "Air Supply" 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_movdo"), ExtResource("9_w257w"), ExtResource("10_pdy4r"), ExtResource("11_526a4"), ExtResource("12_ebu2p"), ExtResource("13_o6362"), ExtResource("14_41aj4")]) diff --git a/Levels/Level3/specs.tres b/Levels/Level3/specs.tres index cc64fbe..a89fb77 100644 --- a/Levels/Level3/specs.tres +++ b/Levels/Level3/specs.tres @@ -18,6 +18,8 @@ [resource] script = ExtResource("5_kje1i") +author = "PuppyFruitGames" +display_title = "Cave" hero_class = ExtResource("4_5rrxx") allowed_cards = Array[ExtResource("1_ldkvi")]([ExtResource("2_0atj5"), ExtResource("3_sbxeq")]) waves = Array[ExtResource("6_gmv8c")]([ExtResource("7_43tyk"), ExtResource("8_2vql2"), ExtResource("9_e67hj"), ExtResource("10_vhtpf"), ExtResource("11_j5x11"), ExtResource("12_eb1oa"), ExtResource("13_j6jup"), ExtResource("14_xhn8o")]) diff --git a/Materials/cobblestone1/cobblestone1.png b/Materials/cobblestone1/cobblestone1.png index 3b52b6e..920ea0b 100644 Binary files a/Materials/cobblestone1/cobblestone1.png and b/Materials/cobblestone1/cobblestone1.png differ diff --git a/Materials/metal1/metal1.png b/Materials/metal1/metal1.png new file mode 100644 index 0000000..2a3ca09 Binary files /dev/null and b/Materials/metal1/metal1.png differ diff --git a/Materials/steel1/steel1.png.import b/Materials/metal1/metal1.png.import similarity index 77% rename from Materials/steel1/steel1.png.import rename to Materials/metal1/metal1.png.import index b9c5c6b..fea35a6 100644 --- a/Materials/steel1/steel1.png.import +++ b/Materials/metal1/metal1.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://d02g31nntdjmw" -path.s3tc="res://.godot/imported/steel1.png-d0dcb8e6e826656ba1df13b87e80980f.s3tc.ctex" +path.s3tc="res://.godot/imported/metal1.png-1e36fb3393ddf15ee8a2fe4d745beb90.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://Materials/steel1/steel1.png" -dest_files=["res://.godot/imported/steel1.png-d0dcb8e6e826656ba1df13b87e80980f.s3tc.ctex"] +source_file="res://Materials/metal1/metal1.png" +dest_files=["res://.godot/imported/metal1.png-1e36fb3393ddf15ee8a2fe4d745beb90.s3tc.ctex"] [params] diff --git a/Materials/steel1/steel1.tres b/Materials/metal1/metal1.tres similarity index 91% rename from Materials/steel1/steel1.tres rename to Materials/metal1/metal1.tres index 1d13f92..4a87c43 100644 --- a/Materials/steel1/steel1.tres +++ b/Materials/metal1/metal1.tres @@ -1,7 +1,7 @@ [gd_resource type="ShaderMaterial" format=3 uid="uid://qq11jacogcec"] [ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_raav3"] -[ext_resource type="Texture2D" uid="uid://d02g31nntdjmw" path="res://Materials/steel1/steel1.png" id="2_r3yqm"] +[ext_resource type="Texture2D" uid="uid://d02g31nntdjmw" path="res://Materials/metal1/metal1.png" id="2_r3yqm"] [resource] render_priority = 0 diff --git a/Materials/metal2/metal2.png b/Materials/metal2/metal2.png new file mode 100644 index 0000000..006af9c Binary files /dev/null and b/Materials/metal2/metal2.png differ diff --git a/Materials/metal2/metal2.png.import b/Materials/metal2/metal2.png.import new file mode 100644 index 0000000..5340df7 --- /dev/null +++ b/Materials/metal2/metal2.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqyco3cfvkj2d" +path.s3tc="res://.godot/imported/metal2.png-6f742cc96006a659b050c64d83e6c232.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Materials/metal2/metal2.png" +dest_files=["res://.godot/imported/metal2.png-6f742cc96006a659b050c64d83e6c232.s3tc.ctex"] + +[params] + +compress/mode=2 +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 diff --git a/Materials/metal2/metal2.tres b/Materials/metal2/metal2.tres new file mode 100644 index 0000000..c3b394f --- /dev/null +++ b/Materials/metal2/metal2.tres @@ -0,0 +1,12 @@ +[gd_resource type="ShaderMaterial" format=3 uid="uid://cjvmf0bl70x6q"] + +[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_bk5kp"] +[ext_resource type="Texture2D" uid="uid://cqyco3cfvkj2d" path="res://Materials/metal2/metal2.png" id="2_at70c"] + +[resource] +render_priority = 0 +shader = ExtResource("1_bk5kp") +shader_parameter/albedo = ExtResource("2_at70c") +shader_parameter/jitter_z_coordinate = true +shader_parameter/jitter_depth_independent = true +shader_parameter/alpha_scissor = 1.0 diff --git a/Materials/metal3/metal3.png b/Materials/metal3/metal3.png new file mode 100644 index 0000000..e2cafab Binary files /dev/null and b/Materials/metal3/metal3.png differ diff --git a/Materials/metal3/metal3.png.import b/Materials/metal3/metal3.png.import new file mode 100644 index 0000000..8d65b11 --- /dev/null +++ b/Materials/metal3/metal3.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dm0b3amlvatr2" +path.s3tc="res://.godot/imported/metal3.png-0cfca017b843cba9d7bf57296f81cfac.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Materials/metal3/metal3.png" +dest_files=["res://.godot/imported/metal3.png-0cfca017b843cba9d7bf57296f81cfac.s3tc.ctex"] + +[params] + +compress/mode=2 +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 diff --git a/Materials/metal3/metal3.tres b/Materials/metal3/metal3.tres new file mode 100644 index 0000000..86d2512 --- /dev/null +++ b/Materials/metal3/metal3.tres @@ -0,0 +1,12 @@ +[gd_resource type="ShaderMaterial" format=3 uid="uid://bte8u8o37f5mf"] + +[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_2d3p0"] +[ext_resource type="Texture2D" uid="uid://dm0b3amlvatr2" path="res://Materials/metal3/metal3.png" id="2_p4hyf"] + +[resource] +render_priority = 0 +shader = ExtResource("1_2d3p0") +shader_parameter/albedo = ExtResource("2_p4hyf") +shader_parameter/jitter_z_coordinate = true +shader_parameter/jitter_depth_independent = true +shader_parameter/alpha_scissor = 1.0 diff --git a/Materials/metal4/metal4.png b/Materials/metal4/metal4.png new file mode 100644 index 0000000..38befe7 Binary files /dev/null and b/Materials/metal4/metal4.png differ diff --git a/Materials/metal4/metal4.png.import b/Materials/metal4/metal4.png.import new file mode 100644 index 0000000..b75f43c --- /dev/null +++ b/Materials/metal4/metal4.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dt2ubnnfdcykk" +path.s3tc="res://.godot/imported/metal4.png-db412f5b429b6ba79691ae646cb6f861.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Materials/metal4/metal4.png" +dest_files=["res://.godot/imported/metal4.png-db412f5b429b6ba79691ae646cb6f861.s3tc.ctex"] + +[params] + +compress/mode=2 +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 diff --git a/Materials/metal4/metal4.tres b/Materials/metal4/metal4.tres new file mode 100644 index 0000000..df5866a --- /dev/null +++ b/Materials/metal4/metal4.tres @@ -0,0 +1,12 @@ +[gd_resource type="ShaderMaterial" format=3 uid="uid://dse5i3rqndtrf"] + +[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_p857d"] +[ext_resource type="Texture2D" uid="uid://dt2ubnnfdcykk" path="res://Materials/metal4/metal4.png" id="2_gev3n"] + +[resource] +render_priority = 0 +shader = ExtResource("1_p857d") +shader_parameter/albedo = ExtResource("2_gev3n") +shader_parameter/jitter_z_coordinate = true +shader_parameter/jitter_depth_independent = true +shader_parameter/alpha_scissor = 1.0 diff --git a/Materials/steel1/steel1.png b/Materials/steel1/steel1.png deleted file mode 100644 index b05997b..0000000 Binary files a/Materials/steel1/steel1.png and /dev/null differ diff --git a/Materials/wood2/wood2.png b/Materials/wood2/wood2.png new file mode 100644 index 0000000..95d802a Binary files /dev/null and b/Materials/wood2/wood2.png differ diff --git a/Materials/wood2/wood2.png.import b/Materials/wood2/wood2.png.import new file mode 100644 index 0000000..c027b43 --- /dev/null +++ b/Materials/wood2/wood2.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4g8dpvrrua6x" +path.s3tc="res://.godot/imported/wood2.png-6430169410047c3db7cf84bc7baf0df3.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Materials/wood2/wood2.png" +dest_files=["res://.godot/imported/wood2.png-6430169410047c3db7cf84bc7baf0df3.s3tc.ctex"] + +[params] + +compress/mode=2 +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 diff --git a/Materials/wood2/wood2.tres b/Materials/wood2/wood2.tres new file mode 100644 index 0000000..a6bff32 --- /dev/null +++ b/Materials/wood2/wood2.tres @@ -0,0 +1,12 @@ +[gd_resource type="ShaderMaterial" format=3 uid="uid://bxmmwv17kc3uw"] + +[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_erulm"] +[ext_resource type="Texture2D" uid="uid://b4g8dpvrrua6x" path="res://Materials/wood2/wood2.png" id="2_ylktm"] + +[resource] +render_priority = 0 +shader = ExtResource("1_erulm") +shader_parameter/albedo = ExtResource("2_ylktm") +shader_parameter/jitter_z_coordinate = true +shader_parameter/jitter_depth_independent = true +shader_parameter/alpha_scissor = 1.0 diff --git a/PCs/FSM/building_state.gd b/PCs/FSM/building_state.gd index bb7a218..8a30120 100644 --- a/PCs/FSM/building_state.gd +++ b/PCs/FSM/building_state.gd @@ -48,3 +48,5 @@ func process_state(_delta: float) -> void: hero.unready_self() else: hero.ready_self() + if !hero.game_manager and Input.is_action_just_pressed("Ready"): + hero.enter_fighting_state() diff --git a/PCs/FSM/carding_state.gd b/PCs/FSM/carding_state.gd index 17a0c7c..1b59d29 100644 --- a/PCs/FSM/carding_state.gd +++ b/PCs/FSM/carding_state.gd @@ -74,6 +74,8 @@ func process_state(_delta: float) -> void: hero.unready_self() else: hero.ready_self() + if !hero.game_manager and Input.is_action_just_pressed("Ready"): + hero.enter_fighting_state() func swap_to_slot(num: int) -> void: diff --git a/PCs/FSM/fighting_state.gd b/PCs/FSM/fighting_state.gd index c385888..e7077b9 100644 --- a/PCs/FSM/fighting_state.gd +++ b/PCs/FSM/fighting_state.gd @@ -16,7 +16,7 @@ func enter_state() -> void: hero.weapons[hero.equipped_weapon].current_energy = hero.weapons[hero.equipped_weapon].max_energy #this had to be commented out coz the new energy bar thinks "energy changed" is "energy used" #weapons[equipped_weapon].energy_changed.emit(weapons[equipped_weapon].current_energy) - if hero.game_manager.card_gameplay: + if hero.game_manager and hero.game_manager.card_gameplay: for x: int in hero.hand.contents.size(): hero.discard_pile.add(hero.hand.remove_at(hero.hand.contents.size() - 1)) hero.weapon_swap_timer.start() @@ -43,10 +43,14 @@ func exit_state() -> void: hero.hud.grow_wave_start_label() #hero.hud.primary_duration.visible = true #hero.hud.secondary_duration.visible = true - if hero.game_manager.card_gameplay: + if hero.game_manager and hero.game_manager.card_gameplay: hero.hud.energy_label.visible = true +func play_shoot_animation() -> void: + hero.anim_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE) + + func process_state(_delta: float) -> void: if hero.weapons[hero.equipped_weapon] and hero.weapons_active: if Input.is_action_just_pressed("Primary Fire"): @@ -70,3 +74,5 @@ func process_state(_delta: float) -> void: if Input.is_action_just_pressed("Swap Weapons"): if hero.weapons[0] and hero.weapons[1]: hero.swap_weapons() + if !hero.game_manager and Input.is_action_just_pressed("Ready"): + hero.exit_fighting_state() diff --git a/PCs/hero.gd b/PCs/hero.gd index 529eed8..c8baaed 100644 --- a/PCs/hero.gd +++ b/PCs/hero.gd @@ -2,7 +2,10 @@ class_name Hero extends CharacterBody3D signal ready_state_changed(state: bool) +signal placed_tower(tower: Tower) +@export var subviewport1: SubViewport +@export var subviewport2: SubViewport @export var wave_preview_scene: PackedScene @export var hero_class: HeroClass @export var camera: Camera3D @@ -94,11 +97,18 @@ var distance_travelled: float = 0.0 var foot_stepping: bool = false +func set_resolution(size: Vector2) -> void: + $FirstPersonViewport.size = size + $SubViewport.size = size + + func set_zoom_factor(value: float) -> void: movement.zoom_factor = value func _ready() -> void: + Data.resolution_changed.connect(set_resolution) + set_resolution(Vector2(1920, 1080) * Data.graphics.resolution_scaling) hud.disable_card_gameplay_ui() if game_manager: if game_manager.card_gameplay: @@ -362,15 +372,15 @@ func draw_to_hand_size() -> void: func equip_weapon(slot: int = 0) -> void: if weapons[slot] != null: unequip_weapon(slot) - if !game_manager.card_gameplay or hand.size == 1: + if hand.size == 1 or (!game_manager or !game_manager.card_gameplay): return if hand.size == 0: return var energy_cost: int = selected_card.cost - if game_manager.card_gameplay and energy < energy_cost: + if game_manager and game_manager.card_gameplay and energy < energy_cost: return if hand.size > 0: - if game_manager.card_gameplay: + if game_manager and game_manager.card_gameplay: energy -= energy_cost place_card_audio.play() cards[slot] = hand.remove_at(hand.contents.find(selected_card)) @@ -378,7 +388,7 @@ func equip_weapon(slot: int = 0) -> void: hud.hot_wheel.update_cassettes(get_wheel_cards()) #card_sprites[hand_selected_index].queue_free() #card_sprites.remove_at(hand_selected_index) - if game_manager.card_gameplay: + if game_manager and game_manager.card_gameplay: discard_pile.add(cards[slot]) #TODO: Alternate thing to do with the hand i guess #if !inventory.contents.has(cards[slot]): @@ -387,6 +397,7 @@ func equip_weapon(slot: int = 0) -> void: weapons[slot].stats = cards[slot].weapon_stats weapons[slot].name = str(weapons_spawn_count) weapons[slot].duration = 1 + weapons[slot].fired.connect(fighting_state.play_shoot_animation) weapons_spawn_count += 1 weapons[slot].set_multiplayer_authority(multiplayer.get_unique_id()) if slot == 0: @@ -442,8 +453,12 @@ func unequip_weapon(slot: int = 0) -> void: hud.set_secondary_button(null) weapons[slot].queue_free() weapons[slot] = null - if !game_manager.card_gameplay: + if !game_manager or !game_manager.card_gameplay: add_card(cards[slot]) cards[slot] = null place_card_audio.play() hud.hot_wheel.update_cassettes(get_wheel_cards()) + + +func _on_hitbox_took_damage(amount: int, damage_type: int, pos: Vector3) -> void: + pass # Replace with function body. diff --git a/PCs/hero.tscn b/PCs/hero.tscn index 82cf331..1140837 100644 --- a/PCs/hero.tscn +++ b/PCs/hero.tscn @@ -19,6 +19,8 @@ [ext_resource type="Script" uid="uid://ckkioruqgbs8p" path="res://Scripts/minimap_cam.gd" id="12_3hpi3"] [ext_resource type="PackedScene" uid="uid://clgbmveluyewe" path="res://card_hand.glb" id="12_r2yb6"] [ext_resource type="PackedScene" uid="uid://4g0vatb73duj" path="res://Scenes/Cassette/cassette.glb" id="13_7immr"] +[ext_resource type="Environment" uid="uid://cpn2no3e8s361" path="res://cam_environment.tres" id="13_vkt85"] +[ext_resource type="Script" uid="uid://dkhl8u8p6gmlu" path="res://PCs/spring.gd" id="15_0ehim"] [ext_resource type="Texture2D" uid="uid://c60fh34ttgcvh" path="res://Assets/Textures/minimap_player.png" id="15_nhlam"] [ext_resource type="Texture2D" uid="uid://chhmkmlfrobhu" path="res://Assets/Textures/bubble.png" id="15_q3yot"] [ext_resource type="Texture2D" uid="uid://cqnapc8cscl7i" path="res://Assets/Textures/border.png" id="16_x1xjr"] @@ -77,33 +79,38 @@ [ext_resource type="AudioStream" uid="uid://b2p1egvjy6w1b" path="res://Audio/MGWSoundDesign/PavementTiles_Mono_05.wav" id="71_dx4x6"] [ext_resource type="AudioStream" uid="uid://dbpecjrivtwav" path="res://Audio/MGWSoundDesign/DirtRoad_Mono_05.wav" id="71_n0bvw"] -[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"] -radius = 0.3 -height = 1.8 - [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_o55s8"] animation = &"read" [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h1yfy"] animation = &"hold_gun" +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_0ehim"] +animation = &"shoot" + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_r2yb6"] animation = &"point" [sub_resource type="AnimationNodeBlend3" id="AnimationNodeBlend3_o55s8"] +[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_vkt85"] + [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_hueaw"] -graph_offset = Vector2(-378.649, 125.099) -nodes/output/position = Vector2(460, 140) +graph_offset = Vector2(-111.22443, 243.4039) +nodes/output/position = Vector2(640, 240) nodes/Animation/node = SubResource("AnimationNodeAnimation_r2yb6") nodes/Animation/position = Vector2(-80, 120) "nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_o55s8") "nodes/Animation 2/position" = Vector2(-180, 300) "nodes/Animation 3/node" = SubResource("AnimationNodeAnimation_h1yfy") -"nodes/Animation 3/position" = Vector2(0, 400) +"nodes/Animation 3/position" = Vector2(20, 420) nodes/Blend3/node = SubResource("AnimationNodeBlend3_o55s8") nodes/Blend3/position = Vector2(200, 140) -node_connections = [&"output", 0, &"Blend3", &"Blend3", 0, &"Animation", &"Blend3", 1, &"Animation 2", &"Blend3", 2, &"Animation 3"] +nodes/OneShot/node = SubResource("AnimationNodeOneShot_vkt85") +nodes/OneShot/position = Vector2(420, 300) +"nodes/Animation 4/node" = SubResource("AnimationNodeAnimation_0ehim") +"nodes/Animation 4/position" = Vector2(180, 620) +node_connections = [&"output", 0, &"OneShot", &"Blend3", 0, &"Animation", &"Blend3", 1, &"Animation 2", &"Blend3", 2, &"Animation 3", &"OneShot", 0, &"Blend3", &"OneShot", 1, &"Animation 4"] [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_hueaw"] animation = &"card_hand_read" @@ -114,7 +121,7 @@ animation = &"card_hand_away" [sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_4eel5"] [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xav2s"] -graph_offset = Vector2(-384.382, 132.11) +graph_offset = Vector2(-526.5509, 82.68187) nodes/Animation/node = SubResource("AnimationNodeAnimation_p46gp") nodes/Animation/position = Vector2(-147.04, 210.816) "nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_hueaw") @@ -123,11 +130,15 @@ nodes/Blend2/node = SubResource("AnimationNodeBlend2_4eel5") nodes/Blend2/position = Vector2(120, 200) node_connections = [&"output", 0, &"Blend2", &"Blend2", 0, &"Animation 2", &"Blend2", 1, &"Animation"] +[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"] +radius = 0.3 +height = 1.8 + [sub_resource type="Environment" id="Environment_cilxe"] background_mode = 1 background_color = Color(0.282353, 0.615686, 0.278431, 1) -[sub_resource type="AtlasTexture" id="AtlasTexture_r3lbl"] +[sub_resource type="AtlasTexture" id="AtlasTexture_vkt85"] resource_local_to_scene = true atlas = ExtResource("6_yyp8i") region = Rect2(0, 0, 96, 96) @@ -135,6 +146,9 @@ region = Rect2(0, 0, 96, 96) [sub_resource type="ViewportTexture" id="ViewportTexture_m3ots"] viewport_path = NodePath("NametagViewport") +[sub_resource type="ViewportTexture" id="ViewportTexture_r3lbl"] +viewport_path = NodePath("SubViewport") + [sub_resource type="ViewportTexture" id="ViewportTexture_mk87g"] viewport_path = NodePath("FirstPersonViewport") @@ -218,20 +232,21 @@ stream_2/stream = ExtResource("69_c5gvc") stream_3/stream = ExtResource("70_sewk0") stream_4/stream = ExtResource("71_n0bvw") -[node name="Hero" type="CharacterBody3D" unique_id=1918171232 node_paths=PackedStringArray("camera", "gun_camera", "left_hand", "right_hand", "edit_tool", "carding_tool", "sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "hud", "movement", "player_name_tag", "weapon_swap_timer", "editing_states", "fighting_state", "default_state", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio", "anim_tree", "anim_tree2", "weapon_pivot", "cassette", "left_hand_model", "gauntlet_model")] +[node name="Hero" type="CharacterBody3D" unique_id=1918171232 node_paths=PackedStringArray("subviewport1", "camera", "gun_camera", "left_hand", "right_hand", "edit_tool", "carding_tool", "sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "hud", "movement", "player_name_tag", "weapon_swap_timer", "editing_states", "fighting_state", "default_state", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio", "anim_tree", "anim_tree2", "weapon_pivot", "cassette", "left_hand_model", "gauntlet_model")] collision_layer = 2 collision_mask = 37 script = ExtResource("1_pihpe") +subviewport1 = NodePath("FirstPersonViewport") wave_preview_scene = ExtResource("2_o55s8") hero_class = ExtResource("2_dbyo0") -camera = NodePath("ViewMovement/Head") +camera = NodePath("SubViewport/Head") gun_camera = NodePath("FirstPersonViewport/Head2") -left_hand = NodePath("FirstPersonViewport/Head2/RightHand/card_hand") -right_hand = NodePath("FirstPersonViewport/Head2/RightHand") -edit_tool = NodePath("ViewMovement/Head/EditTool") -carding_tool = NodePath("ViewMovement/Head/CardPlacingTool") +left_hand = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand") +right_hand = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand") +edit_tool = NodePath("SubViewport/Head/EditTool") +carding_tool = NodePath("SubViewport/Head/CardPlacingTool") sprite = NodePath("EightDirectionSprite") -interaction_raycast = NodePath("ViewMovement/Head/RayCast3D") +interaction_raycast = NodePath("SubViewport/Head/RayCast3D") draw_pile = NodePath("DrawPile") hand = NodePath("Hand") discard_pile = NodePath("DiscardPile") @@ -254,73 +269,46 @@ fullpower_audio = NodePath("FullPowerAudio") zeropower_audio = NodePath("ZeroPowerAudio") swap_off_audio = NodePath("SwapOffAudio") swap_on_audio = NodePath("SwapOnAudio") -anim_tree = NodePath("FirstPersonViewport/Head2/RightHand/AnimationTree") -anim_tree2 = NodePath("FirstPersonViewport/Head2/RightHand/AnimationTree2") -weapon_pivot = NodePath("FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D/Node3D") -cassette = NodePath("FirstPersonViewport/Head2/RightHand/card_hand/Empty_001") -left_hand_model = NodePath("FirstPersonViewport/Head2/RightHand/card_hand") -gauntlet_model = NodePath("FirstPersonViewport/Head2/RightHand/gauntlet") - -[node name="AudioListener3D" type="AudioListener3D" parent="." unique_id=1396328287] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0) - -[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1279010072] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0) -shape = SubResource("CapsuleShape3D_jbu13") - -[node name="ViewMovement" type="Node3D" parent="." unique_id=2029540853 node_paths=PackedStringArray("player", "camera", "focus_raycast")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.62, 0) -script = ExtResource("4_mhexa") -player = NodePath("..") -camera = NodePath("Head") -focus_raycast = NodePath("Head/RayCast3D") -head_bob_amplitude = 0.09 -head_bob_frequency = 7.0 -enable_strafe_tilt = true -tilt_amount_x = 0.8 - -[node name="Head" type="Camera3D" parent="ViewMovement" unique_id=614493089] -keep_aspect = 0 -cull_mask = 1048569 -fov = 100.0 - -[node name="EditTool" parent="ViewMovement/Head" unique_id=899304678 node_paths=PackedStringArray("hero") instance=ExtResource("5_jlxb3")] -hero = NodePath("../../..") - -[node name="RayCast3D" type="RayCast3D" parent="ViewMovement/Head" unique_id=302302801] -target_position = Vector3(0, 0, -2) -collision_mask = 24 - -[node name="CardPlacingTool" parent="ViewMovement/Head" unique_id=1227455090 node_paths=PackedStringArray("hero") instance=ExtResource("8_7d213")] -hero = NodePath("../../..") - -[node name="RayCast3D" type="RayCast3D" parent="ViewMovement" unique_id=522176621] -target_position = Vector3(0, 0, -100) -collision_mask = 65535 +anim_tree = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/AnimationTree") +anim_tree2 = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/AnimationTree2") +weapon_pivot = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet/Gauntlet/Skeleton3D/BoneAttachment3D") +cassette = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Empty_001") +left_hand_model = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand") +gauntlet_model = NodePath("FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet") +distance_between_steps = 1.9 [node name="FirstPersonViewport" type="SubViewport" parent="." unique_id=785328163] transparent_bg = true -size = Vector2i(640, 360) +audio_listener_enable_3d = true +size = Vector2i(1920, 1080) render_target_update_mode = 4 [node name="Head2" type="Camera3D" parent="FirstPersonViewport" unique_id=1933686603 node_paths=PackedStringArray("clone_camera")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.62, 0) cull_mask = 2 +environment = ExtResource("13_vkt85") fov = 60.0 script = ExtResource("11_4sdwe") -clone_camera = NodePath("../../ViewMovement/Head") +clone_camera = NodePath("../../SubViewport/Head") -[node name="RightHand" type="Node3D" parent="FirstPersonViewport/Head2" unique_id=729288273 node_paths=PackedStringArray("player")] -script = ExtResource("7_14ugt") +[node name="ViewMovement" type="Node3D" parent="FirstPersonViewport/Head2" unique_id=1191655688 node_paths=PackedStringArray("player", "camera")] +script = ExtResource("4_mhexa") player = NodePath("../../..") +camera = NodePath("RightHand") +head_bob_amplitude = 0.01 +metadata/_custom_type_script = "uid://cij76at0nbs1v" + +[node name="RightHand" type="Node3D" parent="FirstPersonViewport/Head2/ViewMovement" unique_id=729288273 node_paths=PackedStringArray("player")] +script = ExtResource("7_14ugt") +player = NodePath("../../../..") enable_strafe_tilt = true tilt_amount_x = 2.0 tilt_amount_y = 1.0 -weapon_rotation_amount = 0.3 +weapon_rotation_amount = 0.4 -[node name="gauntlet" parent="FirstPersonViewport/Head2/RightHand" unique_id=75711217 instance=ExtResource("11_h1yfy")] +[node name="gauntlet" parent="FirstPersonViewport/Head2/ViewMovement/RightHand" unique_id=681208948 instance=ExtResource("11_h1yfy")] -[node name="Skeleton3D" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet" parent_id_path=PackedInt32Array(75711217, 838866754) index="0" unique_id=1318948419] +[node name="Skeleton3D" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet/Gauntlet" parent_id_path=PackedInt32Array(681208948, 1347385208) index="0" unique_id=1920539554] bones/0/position = Vector3(0.28492117, -0.2668743, 0.1757814) bones/0/rotation = Quaternion(-0.4969382, -0.50358063, 0.49639297, 0.5030438) bones/5/rotation = Quaternion(-0.38194385, -0.19379175, 0.8146388, -0.39105925) @@ -339,21 +327,23 @@ bones/20/rotation = Quaternion(0.41824344, 0.0010558192, 0.0022930033, 0.9083314 bones/21/rotation = Quaternion(0.61313385, -0.33047637, -0.34370533, 0.6298563) bones/22/rotation = Quaternion(-0.002244999, 0.0020464794, 0.6736945, 0.7390037) -[node name="Cube" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="0" unique_id=403437350] +[node name="Cube" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet/Gauntlet/Skeleton3D" index="0" unique_id=463690888] layers = 2 -[node name="door" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="1" unique_id=1100068149] +[node name="door" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet/Gauntlet/Skeleton3D" index="1" unique_id=853695899] layers = 2 -[node name="door_001" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="2" unique_id=1162616444] +[node name="door_001" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet/Gauntlet/Skeleton3D" index="2" unique_id=51292188] layers = 2 -[node name="Node3D" type="Node3D" parent="FirstPersonViewport/Head2/RightHand/gauntlet/Gauntlet/Skeleton3D" index="3" unique_id=1528034935] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.257481, -0.237301, -0.452066) +[node name="BoneAttachment3D" type="BoneAttachment3D" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet/Gauntlet/Skeleton3D" index="3" unique_id=1916743669] +transform = Transform3D(0.9996732, 0.002340883, 0.02545051, -0.0023422316, 0.999997, 2.1509419e-05, -0.025450272, -8.0959755e-05, 0.99967617, 0.22945356, -0.23003688, -0.4849847) +bone_name = "Plane" +bone_idx = 23 -[node name="card_hand" parent="FirstPersonViewport/Head2/RightHand" unique_id=1949070143 instance=ExtResource("12_r2yb6")] +[node name="card_hand" parent="FirstPersonViewport/Head2/ViewMovement/RightHand" unique_id=1949070143 instance=ExtResource("12_r2yb6")] -[node name="Skeleton3D" parent="FirstPersonViewport/Head2/RightHand/card_hand/Armature" parent_id_path=PackedInt32Array(1949070143, 779813012) index="0" unique_id=1687711431] +[node name="Skeleton3D" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Armature" parent_id_path=PackedInt32Array(1949070143, 779813012) index="0" unique_id=1687711431] bones/0/position = Vector3(0.003709482, 0.14446077, 0.042393185) bones/0/rotation = Quaternion(-0.03916115, -0.009479229, 0.7379919, 0.67360556) bones/1/rotation = Quaternion(0.033827104, 0.020153234, -0.037197568, 0.99853194) @@ -386,29 +376,85 @@ bones/23/rotation = Quaternion(-0.04489054, -0.044890743, 0.70568043, 0.7056804) bones/24/position = Vector3(-2.8036966, 0.39121616, -0.41559562) bones/24/rotation = Quaternion(-0.084565006, -0.08456521, 0.70203185, 0.7020319) -[node name="Body_004" parent="FirstPersonViewport/Head2/RightHand/card_hand/Armature/Skeleton3D" index="0" unique_id=330536477] +[node name="Body_004" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Armature/Skeleton3D" index="0" unique_id=330536477] layers = 2 -[node name="Empty_001" parent="FirstPersonViewport/Head2/RightHand/card_hand" index="1" unique_id=124279582] +[node name="Empty_001" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand" index="1" unique_id=124279582] transform = Transform3D(0.996286, -0.0860546, -0.00298578, -0.00927826, -0.0728151, -0.997302, 0.0856051, 0.993626, -0.0733431, -0.086853, -0.100784, -0.288736) -[node name="cassette" parent="FirstPersonViewport/Head2/RightHand/card_hand/Empty_001" index="0" unique_id=1368647028 instance=ExtResource("13_7immr")] +[node name="cassette" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Empty_001" index="0" unique_id=1368647028 instance=ExtResource("13_7immr")] -[node name="Cassette" parent="FirstPersonViewport/Head2/RightHand/card_hand/Empty_001/cassette" index="0" unique_id=360288089] +[node name="Cassette" parent="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Empty_001/cassette" index="0" unique_id=360288089] layers = 2 -[node name="AnimationTree" type="AnimationTree" parent="FirstPersonViewport/Head2/RightHand" unique_id=1068524091] +[node name="AnimationTree" type="AnimationTree" parent="FirstPersonViewport/Head2/ViewMovement/RightHand" unique_id=1068524091] root_node = NodePath("../gauntlet") tree_root = SubResource("AnimationNodeBlendTree_hueaw") anim_player = NodePath("../gauntlet/AnimationPlayer") parameters/Blend3/blend_amount = 1.0 +parameters/OneShot/active = false +parameters/OneShot/internal_active = false +parameters/OneShot/request = 0 -[node name="AnimationTree2" type="AnimationTree" parent="FirstPersonViewport/Head2/RightHand" unique_id=2004934987] +[node name="AnimationTree2" type="AnimationTree" parent="FirstPersonViewport/Head2/ViewMovement/RightHand" unique_id=2004934987] root_node = NodePath("../card_hand") tree_root = SubResource("AnimationNodeBlendTree_xav2s") anim_player = NodePath("../card_hand/AnimationPlayer") parameters/Blend2/blend_amount = 0.0 +[node name="SubViewport" type="SubViewport" parent="." unique_id=615109350] +size = Vector2i(1920, 1080) + +[node name="Head" type="Camera3D" parent="SubViewport" unique_id=614493089] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.62, 0) +keep_aspect = 0 +cull_mask = 1048569 +environment = ExtResource("13_vkt85") +fov = 100.0 + +[node name="EditTool" parent="SubViewport/Head" unique_id=899304678 node_paths=PackedStringArray("hero") instance=ExtResource("5_jlxb3")] +hero = NodePath("../../..") + +[node name="RayCast3D" type="RayCast3D" parent="SubViewport/Head" unique_id=302302801] +target_position = Vector3(0, 0, -2) +collision_mask = 24 + +[node name="CardPlacingTool" parent="SubViewport/Head" unique_id=1227455090 node_paths=PackedStringArray("hero") instance=ExtResource("8_7d213")] +hero = NodePath("../../..") + +[node name="AudioListener3D" type="AudioListener3D" parent="." unique_id=1396328287] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1279010072] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0) +shape = SubResource("CapsuleShape3D_jbu13") + +[node name="ViewMovement" type="Node3D" parent="." unique_id=2029540853 node_paths=PackedStringArray("player", "camera", "focus_raycast")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.62, 0) +script = ExtResource("4_mhexa") +player = NodePath("..") +camera = NodePath("Node3D") +focus_raycast = NodePath("../SubViewport/Head/RayCast3D") +head_bob_max_effect_speed = 4.5 +head_bob_amplitude = 0.09 +head_bob_frequency = 7.0 +enable_strafe_tilt = true +tilt_amount_x = 0.8 + +[node name="RayCast3D" type="RayCast3D" parent="ViewMovement" unique_id=522176621] +target_position = Vector3(0, 0, -100) +collision_mask = 65535 + +[node name="Node3D" type="Node3D" parent="ViewMovement" unique_id=2137069228 node_paths=PackedStringArray("hero", "hud")] +script = ExtResource("15_0ehim") +hero = NodePath("../..") +hud = NodePath("../../HUD") +hud_affect = 40.0 +Damping = 20.0 + +[node name="RemoteTransform3D" type="RemoteTransform3D" parent="ViewMovement/Node3D" unique_id=1038602523] +remote_path = NodePath("../../../SubViewport/Head") + [node name="MiniMapViewport" type="SubViewport" parent="." unique_id=384727742] size = Vector2i(256, 256) render_target_update_mode = 4 @@ -440,7 +486,7 @@ vertical_alignment = 1 [node name="EightDirectionSprite" parent="." unique_id=438977751 instance=ExtResource("2_ib0t5")] transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0.915529, 0) -texture = SubResource("AtlasTexture_r3lbl") +texture = SubResource("AtlasTexture_vkt85") [node name="MinimapIcon" type="Sprite3D" parent="." unique_id=1797025603] transform = Transform3D(4, 0, 0, 0, 0.0698095, 3.99939, 0, -3.99939, 0.0698095, 0, 2.86288, 0) @@ -471,13 +517,35 @@ script = ExtResource("6_cf5ap") script = ExtResource("20_cfhw8") player = NodePath("..") head = NodePath("../ViewMovement") +hard_speed_limit = 4.5 toggle_sprint = true max_look_down_angle = 80.0 max_look_up_angle = 80.0 -air_control = 0.3 +air_control = 0.6 enable_jumping = true -time_to_floor = 0.27 -weapon_holder = NodePath("../FirstPersonViewport/Head2/RightHand") +time_to_peak = 0.34 +time_to_floor = 0.28 +weapon_holder = NodePath("../FirstPersonViewport/Head2/ViewMovement/RightHand") + +[node name="PostFx" type="CanvasLayer" parent="." unique_id=589280060] + +[node name="TextureRect" type="TextureRect" parent="PostFx" unique_id=1140046628] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = SubResource("ViewportTexture_r3lbl") + +[node name="FirstPersonCam" type="TextureRect" parent="PostFx" unique_id=1345632904] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = SubResource("ViewportTexture_mk87g") [node name="HUD" type="CanvasLayer" parent="." unique_id=499382586 node_paths=PackedStringArray("player", "wave_count", "currency_count", "minimap_outline", "minimap", "minimap_cam", "minimap_viewport", "fps_label", "hover_text", "enemy_sprites", "enemy_counts", "wave_start_label", "place_text", "swap_text", "energy_label", "blank_cassette_label", "feature_preview", "hot_wheel", "shield_ui", "currencies", "energy_pips", "enemy_count_label", "primary_button", "secondary_button", "slots")] script = ExtResource("8_yl6ka") @@ -509,15 +577,6 @@ secondary_button = NodePath("VBoxContainer2/HBoxContainer2/Button2") null_icon = ExtResource("22_o55s8") slots = NodePath("VBoxContainer2") -[node name="FirstPersonCam" type="TextureRect" parent="HUD" unique_id=1345632904] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -mouse_filter = 2 -texture = SubResource("ViewportTexture_mk87g") - [node name="Minimap" type="TextureRect" parent="HUD" unique_id=614380579] visible = false anchors_preset = 1 @@ -948,34 +1007,42 @@ replication_config = SubResource("SceneReplicationConfig_tsiqi") [node name="PlaceCardAudio" type="AudioStreamPlayer" parent="." unique_id=1230517992] stream = SubResource("AudioStreamRandomizer_wyb7c") +volume_db = -9.936 bus = &"SFX" [node name="SwapCardAudio" type="AudioStreamPlayer" parent="." unique_id=382203637] stream = SubResource("AudioStreamRandomizer_0lyoo") +volume_db = -9.936 bus = &"SFX" [node name="ReadyAudio" type="AudioStreamPlayer" parent="." unique_id=1512085855] stream = SubResource("AudioStreamRandomizer_evsqr") +volume_db = -12.0 bus = &"SFX" [node name="UnreadyAudio" type="AudioStreamPlayer" parent="." unique_id=12065125] stream = SubResource("AudioStreamRandomizer_pc8yw") +volume_db = -11.989 bus = &"SFX" [node name="FullPowerAudio" type="AudioStreamPlayer" parent="." unique_id=204432375] stream = ExtResource("37_sa2xu") +volume_db = -21.86 bus = &"SFX" [node name="ZeroPowerAudio" type="AudioStreamPlayer" parent="." unique_id=842811877] stream = ExtResource("36_cd8og") +volume_db = -13.911 bus = &"SFX" [node name="SwapOffAudio" type="AudioStreamPlayer" parent="." unique_id=2115799468] stream = ExtResource("40_pnv0q") +volume_db = -13.679 bus = &"SFX" [node name="SwapOnAudio" type="AudioStreamPlayer" parent="." unique_id=1891077839] stream = ExtResource("41_hussy") +volume_db = -10.599 bus = &"SFX" [node name="BuildingState" type="Node" parent="." unique_id=744789457 node_paths=PackedStringArray("swap_state", "hero")] @@ -1016,27 +1083,43 @@ size = 2.243 [node name="GrassFootSteps" type="AudioStreamPlayer" parent="." unique_id=1334135194] stream = SubResource("AudioStreamRandomizer_r3lbl") +volume_db = -12.0 +bus = &"SFX" [node name="GrassFootSteps2" type="AudioStreamPlayer" parent="." unique_id=1888481320] stream = SubResource("AudioStreamRandomizer_r3lbl") +volume_db = -12.0 +bus = &"SFX" [node name="BrickFootSteps" type="AudioStreamPlayer" parent="." unique_id=1472210643] stream = SubResource("AudioStreamRandomizer_0ehim") +volume_db = -12.0 +bus = &"SFX" [node name="BrickFootSteps2" type="AudioStreamPlayer" parent="." unique_id=584609189] stream = SubResource("AudioStreamRandomizer_0ehim") +volume_db = -12.0 +bus = &"SFX" [node name="StoneFootSteps" type="AudioStreamPlayer" parent="." unique_id=1254189615] stream = SubResource("AudioStreamRandomizer_u2rve") +volume_db = -12.0 +bus = &"SFX" [node name="StoneFootSteps2" type="AudioStreamPlayer" parent="." unique_id=1184202084] stream = SubResource("AudioStreamRandomizer_u2rve") +volume_db = -12.0 +bus = &"SFX" [node name="DirtFootSteps" type="AudioStreamPlayer" parent="." unique_id=1056313659] stream = SubResource("AudioStreamRandomizer_vkt85") +volume_db = -12.0 +bus = &"SFX" [node name="DirtFootSteps2" type="AudioStreamPlayer" parent="." unique_id=1806375267] stream = SubResource("AudioStreamRandomizer_vkt85") +volume_db = -12.0 +bus = &"SFX" [node name="RayCast3D" type="RayCast3D" parent="." unique_id=1935479077] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.43043494, 0) @@ -1044,7 +1127,7 @@ target_position = Vector3(0, -11.465, 0) [connection signal="timeout" from="WeaponSwapTimer" to="." method="_on_timer_timeout"] -[editable path="FirstPersonViewport/Head2/RightHand/gauntlet"] -[editable path="FirstPersonViewport/Head2/RightHand/card_hand"] -[editable path="FirstPersonViewport/Head2/RightHand/card_hand/Empty_001/cassette"] +[editable path="FirstPersonViewport/Head2/ViewMovement/RightHand/gauntlet"] +[editable path="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand"] +[editable path="FirstPersonViewport/Head2/ViewMovement/RightHand/card_hand/Empty_001/cassette"] [editable path="CoinViewport/Coin"] diff --git a/PCs/spring.gd b/PCs/spring.gd new file mode 100644 index 0000000..62cec70 --- /dev/null +++ b/PCs/spring.gd @@ -0,0 +1,41 @@ +class_name Spring +extends Node3D + +@export var hero: Hero +@export var hud: HUD + +@export var hud_affect: float +@export var affect: Node3D + +@export var AccelerationScale: float = 200.0 +@export var MaxAcceleration: float = 0.3 +@export var Rebound: float = 2.0 +@export var Damping: float = 14.0 + +var previousVelocity: Vector3; +var AccumulatedDifferential: Vector3; +var AccumulatedDeflection: Vector3; + + +func _process(delta: float) -> void: + var current_velocity: Vector3 = hero.velocity + var acceleration: Vector3 = previousVelocity - current_velocity + + acceleration /= AccelerationScale; + + if (acceleration.length() > MaxAcceleration): + acceleration = acceleration.normalized() * MaxAcceleration; + + AccumulatedDifferential += acceleration; + AccumulatedDeflection += AccumulatedDifferential; + AccumulatedDifferential -= AccumulatedDeflection * Rebound * delta; + AccumulatedDeflection -= AccumulatedDeflection * Damping * delta; + + previousVelocity = current_velocity; + + position.y = AccumulatedDeflection.y + if affect: + affect.position.y = AccumulatedDeflection.y + affect.position.x = AccumulatedDeflection.z + if hud: + hud.offset = Vector2(AccumulatedDeflection.x, AccumulatedDeflection.y) * hud_affect diff --git a/PCs/spring.gd.uid b/PCs/spring.gd.uid new file mode 100644 index 0000000..aa29cdb --- /dev/null +++ b/PCs/spring.gd.uid @@ -0,0 +1 @@ +uid://dkhl8u8p6gmlu diff --git a/PCs/view_movement.gd b/PCs/view_movement.gd index d1be63a..bd8e881 100644 --- a/PCs/view_movement.gd +++ b/PCs/view_movement.gd @@ -4,7 +4,7 @@ extends Node3D @export var player: CharacterBody3D @export_category("Bobbing") -@export var camera: Camera3D +@export var camera: Node3D @export var focus_raycast: RayCast3D @export var enable_head_bob: bool = true @export var head_bob_max_effect_speed: float = 4.317 diff --git a/Scenes/CardPrinter/card_printer.tscn b/Scenes/CardPrinter/card_printer.tscn index 225c7e8..a8121e4 100644 --- a/Scenes/CardPrinter/card_printer.tscn +++ b/Scenes/CardPrinter/card_printer.tscn @@ -3,13 +3,14 @@ [ext_resource type="Script" uid="uid://bivtfdl3p1brv" path="res://Scenes/CardPrinter/card_printer.gd" id="1_qft15"] [ext_resource type="PackedScene" uid="uid://bcvjgl0s1wp8y" path="res://UI/Menus/RadioMenu/choose_card_screen.tscn" id="2_kpujb"] [ext_resource type="Script" uid="uid://dkfswql8ui0bt" path="res://Scripts/interact_button.gd" id="4_eavi1"] +[ext_resource type="PackedScene" uid="uid://ca1y03riauk7v" path="res://boombox.glb" id="5_8jpsw"] [ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://Audio/shot1.wav" id="5_m033a"] [sub_resource type="BoxShape3D" id="BoxShape3D_0ebt5"] -size = Vector3(3.00441, 1.21416, 2.14176) +size = Vector3(3.00441, 0.9920776, 1.2781768) [sub_resource type="BoxShape3D" id="BoxShape3D_ikdwj"] -size = Vector3(0.57883, 0.375308, 0.190803) +size = Vector3(0.8920957, 1.1780555, 0.653507) [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_73g2w"] random_pitch = 1.1 @@ -17,7 +18,7 @@ streams_count = 1 stream_0/stream = ExtResource("5_m033a") [sub_resource type="BoxShape3D" id="BoxShape3D_21y4o"] -size = Vector3(2.11176, 1.16345, 0.664978) +size = Vector3(3.1602442, 1.6259993, 1.007927) [node name="CardPrinter" type="StaticBody3D" unique_id=459800869 node_paths=PackedStringArray("button", "button_collider")] script = ExtResource("1_qft15") @@ -26,9 +27,12 @@ button_collider = NodePath("StaticBody3D/CollisionShape3D2") card_selection_menu = ExtResource("2_kpujb") [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=30960146] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000722647, 0.607083, -0.000626981) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0007226467, 0.47737724, 0.562555) shape = SubResource("BoxShape3D_0ebt5") +[node name="boombox" parent="." unique_id=1990632876 instance=ExtResource("5_8jpsw")] +transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0.03968942, 1.5274034, 0.27377868) + [node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=427437411] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.847404, 0.610684) collision_layer = 16 @@ -37,7 +41,7 @@ script = ExtResource("4_eavi1") press_cost = 1 [node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D" unique_id=914833676] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00542301, 0.653175, 0.254328) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.11519222, 0.80499697, 0.5172301) shape = SubResource("BoxShape3D_ikdwj") [node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="StaticBody3D" unique_id=2125771228] @@ -45,46 +49,28 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.578748, -0.587001) stream = SubResource("AudioStreamRandomizer_73g2w") bus = &"SFX" -[node name="CSGBox3D" type="CSGBox3D" parent="." unique_id=1403603208] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.76287, 0.437195) -size = Vector3(2.1, 1.21, 0.66) - -[node name="CSGBox3D2" type="CSGBox3D" parent="." unique_id=1998404784] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.50532, 0.844074) -size = Vector3(0.57, 0.365, 0.22) - [node name="CSGBox3D3" type="CSGBox3D" parent="." unique_id=1739651585] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.07889, 0) -size = Vector3(3.01, 0.275, 2.145) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.83318865, 0.5436785) +size = Vector3(3.01, 0.275, 1.3083398) [node name="CSGBox3D4" type="CSGBox3D" parent="." unique_id=1331903082] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.17866, 0.464503, 0.722973) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.2236495, 0.46450287, 0.9188268) size = Vector3(0.355, 1, 0.37) [node name="CSGBox3D5" type="CSGBox3D" parent="." unique_id=792536346] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.20564, 0.464503, 0.744042) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.2526929, 0.46450287, 0.9501231) size = Vector3(0.355, 1, 0.37) [node name="CSGBox3D6" type="CSGBox3D" parent="." unique_id=924404615] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.21651, 0.464503, -0.703903) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.2410457, 0.46450287, 0.15670347) size = Vector3(0.355, 1, 0.37) [node name="CSGBox3D7" type="CSGBox3D" parent="." unique_id=1351624555] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.20425, 0.464503, -0.796043) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.2410758, 0.46450287, 0.1566062) size = Vector3(0.355, 1, 0.37) -[node name="CSGCylinder3D" type="CSGCylinder3D" parent="." unique_id=1627726465] -transform = Transform3D(0.791895, -0.610657, 0, 0.610657, 0.791895, 0, 0, 0, 1, -0.894404, 2.86265, 0.47663) -radius = 0.131 -height = 1.627 - -[node name="CSGCylinder3D2" type="CSGCylinder3D" parent="." unique_id=2001644920] -transform = Transform3D(0.74906, 0.662502, 0, -0.662502, 0.74906, 0, 0, 0, 1, 1.08608, 2.86265, 0.47663) -radius = 0.131 -height = 1.627 - [node name="CollisionShape3D2" type="CollisionShape3D" parent="." unique_id=1288587195] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00228882, 1.78986, 0.431061) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0032413006, 1.7864776, 0.59116006) shape = SubResource("BoxShape3D_21y4o") [connection signal="button_interacted" from="StaticBody3D" to="." method="_on_static_body_3d_button_interacted"] diff --git a/Scenes/Menus/confirmation_popup.tscn b/Scenes/Menus/confirmation_popup.tscn index 6efe9bf..2bb2db6 100644 --- a/Scenes/Menus/confirmation_popup.tscn +++ b/Scenes/Menus/confirmation_popup.tscn @@ -46,6 +46,7 @@ text = "Confirm" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=195190349] stream = SubResource("AudioStreamRandomizer_22wuj") +volume_db = -10.665 bus = &"SFX" [connection signal="mouse_entered" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_button_mouse_entered"] diff --git a/Scripts/Resources/player_graphics_settings.gd b/Scripts/Resources/player_graphics_settings.gd index d15e2b0..58f3320 100644 --- a/Scripts/Resources/player_graphics_settings.gd +++ b/Scripts/Resources/player_graphics_settings.gd @@ -9,6 +9,7 @@ const SAVE_PATH: String = "user://graphics_settings.tres" @export var windowed_mode: int = 0 @export var vertex_jitter: float = 0.2 @export var affine_warping: float = 1.0 +@export var resolution_scaling: float = 1.0 func apply_graphical_settings(viewport: Viewport) -> void: diff --git a/Scripts/Weapons/hitscan_weapon.gd b/Scripts/Weapons/hitscan_weapon.gd index 0026145..1d0cd2d 100644 --- a/Scripts/Weapons/hitscan_weapon.gd +++ b/Scripts/Weapons/hitscan_weapon.gd @@ -10,9 +10,12 @@ var attack_range: float = 0.0 func _ready() -> void: super._ready() attack_range = stats.get_attribute("Range") - raycast.target_position = Vector3(0, 0, -attack_range) - #range_debug_indicator.radius = attack_range + + +func _process(delta: float) -> void: + super._process(delta) raycast.global_position = hero.camera.global_position + raycast.target_position = Vector3(0, 0, -attack_range) func shoot() -> void: @@ -23,6 +26,11 @@ func shoot() -> void: var hitbox: Hitbox = target.shape_owner_get_owner(raycast.get_collider_shape()) hit(hitbox, raycast.get_collision_point()) networked_hit.rpc(get_tree().root.get_path_to(hitbox), raycast.get_collision_point()) + if particle_emitter: + particle_emitter.global_position = raycast.get_collision_point() + particle_emitter.process_material.direction = raycast.get_collision_normal() + particle_emitter.restart() + particle_emitter.emitting = true func hit(hitbox: Hitbox, hit_pos: Vector3) -> void: diff --git a/Scripts/Weapons/weapon.gd b/Scripts/Weapons/weapon.gd index 1090105..84b42ad 100644 --- a/Scripts/Weapons/weapon.gd +++ b/Scripts/Weapons/weapon.gd @@ -4,11 +4,13 @@ extends Node3D signal energy_spent(energy: int, type: Data.EnergyType) signal energy_recharged(energy: int, type: Data.EnergyType) signal energy_changed(energy: float) +signal fired() @export var stats: CardText @export var animator: AnimationPlayer @export var audio_player: AudioStreamPlayer3D @export var recharge_timer: Timer +@export var particle_emitter: GPUParticles3D var hero: Hero var trigger_held: bool = false @@ -98,6 +100,7 @@ func shoot() -> void: recharging = false recharge_speed = 0.0 recharge_timer.stop() + fired.emit() @rpc diff --git a/Scripts/data.gd b/Scripts/data.gd index 46408a3..db75ab0 100644 --- a/Scripts/data.gd +++ b/Scripts/data.gd @@ -1,5 +1,7 @@ extends Node +signal resolution_changed(size: Vector2) + var characters: Array[HeroClass] var cards: Array[Card] #var keymaps: Array[PlayerKeymap] diff --git a/Scripts/game.gd b/Scripts/game.gd index 8c06ef6..2fefeb5 100644 --- a/Scripts/game.gd +++ b/Scripts/game.gd @@ -33,6 +33,7 @@ var card_gameplay: bool = false var level_layout: FlowFieldData var level_config: LevelConfig var starting_endless: bool = false +var rhythm_notifier: RhythmNotifier #TODO: Create a reference to some generic Lobby object that wraps the multiplayer players list stuff @@ -107,6 +108,10 @@ func get_upcoming_waves(wave_count: int) -> Array[WaveConfig]: return waves +func connect_tower_to_music(tower: Tower) -> void: + rhythm_notifier.beats(1).connect(tower.shoot) + + func spawn_level(scene: PackedScene) -> void: level = scene.instantiate() as Level var flow_field: FlowField = FlowField.new() @@ -133,6 +138,7 @@ func spawn_players() -> void: player_array.sort() for peer_id: int in player_array: var player: Hero = player_scene.instantiate() as Hero + player.placed_tower.connect(connect_tower_to_music) player.name = str(peer_id) player.game_manager = self player.edit_tool.level = level @@ -199,16 +205,16 @@ func set_wave_to_spawners(wave_thing: WaveConfig, wave_number: int) -> void: func set_upcoming_wave() -> void: if is_multiplayer_authority(): - print(wave) - print(level_config.waves.size()) + #print(wave) + #print(level_config.waves.size()) if wave > level_config.waves.size(): - print("added new wave on top") + #print("added new wave on top") var spawn_power: int = WaveManager.calculate_spawn_power(wave, connected_players_nodes.size()) var new_wave: WaveConfig = WaveManager.generate_wave(spawn_power, level.enemy_pool, level.enemy_spawns.size()) level_config.waves.append(new_wave) var new_wave: WaveConfig = get_upcoming_waves(1)[0] - print(new_wave) + #print(new_wave) set_wave_to_spawners(new_wave, wave) temp_set_upcoming_wave(new_wave, WaveManager.calculate_pot(wave, connected_players_nodes.size())) @@ -265,7 +271,7 @@ func damage_goal(enemy: Enemy, penalty: int) -> void: func end_wave() -> void: - print("wave endedZ") + #print("wave endedZ") wave += 1 Data.save_data.check_high_score(level_config.display_title, wave, starting_endless) for peer_id: int in connected_players_nodes: @@ -329,6 +335,10 @@ func setup() -> void: wave = 1 stats = RoundStats.new() wave_limit = level_config.waves.size() + rhythm_notifier = RhythmNotifier.new() + add_child(rhythm_notifier) + rhythm_notifier.bpm = 120 + rhythm_notifier.running = true game_setup.emit() diff --git a/Shaders/mightyduke_ps1.gdshader b/Shaders/mightyduke_ps1.gdshader index 6accff8..fa337ba 100644 --- a/Shaders/mightyduke_ps1.gdshader +++ b/Shaders/mightyduke_ps1.gdshader @@ -48,7 +48,8 @@ void fragment() { uv /= (VERTEX.z); uv = mix(perspective_uv, uv, affine_amount); - ALBEDO = texture(albedo, uv).rgb; + ALBEDO = texture(albedo, uv).rgb * COLOR.rgb; + //ALBEDO = texture(albedo, uv).rgb; ALPHA = texture(albedo, uv).a; ALPHA_SCISSOR_THRESHOLD = alpha_scissor; } \ No newline at end of file diff --git a/Towers/Ascension/tower_stats.tres b/Towers/Ascension/tower_stats.tres index 5df639e..f922052 100644 --- a/Towers/Ascension/tower_stats.tres +++ b/Towers/Ascension/tower_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_tiqmf"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_bpl71"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_imnjp"] [resource] script = ExtResource("2_bpl71") @@ -10,5 +11,6 @@ attributes = Dictionary[String, float]({ "Fire Delay": 9999.0, "Range": 1.0 }) +features = Array[ExtResource("1_tiqmf")]([ExtResource("2_imnjp")]) text = "DESC_TOWER_PLATFORM_DASH" metadata/_custom_type_script = "uid://dg7gxxqfqxcmc" diff --git a/Towers/Assault/PipePistolBullets.tres b/Towers/Assault/PipePistolBullets.tres new file mode 100644 index 0000000..7b721ff --- /dev/null +++ b/Towers/Assault/PipePistolBullets.tres @@ -0,0 +1,8 @@ +[gd_resource type="ParticleProcessMaterial" format=3 uid="uid://3m464q2bkdkm"] + +[resource] +direction = Vector3(0, 0, -1) +spread = 40.0 +initial_velocity_min = 10.0 +initial_velocity_max = 10.0 +gravity = Vector3(0, 0, 0) diff --git a/Towers/Assault/tower_assault.tscn b/Towers/Assault/tower_assault.tscn index 9ae5cbc..14ee089 100644 --- a/Towers/Assault/tower_assault.tscn +++ b/Towers/Assault/tower_assault.tscn @@ -5,10 +5,17 @@ [ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="3_75shm"] [ext_resource type="ArrayMesh" uid="uid://oxjhqfwlcx5l" path="res://Towers/Assault/assaultmod.res" id="4_1d5pl"] [ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="4_lkplr"] +[ext_resource type="AudioStream" uid="uid://ciyphup4n1sbi" path="res://click.wav" id="6_g00m4"] [sub_resource type="Resource" id="Resource_c6gqc"] script = ExtResource("3_75shm") +[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_q14kf"] +random_pitch = 1.005793 +random_volume_offset_db = 0.2 +streams_count = 1 +stream_0/stream = ExtResource("6_g00m4") + [node name="DirectAffectTower" unique_id=252570832 instance=ExtResource("1_cn3qe")] stats = ExtResource("2_gg1gn") effect = SubResource("Resource_c6gqc") @@ -19,3 +26,6 @@ visible = false [node name="Yaw" parent="." index="2" unique_id=36855242] transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 1.2058, 0) mesh = ExtResource("4_1d5pl") + +[node name="AudioStreamPlayer3D" parent="Yaw" index="0" unique_id=1877101855] +stream = SubResource("AudioStreamRandomizer_q14kf") diff --git a/Towers/Blowdart/blowdart.res b/Towers/Blowdart/blowdart.res index 7b9a96c..bbbf037 100644 Binary files a/Towers/Blowdart/blowdart.res and b/Towers/Blowdart/blowdart.res differ diff --git a/Towers/Blowdart/tower_stats.tres b/Towers/Blowdart/tower_stats.tres index cdcf949..1c992cf 100644 --- a/Towers/Blowdart/tower_stats.tres +++ b/Towers/Blowdart/tower_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_dcpbj"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_2k5i0"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_mttct"] [resource] script = ExtResource("2_2k5i0") @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 2.0, "Range": 20.0 }) +features = Array[ExtResource("1_dcpbj")]([ExtResource("2_mttct")]) text = "DESC_TOWER_POISON" diff --git a/Towers/BombLauncher/tower_stats.tres b/Towers/BombLauncher/tower_stats.tres index ec3aa7c..b7abb13 100644 --- a/Towers/BombLauncher/tower_stats.tres +++ b/Towers/BombLauncher/tower_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_73lec"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_1vuma"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_yown4"] [resource] script = ExtResource("2_1vuma") @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 4.0, "Range": 8.0 }) +features = Array[ExtResource("1_73lec")]([ExtResource("2_yown4")]) text = "DESC_TOWER_BOMB" diff --git a/Towers/Fireball/tower_stats.tres b/Towers/Fireball/tower_stats.tres index 348fb04..155c808 100644 --- a/Towers/Fireball/tower_stats.tres +++ b/Towers/Fireball/tower_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://dnvqghpwyuw84"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_may4k"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_br2ja"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_nconk"] [resource] @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 3.0, "Range": 15.0 }) +features = Array[ExtResource("1_may4k")]([ExtResource("2_br2ja")]) text = "DESC_TOWER_FIREBALL" diff --git a/Towers/Flamethrower/tower_stats.tres b/Towers/Flamethrower/tower_stats.tres index 6eafbe7..643e88d 100644 --- a/Towers/Flamethrower/tower_stats.tres +++ b/Towers/Flamethrower/tower_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://cdtjbxs21peqg"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_8a4q3"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_lp08p"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_wptab"] [resource] @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.5, "Range": 3.0 }) +features = Array[ExtResource("1_8a4q3")]([ExtResource("2_lp08p")]) text = "DESC_TOWER_FLAMETHROWER" diff --git a/Towers/Gatling/tower_gatling.gd b/Towers/Gatling/tower_gatling.gd index faf910a..a95a654 100644 --- a/Towers/Gatling/tower_gatling.gd +++ b/Towers/Gatling/tower_gatling.gd @@ -31,4 +31,4 @@ func _physics_process(delta: float) -> void: current_time_between_shots = lerpf(time_between_shots, final_time_between_shots, progress) if time_since_firing >= current_time_between_shots: time_since_firing -= current_time_between_shots - shoot() + #shoot(0) diff --git a/Towers/GlueLauncher/tower_stats.tres b/Towers/GlueLauncher/tower_stats.tres index b2fc2ca..67bbb2b 100644 --- a/Towers/GlueLauncher/tower_stats.tres +++ b/Towers/GlueLauncher/tower_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_qb1t6"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_226sm"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_m4him"] [resource] script = ExtResource("2_226sm") @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 2.0, "Range": 10.0 }) +features = Array[ExtResource("1_qb1t6")]([ExtResource("2_m4him")]) text = "DESC_TOWER_GLUE" diff --git a/Towers/Icicle/tower_stats.tres b/Towers/Icicle/tower_stats.tres index 51f8b7b..8e98a45 100644 --- a/Towers/Icicle/tower_stats.tres +++ b/Towers/Icicle/tower_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://d34bfj5togyyt"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_ju6am"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_6ypa3"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_dorn5"] [resource] @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 3.0, "Range": 15.0 }) +features = Array[ExtResource("1_ju6am")]([ExtResource("2_6ypa3")]) text = "DESC_TOWER_ICE_SPIKE" diff --git a/Towers/Overclock/overclock_tower.gd b/Towers/Overclock/overclock_tower.gd index 6830b3d..178ac88 100644 --- a/Towers/Overclock/overclock_tower.gd +++ b/Towers/Overclock/overclock_tower.gd @@ -1,7 +1,7 @@ class_name OverclockTower extends Tower -func shoot() -> void: +func shoot(count: int) -> void: #affector.apply_effect(effect, target_finder.targets) for tower: TowerBase in get_tree().get_nodes_in_group("TowerBases"): if tower.tower and tower.tower.stats != stats: diff --git a/Towers/Overclock/tower_stats.tres b/Towers/Overclock/tower_stats.tres index 87ef569..4e8e159 100644 --- a/Towers/Overclock/tower_stats.tres +++ b/Towers/Overclock/tower_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_0swcp"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_fax6y"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_v0e26"] [resource] script = ExtResource("2_fax6y") @@ -10,5 +11,6 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.0, "Range": 4.0 }) +features = Array[ExtResource("1_0swcp")]([ExtResource("2_v0e26")]) text = "DESC_TOWER_SPEED_INCREASER" metadata/_custom_type_script = "uid://dg7gxxqfqxcmc" diff --git a/Towers/Reactor/tower_stats.tres b/Towers/Reactor/tower_stats.tres index 6073763..643eb8e 100644 --- a/Towers/Reactor/tower_stats.tres +++ b/Towers/Reactor/tower_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_8hcmy"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_8w61k"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_cqn8u"] [resource] script = ExtResource("2_8w61k") @@ -10,4 +11,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 4.0, "Range": 30.0 }) +features = Array[ExtResource("1_8hcmy")]([ExtResource("2_cqn8u")]) text = "DESC_TOWER_RADIATION" diff --git a/Towers/Refrigerator/tower_stats.tres b/Towers/Refrigerator/tower_stats.tres index 7b4594b..f322498 100644 --- a/Towers/Refrigerator/tower_stats.tres +++ b/Towers/Refrigerator/tower_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://st0qrut5nxrm"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_mfkpu"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_ig77i"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_w4q6a"] [resource] @@ -11,4 +12,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 1.0, "Range": 3.0 }) +features = Array[ExtResource("1_mfkpu")]([ExtResource("2_ig77i")]) text = "DESC_TOWER_FREEZER" diff --git a/Towers/tower.gd b/Towers/tower.gd index dc6cc60..5217cae 100644 --- a/Towers/tower.gd +++ b/Towers/tower.gd @@ -61,7 +61,8 @@ func _physics_process(_delta: float) -> void: if time_since_firing >= time_between_shots: time_since_firing -= time_between_shots if affector: - shoot() + pass + #shoot() func aim() -> void: @@ -70,14 +71,15 @@ func aim() -> void: pitch_model.rotation.x = 0.0 -func shoot() -> void: - affector.apply_effect(effect, target_finder.targets) - animator.play("shoot") - audio_player.play() - if is_multiplayer_authority(): - networked_shoot.rpc() +func shoot(count: int) -> void: + if target_finder.targets.size() > 0 and affector: + affector.apply_effect(effect, target_finder.targets) + animator.play("shoot") + audio_player.play() + if is_multiplayer_authority(): + networked_shoot.rpc() @rpc("reliable") func networked_shoot() -> void: - shoot() + shoot(0) diff --git a/UI/DamageParticle/damage_particle.gd b/UI/DamageParticle/damage_particle.gd index 90e95ff..6023b92 100644 --- a/UI/DamageParticle/damage_particle.gd +++ b/UI/DamageParticle/damage_particle.gd @@ -1,7 +1,7 @@ class_name DamageParticle extends Sprite3D -@onready var label: Label = $SubViewport/Label +@export var label: Label var time_alive: float = 0.0 var movement_speed: float = 1.0 var movement_vector: Vector3 @@ -13,6 +13,7 @@ func _ready() -> void: var phi: float = randf_range(0, 2 * PI) var vector: Vector3 = Vector3(sqrt(1 - pow(z, 2)) * cos(phi), z, sqrt(1 - pow(z, 2)) * sin(phi)) movement_vector = vector.normalized() + visible = true func set_number(num: int) -> void: diff --git a/UI/DamageParticle/damage_particle.tscn b/UI/DamageParticle/damage_particle.tscn index e470c42..f8bc624 100644 --- a/UI/DamageParticle/damage_particle.tscn +++ b/UI/DamageParticle/damage_particle.tscn @@ -2,23 +2,26 @@ [ext_resource type="Script" uid="uid://blt7umrgo3tfh" path="res://UI/DamageParticle/damage_particle.gd" id="1_lgvaq"] -[sub_resource type="ViewportTexture" id="ViewportTexture_ppqlh"] +[sub_resource type="ViewportTexture" id="ViewportTexture_fiibr"] viewport_path = NodePath("SubViewport") -[node name="Node3D" type="Sprite3D" unique_id=1014123125] +[node name="Node3D" type="Sprite3D" unique_id=1014123125 node_paths=PackedStringArray("label")] +visible = false pixel_size = 0.005 billboard = 1 no_depth_test = true fixed_size = true +alpha_cut = 1 texture_filter = 2 render_priority = 1 -texture = SubResource("ViewportTexture_ppqlh") +texture = SubResource("ViewportTexture_fiibr") script = ExtResource("1_lgvaq") +label = NodePath("SubViewport/Label") [node name="SubViewport" type="SubViewport" parent="." unique_id=1770696222] transparent_bg = true -size = Vector2i(172, 57) -render_target_update_mode = 4 +size = Vector2i(37, 21) +render_target_update_mode = 1 [node name="Label" type="Label" parent="SubViewport" unique_id=1905792669] anchors_preset = 15 diff --git a/UI/Menus/GameEndScreen/game_end_screen.tscn b/UI/Menus/GameEndScreen/game_end_screen.tscn index d121892..13ba59f 100644 --- a/UI/Menus/GameEndScreen/game_end_screen.tscn +++ b/UI/Menus/GameEndScreen/game_end_screen.tscn @@ -138,6 +138,7 @@ text = "BUTTON_MAIN_MENU" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1265670542] stream = SubResource("AudioStreamRandomizer_dram5") +volume_db = -10.599 bus = &"SFX" [connection signal="mouse_entered" from="VBoxContainer/Buttons/ContinueButton" to="." method="_on_button_mouse_entered"] diff --git a/UI/Menus/MainMenu/main_menu.gd b/UI/Menus/MainMenu/main_menu.gd index cc68bc7..cb955f0 100644 --- a/UI/Menus/MainMenu/main_menu.gd +++ b/UI/Menus/MainMenu/main_menu.gd @@ -37,6 +37,11 @@ func _ready() -> void: # spawn.spawn_wave() +func _unhandled_input(event: InputEvent) -> void: + if event.is_action_pressed("Pause"): + return_to_main_menu() + + #these exist purely to make the enemies that spawn on the main menu happy func enemy_died(_some_arg: Enemy) -> void: pass @@ -105,7 +110,13 @@ func open_game_menu() -> void: func _on_back_button_pressed() -> void: main_controls.visible = true game_select_menu.visible = false - + + +func return_to_main_menu() -> void: + main_controls.visible = true + game_select_menu.visible = false + profile_controls.visible = false + mods_controls.visible = false func generate_seed() -> void: diff --git a/UI/Menus/MainMenu/main_menu.tscn b/UI/Menus/MainMenu/main_menu.tscn index 18f7106..d38c5bc 100644 --- a/UI/Menus/MainMenu/main_menu.tscn +++ b/UI/Menus/MainMenu/main_menu.tscn @@ -100,6 +100,7 @@ text = "BUTTON_QUIT" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=422058960] stream = SubResource("AudioStreamRandomizer_2jyua") +volume_db = -10.599 bus = &"SFX" [node name="GameSelectMenu" type="PanelContainer" parent="." unique_id=1604474538] diff --git a/UI/Menus/MixingMenu/track_editor.gd b/UI/Menus/MixingMenu/track_editor.gd index 4e505d5..130285f 100644 --- a/UI/Menus/MixingMenu/track_editor.gd +++ b/UI/Menus/MixingMenu/track_editor.gd @@ -86,12 +86,19 @@ func select_card(option: int) -> void: tower_feature_uis = [] for feature_ui: FeatureUI in weapon_feature_uis: feature_ui.queue_free() + for price_panel: PricePanel in tower_prices: + price_panel.visible = true + for price_panel: PricePanel in weapon_prices: + price_panel.visible = true + cost = 0 + price_label.text = tr(PRICE_STR) + str(cost) + confirm_button.disabled = false weapon_feature_uis = [] card_selected = cards[option] temp_card = card_selected.duplicate() temp_card.tower_stats = temp_card.tower_stats.get_duplicate() temp_card.weapon_stats = temp_card.weapon_stats.get_duplicate() - card_desc.set_card(temp_card, check_button_pressed) + press_check_button(check_button_pressed) for feature: Feature in temp_card.tower_stats.features: add_feature(feature, 0, false) for feature: Feature in temp_card.weapon_stats.features: diff --git a/UI/Menus/OptionsMenu/gameplay_options.gd b/UI/Menus/OptionsMenu/gameplay_options.gd index 2d66b9b..5ffcac6 100644 --- a/UI/Menus/OptionsMenu/gameplay_options.gd +++ b/UI/Menus/OptionsMenu/gameplay_options.gd @@ -52,15 +52,15 @@ func _on_mouse_sens_h_slider_value_changed(value: float) -> void: func _on_option_button_item_selected(index: int) -> void: - print(index) + #print(index) if index == 0: get_tree().root.size = Vector2i(320, 240) #DisplayServer.window_set_size(Vector2i(320, 240)) - print(get_tree().root.size) + #print(get_tree().root.size) if index == 1: get_tree().root.size = Vector2i(1920, 1080) #DisplayServer.window_set_size(Vector2i(1920, 1080)) - print(get_tree().root.size) + #print(get_tree().root.size) func _on_spin_box_value_changed(value: float) -> void: diff --git a/UI/Menus/OptionsMenu/graphics_options.gd b/UI/Menus/OptionsMenu/graphics_options.gd index d9e5231..d316982 100644 --- a/UI/Menus/OptionsMenu/graphics_options.gd +++ b/UI/Menus/OptionsMenu/graphics_options.gd @@ -10,6 +10,8 @@ extends VBoxContainer @export var vertex_jitter_slider: HSlider @export var affine_warping_input: SpinBox @export var affine_warping_slider: HSlider +@export var resolution_scaling_input: SpinBox +@export var resolution_scaling_slider: HSlider func _ready() -> void: @@ -22,6 +24,8 @@ func _ready() -> void: vertex_jitter_slider.value = Data.graphics.vertex_jitter affine_warping_input.value = Data.graphics.affine_warping affine_warping_slider.value = Data.graphics.affine_warping + resolution_scaling_slider.value = Data.graphics.resolution_scaling + resolution_scaling_input.value = Data.graphics.resolution_scaling func save() -> void: @@ -31,6 +35,7 @@ func save() -> void: Data.graphics.windowed_mode = window_dropdown.selected Data.graphics.vertex_jitter = vertex_jitter_slider.value Data.graphics.affine_warping = affine_warping_slider.value + Data.graphics.resolution_scaling = resolution_scaling_slider.value func _on_fov_spin_box_value_changed(value: float) -> void: @@ -73,3 +78,17 @@ func _on_affine_warping_spin_box_value_changed(value: float) -> void: func _on_affine_warping_h_slider_value_changed(value: float) -> void: affine_warping_input.value = value Data.graphics.affine_warping = value + + +func _on_resolution_scaling_spin_box_value_changed(value: float) -> void: + if value < 0.0: + value = 0.0 + if value > 1.0: + value = 1.0 + resolution_scaling_slider.value = value + Data.resolution_changed.emit(Vector2(1920, 1080) * value) + + +func _on_resolution_scaling_h_slider_value_changed(value: float) -> void: + resolution_scaling_input.value = value + Data.resolution_changed.emit(Vector2(1920, 1080) * value) diff --git a/UI/Menus/OptionsMenu/graphics_options.tscn b/UI/Menus/OptionsMenu/graphics_options.tscn index 4abd76d..5890ac1 100644 --- a/UI/Menus/OptionsMenu/graphics_options.tscn +++ b/UI/Menus/OptionsMenu/graphics_options.tscn @@ -4,7 +4,7 @@ [sub_resource type="ImageTexture" id="ImageTexture_03x6q"] -[node name="Graphics" type="VBoxContainer" unique_id=1842224615 node_paths=PackedStringArray("fov_input", "fov_slider", "vsync_dropdown", "aa_dropdown", "window_dropdown", "vertex_jitter_input", "vertex_jitter_slider", "affine_warping_input", "affine_warping_slider")] +[node name="Graphics" type="VBoxContainer" unique_id=1842224615 node_paths=PackedStringArray("fov_input", "fov_slider", "vsync_dropdown", "aa_dropdown", "window_dropdown", "vertex_jitter_input", "vertex_jitter_slider", "affine_warping_input", "affine_warping_slider", "resolution_scaling_input", "resolution_scaling_slider")] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -20,6 +20,43 @@ vertex_jitter_input = NodePath("VextexJitter/HBoxContainer/SpinBox") vertex_jitter_slider = NodePath("VextexJitter/HBoxContainer/HSlider") affine_warping_input = NodePath("AffineWarping/HBoxContainer/SpinBox") affine_warping_slider = NodePath("AffineWarping/HBoxContainer/HSlider") +resolution_scaling_input = NodePath("ResolutionScaling/HBoxContainer/SpinBox") +resolution_scaling_slider = NodePath("ResolutionScaling/HBoxContainer/HSlider") + +[node name="ResolutionScaling" type="HBoxContainer" parent="." unique_id=1230619872] +layout_mode = 2 +alignment = 1 + +[node name="Label" type="Label" parent="ResolutionScaling" unique_id=550655132] +layout_mode = 2 +size_flags_horizontal = 3 +text = "OPTION_RESOLUTION_SCALING" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="ResolutionScaling" unique_id=1042104415] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="SpinBox" type="SpinBox" parent="ResolutionScaling/HBoxContainer" unique_id=3787654] +layout_mode = 2 +theme_override_icons/updown = SubResource("ImageTexture_03x6q") +max_value = 1.0 +step = 0.01 +value = 0.2 +allow_greater = true +allow_lesser = true +alignment = 1 +update_on_text_changed = true + +[node name="HSlider" type="HSlider" parent="ResolutionScaling/HBoxContainer" unique_id=608837003] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 1 +max_value = 1.0 +step = 0.01 +value = 0.2 +scrollable = false [node name="FOV" type="HBoxContainer" parent="." unique_id=693078328] layout_mode = 2 @@ -194,6 +231,8 @@ step = 0.01 value = 1.0 scrollable = false +[connection signal="value_changed" from="ResolutionScaling/HBoxContainer/SpinBox" to="." method="_on_resolution_scaling_spin_box_value_changed"] +[connection signal="value_changed" from="ResolutionScaling/HBoxContainer/HSlider" to="." method="_on_resolution_scaling_h_slider_value_changed"] [connection signal="value_changed" from="FOV/HBoxContainer/SpinBox" to="." method="_on_fov_spin_box_value_changed"] [connection signal="value_changed" from="FOV/HBoxContainer/HSlider" to="." method="_on_fov_h_slider_value_changed"] [connection signal="value_changed" from="VextexJitter/HBoxContainer/SpinBox" to="." method="_on_vertex_jitter_spin_box_value_changed"] diff --git a/UI/Menus/OptionsMenu/options_menu.gd b/UI/Menus/OptionsMenu/options_menu.gd index 176fcb3..d1e750d 100644 --- a/UI/Menus/OptionsMenu/options_menu.gd +++ b/UI/Menus/OptionsMenu/options_menu.gd @@ -20,6 +20,11 @@ func set_tab_locale() -> void: audio.name = tr("OPTIONS_TAB_AUDIO") +func _unhandled_input(event: InputEvent) -> void: + if event.is_action_pressed("Pause"): + queue_free() + + func _on_cancel_pressed() -> void: queue_free() diff --git a/UI/Menus/OptionsMenu/options_menu.tscn b/UI/Menus/OptionsMenu/options_menu.tscn index 6c53cea..4f57621 100644 --- a/UI/Menus/OptionsMenu/options_menu.tscn +++ b/UI/Menus/OptionsMenu/options_menu.tscn @@ -69,6 +69,8 @@ text = "BUTTON_CONFIRM" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=103920719] stream = SubResource("AudioStreamRandomizer_5otwj") +volume_db = -9.937 +bus = &"SFX" [connection signal="mouse_entered" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_button_hovered"] [connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"] diff --git a/UI/Menus/PauseMenu/pause_menu.tscn b/UI/Menus/PauseMenu/pause_menu.tscn index aa19d99..9de596b 100644 --- a/UI/Menus/PauseMenu/pause_menu.tscn +++ b/UI/Menus/PauseMenu/pause_menu.tscn @@ -61,6 +61,7 @@ text = "BUTTON_QUIT" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1218417780] stream = SubResource("AudioStreamRandomizer_n6ixr") +volume_db = -11.261 bus = &"SFX" [connection signal="mouse_entered" from="PanelContainer/VBoxContainer/Resume" to="." method="_on_button_mouse_entered"] diff --git a/Weapons/Ascension/weapon_stats.tres b/Weapons/Ascension/weapon_stats.tres index dab77d1..a602de1 100644 --- a/Weapons/Ascension/weapon_stats.tres +++ b/Weapons/Ascension/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://do05i1xtdwfqk"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_c5ghd"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_5pac0"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_hwijr"] [resource] @@ -11,5 +12,6 @@ attributes = Dictionary[String, float]({ "Energy": 5.0, "Fire Delay": 2.0 }) +features = Array[ExtResource("1_c5ghd")]([ExtResource("2_5pac0")]) text = "DESC_WEAPON_PLATFORM_DASH" metadata/_custom_type_script = "uid://dg7gxxqfqxcmc" diff --git a/Weapons/Assault/BoltGun.glb b/Weapons/Assault/BoltGun.glb index 53e6269..6856c5d 100644 Binary files a/Weapons/Assault/BoltGun.glb and b/Weapons/Assault/BoltGun.glb differ diff --git a/Weapons/Assault/BoltGun.glb.import b/Weapons/Assault/BoltGun.glb.import index 853d3fe..168789b 100644 --- a/Weapons/Assault/BoltGun.glb.import +++ b/Weapons/Assault/BoltGun.glb.import @@ -22,7 +22,7 @@ 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/generate_lods=false meshes/create_shadow_meshes=true meshes/light_baking=1 meshes/lightmap_texel_size=0.2 @@ -39,10 +39,15 @@ materials/extract_format=0 materials/extract_path="" _subresources={ "materials": { -"steel1": { +"metal3": { "use_external/enabled": true, -"use_external/fallback_path": "res://Materials/steel1/steel1.tres", -"use_external/path": "uid://qq11jacogcec" +"use_external/fallback_path": "res://Materials/metal3/metal3.tres", +"use_external/path": "uid://bte8u8o37f5mf" +}, +"metal4": { +"use_external/enabled": true, +"use_external/fallback_path": "res://Materials/metal4/metal4.tres", +"use_external/path": "uid://dse5i3rqndtrf" }, "wood1": { "use_external/enabled": true, diff --git a/Weapons/Assault/gun_shot.wav b/Weapons/Assault/gun_shot.wav new file mode 100644 index 0000000..f895cab Binary files /dev/null and b/Weapons/Assault/gun_shot.wav differ diff --git a/Weapons/Assault/gun_shot.wav.import b/Weapons/Assault/gun_shot.wav.import new file mode 100644 index 0000000..4ec2064 --- /dev/null +++ b/Weapons/Assault/gun_shot.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://gojj0xkvjwvm" +path="res://.godot/imported/gun_shot.wav-64186ca30dc40bcd0f9c1f8f141c0c10.sample" + +[deps] + +source_file="res://Weapons/Assault/gun_shot.wav" +dest_files=["res://.godot/imported/gun_shot.wav-64186ca30dc40bcd0f9c1f8f141c0c10.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/Weapons/Assault/rifle.tscn b/Weapons/Assault/rifle.tscn index 383688a..6d61826 100644 --- a/Weapons/Assault/rifle.tscn +++ b/Weapons/Assault/rifle.tscn @@ -2,20 +2,27 @@ [ext_resource type="Script" uid="uid://bp3o5klntwmhd" path="res://Scripts/Weapons/hitscan_weapon.gd" id="1_yvp43"] [ext_resource type="Resource" uid="uid://smctw4ogm4rx" path="res://Weapons/Assault/weapon_stats.tres" id="2_2k4c7"] -[ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://Audio/shot1.wav" id="2_5wfsb"] +[ext_resource type="AudioStream" uid="uid://gojj0xkvjwvm" path="res://Weapons/Assault/gun_shot.wav" id="3_5wfsb"] [ext_resource type="PackedScene" uid="uid://bjjlhmhfytbvm" path="res://Weapons/Assault/BoltGun.glb" id="4_5wfsb"] +[ext_resource type="Material" uid="uid://3m464q2bkdkm" path="res://Towers/Assault/PipePistolBullets.tres" id="5_1hdrg"] +[ext_resource type="Material" uid="uid://cj14tx36js7n2" path="res://boombox_mat.tres" id="6_1hdrg"] [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_1hdrg"] -random_pitch = 1.1 +random_pitch = 1.0832878 streams_count = 1 -stream_0/stream = ExtResource("2_5wfsb") +stream_0/stream = ExtResource("3_5wfsb") -[node name="Rifle" type="Node3D" unique_id=1518167828 node_paths=PackedStringArray("raycast", "audio_player", "recharge_timer")] +[sub_resource type="QuadMesh" id="QuadMesh_jw2fc"] +material = ExtResource("6_1hdrg") +size = Vector2(0.125, 0.125) + +[node name="Rifle" type="Node3D" unique_id=1518167828 node_paths=PackedStringArray("raycast", "audio_player", "recharge_timer", "particle_emitter")] script = ExtResource("1_yvp43") raycast = NodePath("RayCast3D") stats = ExtResource("2_2k4c7") audio_player = NodePath("AudioStreamPlayer3D") recharge_timer = NodePath("Timer") +particle_emitter = NodePath("HitParticle") metadata/_custom_type_script = "uid://bp3o5klntwmhd" [node name="RayCast3D" type="RayCast3D" parent="." unique_id=1349784403] @@ -30,7 +37,22 @@ one_shot = true stream = SubResource("AudioStreamRandomizer_1hdrg") bus = &"SFX" -[node name="BoltGun" parent="." unique_id=566167059 instance=ExtResource("4_5wfsb")] -transform = Transform3D(-0.07, 0, -1.0569706e-08, 0, 0.07, 0, 1.0569706e-08, 0, -0.07, 0, 0.15755616, -0.10932771) +[node name="BoltGun" parent="." unique_id=1115474442 instance=ExtResource("4_5wfsb")] + +[node name="Cube_001" parent="BoltGun" index="0" unique_id=1262514348] +layers = 2 + +[node name="HitParticle" type="GPUParticles3D" parent="." unique_id=76894935] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.086717755, -1.0784638) +emitting = false +amount = 5 +lifetime = 0.2 +one_shot = true +explosiveness = 1.0 +transform_align = 3 +process_material = ExtResource("5_1hdrg") +draw_pass_1 = SubResource("QuadMesh_jw2fc") [connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] + +[editable path="BoltGun"] diff --git a/Weapons/Blowdart/weapon_stats.tres b/Weapons/Blowdart/weapon_stats.tres index b05123e..545bda9 100644 --- a/Weapons/Blowdart/weapon_stats.tres +++ b/Weapons/Blowdart/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://c6e50linnk2i7"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_uay7i"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_i8iri"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_lbj0i"] [resource] @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.8, "Range": 15.0 }) +features = Array[ExtResource("1_uay7i")]([ExtResource("2_i8iri")]) text = "DESC_WEAPON_POISON" diff --git a/Weapons/BombLauncher/weapon_stats.tres b/Weapons/BombLauncher/weapon_stats.tres index f2f34cb..9c8d07a 100644 --- a/Weapons/BombLauncher/weapon_stats.tres +++ b/Weapons/BombLauncher/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://co6eorobj1xuu"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_gv6l8"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_82nig"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_fe8lx"] [resource] @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 2.0, "Range": 10.0 }) +features = Array[ExtResource("1_gv6l8")]([ExtResource("2_82nig")]) text = "DESC_WEAPON_BOMB" diff --git a/Weapons/Fireball/weapon_stats.tres b/Weapons/Fireball/weapon_stats.tres index 6ec8cff..b07de4a 100644 --- a/Weapons/Fireball/weapon_stats.tres +++ b/Weapons/Fireball/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://dhwhwicgpw7yh"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_ehd58"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_jskjg"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_yto3f"] [resource] @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 2.0, "Range": 15.0 }) +features = Array[ExtResource("1_ehd58")]([ExtResource("2_jskjg")]) text = "DESC_WEAPON_FIREBALL" diff --git a/Weapons/Flamethrower/weapon_stats.tres b/Weapons/Flamethrower/weapon_stats.tres index fe63cbd..5e74cf4 100644 --- a/Weapons/Flamethrower/weapon_stats.tres +++ b/Weapons/Flamethrower/weapon_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_rinww"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_drgp3"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_ufd52"] [resource] script = ExtResource("2_drgp3") @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.4, "Range": 3.0 }) +features = Array[ExtResource("1_rinww")]([ExtResource("2_ufd52")]) text = "DESC_WEAPON_FLAMETHROWER" diff --git a/Weapons/GlueLauncher/weapon_stats.tres b/Weapons/GlueLauncher/weapon_stats.tres index 14a8187..99df504 100644 --- a/Weapons/GlueLauncher/weapon_stats.tres +++ b/Weapons/GlueLauncher/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://boj1ho5x0sxtq"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_58qpp"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_lo73o"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_nlx26"] [resource] @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.5, "Range": 13.0 }) +features = Array[ExtResource("1_58qpp")]([ExtResource("2_lo73o")]) text = "DESC_WEAPON_GLUE" diff --git a/Weapons/Icicle/weapon_stats.tres b/Weapons/Icicle/weapon_stats.tres index fc98c8f..439408d 100644 --- a/Weapons/Icicle/weapon_stats.tres +++ b/Weapons/Icicle/weapon_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_5i8ch"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_5m6w7"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_52d2e"] [resource] script = ExtResource("2_5m6w7") @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 2.0, "Range": 15.0 }) +features = Array[ExtResource("1_5i8ch")]([ExtResource("2_52d2e")]) text = "DESC_WEAPON_ICE_SPIKE" diff --git a/Weapons/Overclock/weapon_stats.tres b/Weapons/Overclock/weapon_stats.tres index 18e378b..dacd2e4 100644 --- a/Weapons/Overclock/weapon_stats.tres +++ b/Weapons/Overclock/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://d3qmy6puuh1gl"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_m84e5"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_gglou"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_rl1ek"] [resource] @@ -13,5 +14,6 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.3, "Range": 100.0 }) +features = Array[ExtResource("1_m84e5")]([ExtResource("2_gglou")]) text = "DESC_WEAPON_SPEED_INCREASER" metadata/_custom_type_script = "uid://dg7gxxqfqxcmc" diff --git a/Weapons/Reactor/weapon_stats.tres b/Weapons/Reactor/weapon_stats.tres index a729b8b..30f1ffb 100644 --- a/Weapons/Reactor/weapon_stats.tres +++ b/Weapons/Reactor/weapon_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_2higs"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_ahbcx"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_h1dig"] [resource] script = ExtResource("2_ahbcx") @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.5, "Range": 3.0 }) +features = Array[ExtResource("1_2higs")]([ExtResource("2_h1dig")]) text = "DESC_WEAPON_RADIATION" diff --git a/Weapons/Refrigerator/weapon_stats.tres b/Weapons/Refrigerator/weapon_stats.tres index 4bc4980..8bdd6b6 100644 --- a/Weapons/Refrigerator/weapon_stats.tres +++ b/Weapons/Refrigerator/weapon_stats.tres @@ -1,6 +1,7 @@ [gd_resource type="Resource" script_class="CardText" format=3 uid="uid://5l758yxfpi1e"] [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_18tr7"] +[ext_resource type="Resource" uid="uid://dfup264h2pun7" path="res://Scripts/Features/HeavyRounds/heavy_rounds_feature.tres" id="2_h4hr6"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_wny82"] [resource] @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.5, "Range": 3.0 }) +features = Array[ExtResource("1_18tr7")]([ExtResource("2_h4hr6")]) text = "DESC_WEAPON_FREEZER" diff --git a/Weapons/Sniper/weapon_stats.tres b/Weapons/Sniper/weapon_stats.tres index ef26a6e..0d153d4 100644 --- a/Weapons/Sniper/weapon_stats.tres +++ b/Weapons/Sniper/weapon_stats.tres @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsuinotkvh7eu" path="res://Scripts/Resources/feature.gd" id="1_y0q7b"] [ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_qyvv8"] +[ext_resource type="Resource" uid="uid://bij61ul87ka0r" path="res://Scripts/Features/ExtendedBarrel/extended_barrel_feature.tres" id="2_ydgyt"] [resource] script = ExtResource("2_qyvv8") @@ -12,4 +13,5 @@ attributes = Dictionary[String, float]({ "Fire Delay": 0.9, "Range": 100.0 }) +features = Array[ExtResource("1_y0q7b")]([ExtResource("2_ydgyt")]) text = "DESC_WEAPON_SNIPER" diff --git a/Worlds/GreenPlanet/Enemies/air_enemy.tscn b/Worlds/GreenPlanet/Enemies/air_enemy.tscn index 5bee4d5..1950842 100644 --- a/Worlds/GreenPlanet/Enemies/air_enemy.tscn +++ b/Worlds/GreenPlanet/Enemies/air_enemy.tscn @@ -10,7 +10,7 @@ [sub_resource type="ViewportTexture" id="ViewportTexture_ss5ir"] viewport_path = NodePath("SubViewport") -[node name="Dog" type="CharacterBody3D" unique_id=208032021 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n") groups=["Enemies"]] +[node name="Dog" type="CharacterBody3D" unique_id=208032021 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n", "health_bar") groups=["Enemies"]] collision_layer = 4 collision_mask = 3 motion_mode = 1 @@ -19,6 +19,7 @@ status_manager = NodePath("StatusEffector") movement_controller = NodePath("BeeliningController") d_n = NodePath("Node3D") corpse_scene = ExtResource("2_aed6c") +health_bar = NodePath("SubViewport/HealthBar") [node name="Sprite3D" type="Sprite3D" parent="." unique_id=2020998819] transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0.637873, 0) diff --git a/Worlds/GreenPlanet/Enemies/enemy_controller.gd b/Worlds/GreenPlanet/Enemies/enemy_controller.gd index f7a75b7..5f51c65 100644 --- a/Worlds/GreenPlanet/Enemies/enemy_controller.gd +++ b/Worlds/GreenPlanet/Enemies/enemy_controller.gd @@ -11,6 +11,7 @@ signal health_changed(health: int) @export var d_n: Node3D #@export var sprite: Sprite3D @export var corpse_scene: PackedScene +@export var health_bar: HealthBar var damage_particle_scene: PackedScene = preload("res://UI/DamageParticle/damage_particle.tscn") var current_health: int @@ -23,8 +24,8 @@ var alive: bool = true func _ready() -> void: max_health = stats.health current_health = stats.health - health_changed.connect($SubViewport/HealthBar.on_health_changed) - $SubViewport/HealthBar.setup(stats.health) + health_changed.connect(health_bar.on_health_changed) + health_bar.setup(stats.health) movement_speed = stats.movement_speed status_manager.enemy = self diff --git a/Worlds/GreenPlanet/Enemies/land_enemy.tscn b/Worlds/GreenPlanet/Enemies/land_enemy.tscn index 2c89d0a..eec366d 100644 --- a/Worlds/GreenPlanet/Enemies/land_enemy.tscn +++ b/Worlds/GreenPlanet/Enemies/land_enemy.tscn @@ -21,7 +21,7 @@ region = Rect2(0, 0, 32, 32) [sub_resource type="ViewportTexture" id="ViewportTexture_4tj6k"] viewport_path = NodePath("SubViewport") -[node name="WalkingEnemy" type="CharacterBody3D" unique_id=180331738 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n") groups=["Enemies"]] +[node name="WalkingEnemy" type="CharacterBody3D" unique_id=180331738 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n", "health_bar") groups=["Enemies"]] collision_layer = 4 collision_mask = 3 script = ExtResource("1_fwsjt") @@ -29,6 +29,7 @@ status_manager = NodePath("StatusEffector") movement_controller = NodePath("PathingController") d_n = NodePath("Node3D") corpse_scene = ExtResource("2_y7h25") +health_bar = NodePath("SubViewport/HealthBar") [node name="DirectionSprite" parent="." unique_id=447693926 instance=ExtResource("2_o7jmg")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.585, 0) diff --git a/Worlds/GreenPlanet/Enemies/leaping_enemy.tscn b/Worlds/GreenPlanet/Enemies/leaping_enemy.tscn index 11801e7..544a480 100644 --- a/Worlds/GreenPlanet/Enemies/leaping_enemy.tscn +++ b/Worlds/GreenPlanet/Enemies/leaping_enemy.tscn @@ -37,7 +37,7 @@ viewport_path = NodePath("SubViewport5") [sub_resource type="ViewportTexture" id="ViewportTexture_5u3uw"] viewport_path = NodePath("SubViewport6") -[node name="LeapingEnemy" type="CharacterBody3D" unique_id=1033726948 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n") groups=["Enemies"]] +[node name="LeapingEnemy" type="CharacterBody3D" unique_id=1033726948 node_paths=PackedStringArray("status_manager", "movement_controller", "d_n", "health_bar") groups=["Enemies"]] collision_layer = 4 collision_mask = 3 script = ExtResource("1_joiuq") @@ -45,6 +45,7 @@ status_manager = NodePath("StatusEffector") movement_controller = NodePath("LeapingController") d_n = NodePath("Node3D") corpse_scene = ExtResource("2_ssgps") +health_bar = NodePath("SubViewport/HealthBar") [node name="Health" type="Node" parent="." unique_id=1287231964] script = ExtResource("3_dhcpw") diff --git a/Zones/Moat/scn_moat.tscn b/Zones/Moat/scn_moat.tscn index 3a4aac9..447a8ee 100644 --- a/Zones/Moat/scn_moat.tscn +++ b/Zones/Moat/scn_moat.tscn @@ -20,195 +20,6 @@ [ext_resource type="Texture2D" uid="uid://dqrfgw65d0sq8" path="res://Assets/Textures/bridge_map.png" id="28_6od8s"] [ext_resource type="PackedScene" uid="uid://ca174636iktc6" path="res://Zones/Moat/mesh_moat.glb" id="30_ttr7n"] -[sub_resource type="Shader" id="Shader_6od8s"] -code = "shader_type sky; -render_mode use_debanding; - -uniform vec4 sky_top_color : source_color = vec4(0.385, 0.454, 0.55, 1.0); -uniform vec4 sky_horizon_color : source_color = vec4(0.646, 0.656, 0.67, 1.0); -uniform float sky_curve : hint_range(0, 1) = 0.15; -uniform float sky_energy = 1.0; // In Lux. -uniform sampler2D sky_cover : filter_linear, source_color, hint_default_black; -uniform vec4 sky_cover_modulate : source_color = vec4(1.0, 1.0, 1.0, 1.0); -uniform vec4 ground_bottom_color : source_color = vec4(0.2, 0.169, 0.133, 1.0); -uniform vec4 ground_horizon_color : source_color = vec4(0.646, 0.656, 0.67, 1.0); -uniform float ground_curve : hint_range(0, 1) = 0.02; -uniform float ground_energy = 1.0; -uniform float sun_angle_max = 30.0; -uniform float sun_curve : hint_range(0, 1) = 0.15; -uniform float exposure : hint_range(0, 128) = 1.0; - -// Wind offset direction (x and y only) -uniform vec2 wind_offset_direction = vec2(0.5, 0.1); // Control direction of offset (x, y) -uniform float wind_speed : hint_range(0.0, 25.0) = 1.0; // Speed of the noise movement over time - -// Cloud change settings -uniform bool clouds_change = true; // Whether to change the cloud layer or not -uniform float cloud_change_rate : hint_range(0.0, 5.0) = .40; // Rate at which the cloud effect changes - -// Pole blending parameters -uniform float pole_blend_shape : hint_range(0.0, 2.0) = 0.05; // How much the noise affects the blend shape -uniform float pole_blend_strength : hint_range(0, 1) = 0.05; // Control blending intensity at poles -uniform float pole_blend_brightness : hint_range(0.0, 1.0) = .3; - -// Horizon blending parameters - similar to pole blending -uniform float horizon_blend_shape : hint_range(0.0, 2.0) = 0.05; // How much the noise affects the horizon blend shape -uniform float horizon_blend_strength : hint_range(0, 1) = 0.05; // Control blending intensity at horizon -uniform float horizon_blend_brightness : hint_range(0.0, 1.0) = .3; -uniform float horizon_blend_width : hint_range(0.0, 0.5) = 0.1; // Width of the horizon blend region - -void sky() { - float v_angle = acos(clamp(EYEDIR.y, -1.0, 1.0)); - float c = (1.0 - v_angle / (PI * 0.5)); - vec3 sky = mix(sky_horizon_color.rgb, sky_top_color.rgb, clamp(1.0 - pow(1.0 - c, 1.0 / sky_curve), 0.0, 1.0)); - sky *= sky_energy; - - if (LIGHT0_ENABLED) { - float sun_angle = acos(dot(LIGHT0_DIRECTION, EYEDIR)); - if (sun_angle < LIGHT0_SIZE) { - sky = LIGHT0_COLOR * LIGHT0_ENERGY; - } else if (sun_angle < sun_angle_max) { - float c2 = (sun_angle - LIGHT0_SIZE) / (sun_angle_max - LIGHT0_SIZE); - sky = mix(LIGHT0_COLOR * LIGHT0_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0)); - } - } - - if (LIGHT1_ENABLED) { - float sun_angle = acos(dot(LIGHT1_DIRECTION, EYEDIR)); - if (sun_angle < LIGHT1_SIZE) { - sky = LIGHT1_COLOR * LIGHT1_ENERGY; - } else if (sun_angle < sun_angle_max) { - float c2 = (sun_angle - LIGHT1_SIZE) / (sun_angle_max - LIGHT1_SIZE); - sky = mix(LIGHT1_COLOR * LIGHT1_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0)); - } - } - - if (LIGHT2_ENABLED) { - float sun_angle = acos(dot(LIGHT2_DIRECTION, EYEDIR)); - if (sun_angle < LIGHT2_SIZE) { - sky = LIGHT2_COLOR * LIGHT2_ENERGY; - } else if (sun_angle < sun_angle_max) { - float c2 = (sun_angle - LIGHT2_SIZE) / (sun_angle_max - LIGHT2_SIZE); - sky = mix(LIGHT2_COLOR * LIGHT2_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0)); - } - } - - if (LIGHT3_ENABLED) { - float sun_angle = acos(dot(LIGHT3_DIRECTION, EYEDIR)); - if (sun_angle < LIGHT3_SIZE) { - sky = LIGHT3_COLOR * LIGHT3_ENERGY; - } else if (sun_angle < sun_angle_max) { - float c2 = (sun_angle - LIGHT3_SIZE) / (sun_angle_max - LIGHT3_SIZE); - sky = mix(LIGHT3_COLOR * LIGHT3_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0)); - } - } - - // Sample the sky cover texture with dynamic offset (only x and y direction) - vec2 noise_coords = SKY_COORDS.xy + wind_offset_direction * wind_speed * TIME * 0.01; - - // Wrap UVs to keep tiling seamless - noise_coords = mod(noise_coords, 1.0); - - // Sample the original noise texture - vec4 sky_cover_texture = texture(sky_cover, noise_coords); - - // Sample flipped noise for Z-offset effect - vec4 flipped_noise = texture(sky_cover, vec2(noise_coords.x, 1.0 - noise_coords.y)); - - // Z blending (cloud change) logic - float cloud_blend_factor = 0.0; - if (clouds_change) { - // Use a sine wave to blend clouds smoothly over time based on the cloud_change_rate - cloud_blend_factor = 0.5 + 0.5 * sin(TIME * cloud_change_rate); - } - - // Blend between the original and flipped noise using cloud_blend_factor - vec4 blended_noise_texture = mix(sky_cover_texture, flipped_noise, cloud_blend_factor); - - // Pole blending - float base_pole_blend_factor = abs(EYEDIR.y); // Original blend factor (circular) - float noise_pole_blend = blended_noise_texture.r * pole_blend_shape; - float pole_blend_factor = smoothstep(1.0 - pole_blend_strength, 1.0, base_pole_blend_factor + noise_pole_blend); - - // Horizon blending - detect when we're near the horizon - float horizon_distance = abs(EYEDIR.y); // This will be close to 0 near the horizon - float horizon_factor = 1.0 - smoothstep(0.0, horizon_blend_width, horizon_distance); - float noise_horizon_blend = blended_noise_texture.g * horizon_blend_shape; - float horizon_blend_factor = smoothstep(1.0 - horizon_blend_strength, 1.0, horizon_factor + noise_horizon_blend); - - // Combine both blend factors (poles and horizon) - float combined_blend_factor = max(pole_blend_factor, horizon_blend_factor); - - // Blend noise with brightness value based on the combined factor - vec3 blended_noise = mix(blended_noise_texture.rgb, vec3(pole_blend_brightness), pole_blend_factor); - blended_noise = mix(blended_noise, vec3(horizon_blend_brightness), horizon_blend_factor); - - sky += (blended_noise * sky_cover_modulate.rgb) * blended_noise_texture.a * sky_cover_modulate.a * sky_energy; - - // Ground blending - c = (v_angle - (PI * 0.5)) / (PI * 0.5); - vec3 ground = mix(ground_horizon_color.rgb, ground_bottom_color.rgb, clamp(1.0 - pow(1.0 - c, 1.0 / ground_curve), 0.0, 1.0)); - ground *= ground_energy; - - COLOR = mix(ground, sky, step(0.0, EYEDIR.y)) * exposure; -}" - -[sub_resource type="Gradient" id="Gradient_dj4cy"] -offsets = PackedFloat32Array(0.151786, 0.5625, 1) -colors = PackedColorArray(0, 0, 0, 1, 0.565217, 0.565217, 0.565217, 1, 1, 1, 1, 1) - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_ttr7n"] -noise_type = 3 -domain_warp_enabled = true - -[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_r4es0"] -width = 1024 -height = 1024 -noise = SubResource("FastNoiseLite_ttr7n") -color_ramp = SubResource("Gradient_dj4cy") -seamless = true - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_4gdda"] -shader = SubResource("Shader_6od8s") -shader_parameter/sky_top_color = Color(0.25262, 0.408375, 0.692798, 1) -shader_parameter/sky_horizon_color = Color(0.48476, 0.638261, 0.884351, 1) -shader_parameter/sky_curve = 0.0349887 -shader_parameter/sky_energy = 1.0 -shader_parameter/sky_cover = SubResource("NoiseTexture2D_r4es0") -shader_parameter/sky_cover_modulate = Color(1, 1, 1, 1) -shader_parameter/ground_bottom_color = Color(0.121409, 0.203944, 0.437026, 1) -shader_parameter/ground_horizon_color = Color(0.486275, 0.639216, 0.882353, 1) -shader_parameter/ground_curve = 0.02 -shader_parameter/ground_energy = 1.0 -shader_parameter/sun_angle_max = 0.523599 -shader_parameter/sun_curve = 0.15 -shader_parameter/exposure = 1.0 -shader_parameter/wind_offset_direction = Vector2(0.5, 0.1) -shader_parameter/wind_speed = 0.0 -shader_parameter/clouds_change = true -shader_parameter/cloud_change_rate = 0.4 -shader_parameter/pole_blend_shape = 0.05 -shader_parameter/pole_blend_strength = 0.05 -shader_parameter/pole_blend_brightness = 0.3 -shader_parameter/horizon_blend_shape = 0.05 -shader_parameter/horizon_blend_strength = 0.05 -shader_parameter/horizon_blend_brightness = 0.3 -shader_parameter/horizon_blend_width = 0.1 - -[sub_resource type="Sky" id="Sky_t42h5"] -sky_material = SubResource("ShaderMaterial_4gdda") - -[sub_resource type="Environment" id="Environment_l41d0"] -background_mode = 2 -sky = SubResource("Sky_t42h5") -tonemap_mode = 4 -ssao_detail = 0.0 -fog_enabled = true -fog_mode = 1 -fog_density = 1.0 -fog_depth_begin = 50.0 -fog_depth_end = 200.0 - [sub_resource type="BoxShape3D" id="BoxShape3D_awjk1"] size = Vector3(3.6270146, 6.87512, 10) @@ -229,9 +40,6 @@ obstacles = Array[PackedScene]([ExtResource("7_6tcu8")]) metadata/_custom_type_script = "uid://cvejbo3srx8py" metadata/_editor_floor_ = Vector3(4, -10, 8) -[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1448536340] -environment = SubResource("Environment_l41d0") - [node name="EnemyGoal" type="Node3D" parent="." unique_id=1521533989 node_paths=PackedStringArray("audio_player")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 40.123978, 0.5, 0) script = ExtResource("9_s3rd7") @@ -294,7 +102,7 @@ type = 2 dest = NodePath("../EnemyGoal") enemy_path = NodePath("../Enemies") -[node name="CardPrinter" parent="." unique_id=99304729 instance=ExtResource("9_r25gu")] +[node name="CardPrinter" parent="." unique_id=459800869 instance=ExtResource("9_r25gu")] transform = Transform3D(-0.999501, 0, 0.0315681, 0, 1, 0, -0.0315681, 0, -0.999501, 33.0068, 0.499996, 17.3317) [node name="PlayerSpawnLocations" type="Node3D" parent="." unique_id=1727305710] diff --git a/boombox.glb b/boombox.glb new file mode 100644 index 0000000..c708a82 Binary files /dev/null and b/boombox.glb differ diff --git a/boombox.glb.import b/boombox.glb.import new file mode 100644 index 0000000..cb586ac --- /dev/null +++ b/boombox.glb.import @@ -0,0 +1,50 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://ca1y03riauk7v" +path="res://.godot/imported/boombox.glb-d3fb0997bada8ca92c4ca4e2d947043e.scn" + +[deps] + +source_file="res://boombox.glb" +dest_files=["res://.godot/imported/boombox.glb-d3fb0997bada8ca92c4ca4e2d947043e.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=false +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.002": { +"use_external/enabled": true, +"use_external/fallback_path": "res://boombox_mat.tres", +"use_external/path": "uid://cj14tx36js7n2" +} +} +} +gltf/naming_version=2 +gltf/embedded_image_handling=1 diff --git a/boombox_mat.tres b/boombox_mat.tres new file mode 100644 index 0000000..c829885 --- /dev/null +++ b/boombox_mat.tres @@ -0,0 +1,12 @@ +[gd_resource type="ShaderMaterial" format=3 uid="uid://cj14tx36js7n2"] + +[ext_resource type="Shader" uid="uid://dq04j2s5foo2f" path="res://Shaders/mightyduke_ps1.gdshader" id="1_hjeft"] +[ext_resource type="Texture2D" uid="uid://bhry0r8w4jmop" path="res://metal2.png" id="2_hjeft"] + +[resource] +render_priority = 0 +shader = ExtResource("1_hjeft") +shader_parameter/albedo = ExtResource("2_hjeft") +shader_parameter/jitter_z_coordinate = true +shader_parameter/jitter_depth_independent = true +shader_parameter/alpha_scissor = 1.0 diff --git a/boombox_metal_aluminium.png b/boombox_metal_aluminium.png new file mode 100644 index 0000000..021db61 Binary files /dev/null and b/boombox_metal_aluminium.png differ diff --git a/Gauntlet/gauntlet_cassette_tex.png.import b/boombox_metal_aluminium.png.import similarity index 69% rename from Gauntlet/gauntlet_cassette_tex.png.import rename to boombox_metal_aluminium.png.import index f23a05a..be48b84 100644 --- a/Gauntlet/gauntlet_cassette_tex.png.import +++ b/boombox_metal_aluminium.png.import @@ -2,20 +2,20 @@ importer="texture" type="CompressedTexture2D" -uid="uid://c7euohgr24npi" -path.s3tc="res://.godot/imported/gauntlet_cassette_tex.png-e9c09eb8277eaea99bb6a0798e69a42d.s3tc.ctex" +uid="uid://cfejjpssis218" +path.s3tc="res://.godot/imported/boombox_metal_aluminium.png-11f6ed83de652bab16152a3783bdf7d5.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true } generator_parameters={ -"md5": "8ffcdbb0faa5691927b8256d695d090b" +"md5": "1bf5ff62cbe7a4cc971555c7674a5a4d" } [deps] -source_file="res://Gauntlet/gauntlet_cassette_tex.png" -dest_files=["res://.godot/imported/gauntlet_cassette_tex.png-e9c09eb8277eaea99bb6a0798e69a42d.s3tc.ctex"] +source_file="res://boombox_metal_aluminium.png" +dest_files=["res://.godot/imported/boombox_metal_aluminium.png-11f6ed83de652bab16152a3783bdf7d5.s3tc.ctex"] [params] diff --git a/boombox_road_02.png b/boombox_road_02.png new file mode 100644 index 0000000..6d0a576 Binary files /dev/null and b/boombox_road_02.png differ diff --git a/Gauntlet/gauntlet_gauntlet_test_sprite.png.import b/boombox_road_02.png.import similarity index 68% rename from Gauntlet/gauntlet_gauntlet_test_sprite.png.import rename to boombox_road_02.png.import index ab5289e..3ba9c9c 100644 --- a/Gauntlet/gauntlet_gauntlet_test_sprite.png.import +++ b/boombox_road_02.png.import @@ -2,20 +2,20 @@ importer="texture" type="CompressedTexture2D" -uid="uid://b5es3jtoiurk0" -path.s3tc="res://.godot/imported/gauntlet_gauntlet_test_sprite.png-467bd17e9c858b14d9a4801c21138a65.s3tc.ctex" +uid="uid://dtdp1y7dvcook" +path.s3tc="res://.godot/imported/boombox_road_02.png-b793a6d4d8e2715bc0ef964756a97946.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true } generator_parameters={ -"md5": "ca126739c083c78c7d5305887ee9d27b" +"md5": "77c6adf66e10f09a997e096353d67627" } [deps] -source_file="res://Gauntlet/gauntlet_gauntlet_test_sprite.png" -dest_files=["res://.godot/imported/gauntlet_gauntlet_test_sprite.png-467bd17e9c858b14d9a4801c21138a65.s3tc.ctex"] +source_file="res://boombox_road_02.png" +dest_files=["res://.godot/imported/boombox_road_02.png-b793a6d4d8e2715bc0ef964756a97946.s3tc.ctex"] [params] diff --git a/cam_environment.tres b/cam_environment.tres new file mode 100644 index 0000000..95d1e99 --- /dev/null +++ b/cam_environment.tres @@ -0,0 +1,11 @@ +[gd_resource type="Environment" format=3 uid="uid://cpn2no3e8s361"] + +[resource] +ambient_light_source = 2 +ambient_light_color = Color(0.5609549, 0.5609549, 0.5609549, 1) +tonemap_mode = 4 +fog_enabled = true +fog_mode = 1 +fog_light_color = Color(0.608, 0.64, 0.60959995, 1) +fog_density = 1.0 +fog_depth_begin = 30.0 diff --git a/card_placing_tool.gd b/card_placing_tool.gd index 229964f..55387ef 100644 --- a/card_placing_tool.gd +++ b/card_placing_tool.gd @@ -55,6 +55,7 @@ func place_card(tower_base: TowerBase) -> void: hero.decrement_selected() hero.hud.hot_wheel.update_cassettes(hero.get_wheel_cards()) tower_base.add_card(card, multiplayer.get_unique_id()) + hero.placed_tower.emit(tower_base.tower) hero.place_card_audio.play() if hero.game_manager.card_gameplay: hero.discard_pile.add(card) diff --git a/click.wav b/click.wav new file mode 100644 index 0000000..2816463 Binary files /dev/null and b/click.wav differ diff --git a/click.wav.import b/click.wav.import new file mode 100644 index 0000000..c1632f0 --- /dev/null +++ b/click.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://ciyphup4n1sbi" +path="res://.godot/imported/click.wav-eb238f6fd9fd34c5c027498744914435.sample" + +[deps] + +source_file="res://click.wav" +dest_files=["res://.godot/imported/click.wav-eb238f6fd9fd34c5c027498744914435.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/hit_detector.gd b/hit_detector.gd new file mode 100644 index 0000000..c404a13 --- /dev/null +++ b/hit_detector.gd @@ -0,0 +1,9 @@ +class_name HitDetector +extends EnemyController + + +func _on_hitbox_took_damage(amount: int, damage_type: int, pos: Vector3) -> void: + #var sphere: CSGSphere3D = CSGSphere3D.new() + #add_child(sphere) + #sphere.global_position = pos + pass diff --git a/hit_detector.gd.uid b/hit_detector.gd.uid new file mode 100644 index 0000000..c284c83 --- /dev/null +++ b/hit_detector.gd.uid @@ -0,0 +1 @@ +uid://1cqp2ke7peqt diff --git a/metal2.png b/metal2.png new file mode 100644 index 0000000..a1b8a19 Binary files /dev/null and b/metal2.png differ diff --git a/metal2.png.import b/metal2.png.import new file mode 100644 index 0000000..bef7c05 --- /dev/null +++ b/metal2.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bhry0r8w4jmop" +path.s3tc="res://.godot/imported/metal2.png-c57b55fcc0737dfa62e1ad34c1ec8edf.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://metal2.png" +dest_files=["res://.godot/imported/metal2.png-c57b55fcc0737dfa62e1ad34c1ec8edf.s3tc.ctex"] + +[params] + +compress/mode=2 +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 diff --git a/path_vfx.gd b/path_vfx.gd index 2850fa9..2af3834 100644 --- a/path_vfx.gd +++ b/path_vfx.gd @@ -29,7 +29,7 @@ func path(path_points: Array[Vector3]) -> void: if path_points.size() > 2: vertices.append_array(get_quad(path_points[x], path_points[x + 1], Vector3.ZERO, path_points[x + 2])) else: - print("go1") + #print("go1") vertices.append_array(get_quad(path_points[x], path_points[x + 1], Vector3.ZERO, Vector3.ZERO)) #Add UVs @@ -108,7 +108,6 @@ func get_quad(start_point: Vector3, end_point: Vector3, head_point: Vector3, tai if head_point != Vector3.ZERO: head_to_start = Vector2(start_point.x, start_point.z) - Vector2(head_point.x, head_point.z) var start_to_end: Vector2 = Vector2(end_point.x, end_point.z) - Vector2(start_point.x, start_point.z) - var end_to_start: Vector2 = Vector2(start_point.x, start_point.z) - Vector2(end_point.x, end_point.z) var end_to_tail: Vector2 if tail_point != Vector3.ZERO: end_to_tail = Vector2(tail_point.x, tail_point.z) - Vector2(end_point.x, end_point.z) diff --git a/player_gym.tscn b/player_gym.tscn index d458503..5000a0b 100644 --- a/player_gym.tscn +++ b/player_gym.tscn @@ -5,6 +5,12 @@ [ext_resource type="Texture2D" uid="uid://bct2kqajrdfxl" path="res://Materials/bricks1/bricks1.png" id="3_lefvv"] [ext_resource type="Texture2D" uid="uid://b2prrul2qc8j2" path="res://Materials/cobblestone1/cobblestone1.png" id="4_ygwa6"] [ext_resource type="Texture2D" uid="uid://cnvndwp3q7rke" path="res://Materials/dirt1/dirt1.png" id="5_h6d8o"] +[ext_resource type="Script" uid="uid://1cqp2ke7peqt" path="res://hit_detector.gd" id="6_h6d8o"] +[ext_resource type="Resource" uid="uid://bdkcwve6d35gl" path="res://Worlds/TestingRange/Enemies/dummy.tres" id="7_1t6mq"] +[ext_resource type="Script" uid="uid://cummt2be3r1gq" path="res://Scripts/hitbox.gd" id="7_10hvj"] +[ext_resource type="Material" uid="uid://bxmmwv17kc3uw" path="res://Materials/wood2/wood2.tres" id="8_fxx58"] +[ext_resource type="PackedScene" uid="uid://hjq3nrnumklp" path="res://UI/EnemyHealthBar/health_bar.tscn" id="9_1t6mq"] +[ext_resource type="Script" uid="uid://cojjgevmbhwal" path="res://Scripts/status_effector.gd" id="10_74ojh"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_lefvv"] sky_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1) @@ -45,6 +51,9 @@ albedo_texture = ExtResource("5_h6d8o") uv1_scale = Vector3(10, 10, 10) texture_filter = 2 +[sub_resource type="BoxShape3D" id="BoxShape3D_1t6mq"] +size = Vector3(3, 3, 3) + [node name="PlayerGym" type="StaticBody3D" unique_id=176934332 groups=["grass"]] [node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1918125291] @@ -95,3 +104,29 @@ size = Vector3(10, 1, 10) [node name="CollisionShape3D" type="CollisionShape3D" parent="DirtPatch" unique_id=1840066499] shape = SubResource("BoxShape3D_6o6pr") + +[node name="StaticBody3D" type="CharacterBody3D" parent="." unique_id=1736737125 node_paths=PackedStringArray("status_manager", "health_bar")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.146767, 2.0000002, 1.4915252) +collision_layer = 4 +script = ExtResource("6_h6d8o") +stats = ExtResource("7_1t6mq") +status_manager = NodePath("StatusEffector") +health_bar = NodePath("HealthBar") +metadata/_custom_type_script = "uid://1cqp2ke7peqt" + +[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D" unique_id=612131976] +material_override = ExtResource("8_fxx58") +size = Vector3(3, 3, 3) + +[node name="Hitbox" type="CollisionShape3D" parent="StaticBody3D" unique_id=656436221] +shape = SubResource("BoxShape3D_1t6mq") +script = ExtResource("7_10hvj") +metadata/_custom_type_script = "uid://cummt2be3r1gq" + +[node name="HealthBar" parent="StaticBody3D" unique_id=411371062 instance=ExtResource("9_1t6mq")] + +[node name="StatusEffector" type="Node" parent="StaticBody3D" unique_id=1768631767] +script = ExtResource("10_74ojh") +metadata/_custom_type_script = "uid://cojjgevmbhwal" + +[connection signal="took_damage" from="StaticBody3D/Hitbox" to="StaticBody3D" method="_on_hitbox_took_damage"] diff --git a/project.godot b/project.godot index 4c86e49..4204f50 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Decked Out Defense" -config/version="0.3.5" +config/version="0.3.6" run/main_scene="uid://d2k8y13qfvch0" config/features=PackedStringArray("4.6", "Forward Plus") boot_splash/show_image=false @@ -28,9 +28,10 @@ gdscript/warnings/inferred_declaration=2 [display] -window/size/viewport_width=640 -window/size/viewport_height=360 +window/size/viewport_width=1920 +window/size/viewport_height=1080 window/stretch/mode="viewport" +window/stretch/scale=3.0 window/stretch/scale_mode="integer" [editor] diff --git a/spacecarpet.png b/spacecarpet.png new file mode 100644 index 0000000..074228d Binary files /dev/null and b/spacecarpet.png differ diff --git a/spacecarpet.png.import b/spacecarpet.png.import new file mode 100644 index 0000000..c7a698c --- /dev/null +++ b/spacecarpet.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dpoh286i50fhj" +path="res://.godot/imported/spacecarpet.png-1bea745e006d873645bc411039215158.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://spacecarpet.png" +dest_files=["res://.godot/imported/spacecarpet.png-1bea745e006d873645bc411039215158.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 diff --git a/wave_viewer.gd b/wave_viewer.gd index 9104165..df90470 100644 --- a/wave_viewer.gd +++ b/wave_viewer.gd @@ -10,6 +10,12 @@ signal closed() @export var enemy_desc_label: RichTextLabel +func _unhandled_input(event: InputEvent) -> void: + if event.is_action_pressed("Pause"): + queue_free() + closed.emit() + + func set_waves(waves: Array[WaveConfig], starting_wave_number: int) -> void: var i: int = starting_wave_number for wave: WaveConfig in waves: