From a452bbb406b1fe0ce57023e003ee4cbe5359996a Mon Sep 17 00:00:00 2001 From: Lexi Quinn Date: Mon, 21 Jul 2025 05:56:11 +1000 Subject: [PATCH] slight gameplay changes and new ui --- Assets/Fonts/Quaver v1.0/quaver.ttf | Bin 0 -> 15585 bytes Assets/Fonts/Quaver v1.0/quaver.ttf.import | 40 +++++ Assets/Fonts/Quaver v1.0/readme.txt | 9 ++ Assets/Textures/battery.png | Bin 0 -> 208 bytes Assets/Textures/battery.png.import | 34 +++++ Cards/assault.tres | 2 +- Cards/gatling.tres | 3 +- Cards/glue_launcher.tres | 3 +- Cards/reactor.tres | 3 +- Cards/rocket_launcher.tres | 2 +- Cards/sniper.tres | 3 +- Enemies/BabyEyeDog/baby_eye_dog_mat.tres | 3 - Enemies/ElderEyeDog/elder_eye_dog_mat.tres | 3 - Enemies/EyeDog/psx_model_material.tres | 3 - PCs/FSM/fighting_state.gd | 4 +- PCs/PathEditTool/path_edit_tool.gd | 8 +- PCs/hero.gd | 8 +- PCs/hero.tscn | 148 ++++++++++++------- PCs/hud.gd | 7 +- PCs/player_movement.gd | 4 +- Scenes/Menus/MainMenu/main_menu.gd | 1 - Scenes/Menus/MainMenu/main_menu.tscn | 83 +++-------- Scenes/TowerBase/tower_base.gd | 6 +- Scenes/UI/card_hand.tscn | 12 +- Scenes/damage_particle.tscn | 7 +- Scripts/Resources/card.gd | 2 +- Scripts/card_hand.gd | 12 +- Scripts/data.gd | 3 +- Scripts/game.gd | 17 ++- Shaders/jitter.gdshader | 7 +- Shaders/mightyduke.gdshader | 39 +++++ Shaders/mightyduke.gdshader.uid | 1 + UI/CardSelectionBox/card_selection_box.gd | 9 +- UI/CardSelectionBox/card_selection_box.tscn | 34 +++-- UI/EnergyBar/energy_bar.gd | 2 + UI/new_theme.tres | 10 +- UI/psx_ui.tres | 9 ++ Weapons/Assault/weapon_material.tres | 3 - Worlds/GreenPlanet/Levels/Bridge/bridge.tscn | 42 +++++- card_placing_tool.gd | 3 +- coin/Coin.glb | Bin 0 -> 5972 bytes coin/Coin.glb.import | 44 ++++++ coin/Coin_coin.png | Bin 0 -> 406 bytes coin/Coin_coin.png.import | 38 +++++ coin/coin.png | Bin 0 -> 406 bytes coin/coin.png.import | 35 +++++ coin/coin_material.tres | 10 ++ left_hand/left_hand_mat.tres | 3 - main.gd | 4 + main.tscn | 35 ++--- project.godot | 17 ++- rotate.gd | 7 + rotate.gd.uid | 1 + 53 files changed, 538 insertions(+), 245 deletions(-) create mode 100644 Assets/Fonts/Quaver v1.0/quaver.ttf create mode 100644 Assets/Fonts/Quaver v1.0/quaver.ttf.import create mode 100644 Assets/Fonts/Quaver v1.0/readme.txt create mode 100644 Assets/Textures/battery.png create mode 100644 Assets/Textures/battery.png.import create mode 100644 Shaders/mightyduke.gdshader create mode 100644 Shaders/mightyduke.gdshader.uid create mode 100644 UI/psx_ui.tres create mode 100644 coin/Coin.glb create mode 100644 coin/Coin.glb.import create mode 100644 coin/Coin_coin.png create mode 100644 coin/Coin_coin.png.import create mode 100644 coin/coin.png create mode 100644 coin/coin.png.import create mode 100644 coin/coin_material.tres create mode 100644 rotate.gd create mode 100644 rotate.gd.uid diff --git a/Assets/Fonts/Quaver v1.0/quaver.ttf b/Assets/Fonts/Quaver v1.0/quaver.ttf new file mode 100644 index 0000000000000000000000000000000000000000..fc86ee3222b0553618786b201342222398b30d6a GIT binary patch literal 15585 zcmZQzWME+6VrXDsW>D}C);Efo+%cAxi24(>U2F54pIhAQA zEsKH~7}y#Z7}Rt!QWI066&-{a7#P+tFff>9WTYmtH!(kEU|@K{z`&rAky}#n0Biwc z2Ll6RM^1inA_Kdh3j|-V*ZeRv+IT)D0Iv7AC zGsAxdMu_?b<_3@mNC_M#fkl!S)EGFyVoYEXnP6h_WSqdj%D}?J0FwOQ0HK)}7>pUt zfD}U90%C#9asaa!7#JcQee@U{7!;KFAZ}m=OG5}Ih)We17#JELn6ZJO0c1W?1H^YA z8sr-gW^71ND*!10<^cFt9MZU|?WiV_;!m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3VZHA4Y zRiZ4QRl`~gcc5%W1|CK>D4U6ak5LH9W@g}FRDiNs7-SfAplntKF-8w4n~i~oF%HV+ zWRPIYg0i_7ycnCHY+eQt#xqbhA444D11MXVA&kjRBUw|y$iT=@!7s5SBQZ}QI61$h zq_8xxEVU>oHN7+^u?WI}kP1+-u+*aB%=|nBLp=kC1hVen#JpmK;?$zdG=+l9iqss1 zwEVmh9fg$2yu{qhWQFp~l#&cRXJ-YcNCjg(1HFurl7eC@ef{L3)Wnj^vee}K+}!-U zV!iyLbp4#nBr(1`UQ}22BP91|tRo1|tST1_cH`hD3%Eh75*8hCBuZhG2$d zhJ1z+h7yKChEj$^hBAg!h9ZU_hE#@hhEj$chD3%U6d7by3TW!Wz7!(-Nz-E>(=rAZSq%c%6^HUk}z^*E0&}T?usASNGnyb%{$WY3l z54JazK>_SfkbAPhZcJh*V#sGG2Zsa5?G+3P3|S1N47m&-cPKFAgKaKiP+&-8PymN> z6+k44ofy`glX=O&z|iIC z;uvDlo1Cyfz~Iru-~K&OF>D7+*BcroB_t#ya9Eb}t*#P_xi;Ujm@V|c5th|fIc$I2 zudP`>jn(|Zkt0v+cWKY~klEJQy?vSDZZ6fF3%m}D2Dd*l&S5)XayUo*Bty#VuU9vH z*u|2qqj1~ngtSX5qh0<5Gaio2v;+ku9uCGYTYBd;c3gG0V_-1o(F@TGW#D9BU|{fc L^>bP0l+XkKnp8-^ literal 0 HcmV?d00001 diff --git a/Assets/Textures/battery.png.import b/Assets/Textures/battery.png.import new file mode 100644 index 0000000..17a2cdc --- /dev/null +++ b/Assets/Textures/battery.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://up7omskwg0yx" +path="res://.godot/imported/battery.png-5347a257821eef012070cbdddeb2d581.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Textures/battery.png" +dest_files=["res://.godot/imported/battery.png-5347a257821eef012070cbdddeb2d581.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Cards/assault.tres b/Cards/assault.tres index 5715c1d..da62cc4 100644 --- a/Cards/assault.tres +++ b/Cards/assault.tres @@ -9,7 +9,7 @@ [resource] script = ExtResource("1_yqa4b") -duration = 5 +cost = 2 rarity = 0 faction = 1 turret_scene = ExtResource("4_5nu32") diff --git a/Cards/gatling.tres b/Cards/gatling.tres index c16a24b..af2e600 100644 --- a/Cards/gatling.tres +++ b/Cards/gatling.tres @@ -8,11 +8,12 @@ [resource] script = ExtResource("1_5html") -duration = 4 +cost = 2 rarity = 0 faction = 1 turret_scene = ExtResource("4_thk7u") weapon_scene = ExtResource("3_wkjyf") weapon_stats = ExtResource("4_76fd1") tower_stats = ExtResource("3_4hykq") +tags = Array[int]([]) display_name = "Gatling" diff --git a/Cards/glue_launcher.tres b/Cards/glue_launcher.tres index bf5b5f9..24d0edc 100644 --- a/Cards/glue_launcher.tres +++ b/Cards/glue_launcher.tres @@ -8,11 +8,12 @@ [resource] script = ExtResource("1_tdu8a") -duration = 4 +cost = 2 rarity = 0 faction = 1 turret_scene = ExtResource("4_xcrut") weapon_scene = ExtResource("5_l3c38") weapon_stats = ExtResource("3_dukui") tower_stats = ExtResource("3_e5fta") +tags = Array[int]([]) display_name = "Glue Launcher" diff --git a/Cards/reactor.tres b/Cards/reactor.tres index a56e1f4..f8b496b 100644 --- a/Cards/reactor.tres +++ b/Cards/reactor.tres @@ -8,11 +8,12 @@ [resource] script = ExtResource("1_0ciid") -duration = 4 +cost = 5 rarity = 4 faction = 1 turret_scene = ExtResource("3_l4xwa") weapon_scene = ExtResource("3_de72q") weapon_stats = ExtResource("4_wilo7") tower_stats = ExtResource("3_7vuex") +tags = Array[int]([]) display_name = "Reactor" diff --git a/Cards/rocket_launcher.tres b/Cards/rocket_launcher.tres index 7e93594..2e494f9 100644 --- a/Cards/rocket_launcher.tres +++ b/Cards/rocket_launcher.tres @@ -9,7 +9,7 @@ [resource] script = ExtResource("1_ly0o5") -duration = 5 +cost = 3 rarity = 0 faction = 1 turret_scene = ExtResource("3_73c50") diff --git a/Cards/sniper.tres b/Cards/sniper.tres index 580309a..30e294b 100644 --- a/Cards/sniper.tres +++ b/Cards/sniper.tres @@ -8,11 +8,12 @@ [resource] script = ExtResource("1_5vmtk") -duration = 6 +cost = 2 rarity = 1 faction = 1 turret_scene = ExtResource("4_k5nhs") weapon_scene = ExtResource("3_qfpvu") weapon_stats = ExtResource("4_7kvq1") tower_stats = ExtResource("3_6i55t") +tags = Array[int]([]) display_name = "Sniper" diff --git a/Enemies/BabyEyeDog/baby_eye_dog_mat.tres b/Enemies/BabyEyeDog/baby_eye_dog_mat.tres index 7d7c180..5b0119d 100644 --- a/Enemies/BabyEyeDog/baby_eye_dog_mat.tres +++ b/Enemies/BabyEyeDog/baby_eye_dog_mat.tres @@ -6,8 +6,5 @@ [resource] render_priority = 0 shader = ExtResource("1_0addr") -shader_parameter/affine_mapping = true shader_parameter/albedo = ExtResource("2_4kam3") shader_parameter/alpha_scissor = 0.5 -shader_parameter/jitter = 0.25 -shader_parameter/resolution = Vector2i(320, 240) diff --git a/Enemies/ElderEyeDog/elder_eye_dog_mat.tres b/Enemies/ElderEyeDog/elder_eye_dog_mat.tres index 05c418b..f46673c 100644 --- a/Enemies/ElderEyeDog/elder_eye_dog_mat.tres +++ b/Enemies/ElderEyeDog/elder_eye_dog_mat.tres @@ -6,8 +6,5 @@ [resource] render_priority = 0 shader = ExtResource("1_x1doh") -shader_parameter/affine_mapping = true shader_parameter/albedo = ExtResource("2_jh2nf") shader_parameter/alpha_scissor = 0.5 -shader_parameter/jitter = 0.25 -shader_parameter/resolution = Vector2i(320, 240) diff --git a/Enemies/EyeDog/psx_model_material.tres b/Enemies/EyeDog/psx_model_material.tres index dd5558e..89ad2e9 100644 --- a/Enemies/EyeDog/psx_model_material.tres +++ b/Enemies/EyeDog/psx_model_material.tres @@ -6,8 +6,5 @@ [resource] render_priority = 0 shader = ExtResource("1_crvh7") -shader_parameter/affine_mapping = true shader_parameter/albedo = ExtResource("2_1d6vt") shader_parameter/alpha_scissor = 0.5 -shader_parameter/jitter = 0.25 -shader_parameter/resolution = Vector2i(320, 240) diff --git a/PCs/FSM/fighting_state.gd b/PCs/FSM/fighting_state.gd index 64323c6..643422e 100644 --- a/PCs/FSM/fighting_state.gd +++ b/PCs/FSM/fighting_state.gd @@ -27,8 +27,8 @@ func exit_state() -> void: hero.weapons[hero.equipped_weapon].visible = false hero.hud.set_energy_visible(false) hero.hud.grow_wave_start_label() - hero.hud.primary_duration.visible = true - hero.hud.secondary_duration.visible = true + #hero.hud.primary_duration.visible = true + #hero.hud.secondary_duration.visible = true hero.hud.energy_label.visible = true diff --git a/PCs/PathEditTool/path_edit_tool.gd b/PCs/PathEditTool/path_edit_tool.gd index af4a0c0..ff0eb5c 100644 --- a/PCs/PathEditTool/path_edit_tool.gd +++ b/PCs/PathEditTool/path_edit_tool.gd @@ -36,7 +36,7 @@ func _process(delta: float) -> void: if interact_key_held: if !interacted_once: - if valid_point and hero.energy >= Data.wall_cost and ray_collider and point.buildable: + if valid_point and hero.currency >= Data.wall_cost and ray_collider and point.buildable: interact_held_time += delta set_progress_percent(interact_held_time / interact_hold_time) wall_preview.set_float(interact_held_time / interact_hold_time) @@ -93,7 +93,7 @@ func reset() -> void: func process_looking_at_level() -> void: point = level.flow_field.get_closest_buildable_point(ray_point) - if level.walls.has(point) or !point.buildable or hero.energy < Data.wall_cost: + if level.walls.has(point) or !point.buildable or hero.currency < Data.wall_cost: wall_preview.set_visible(false) valid_point = false clear_previous_point() @@ -127,8 +127,8 @@ func process_looking_at_tower() -> void: func build_wall() -> void: - if point and valid_point and hero.energy >= Data.wall_cost: - hero.energy -= Data.wall_cost + if point and valid_point and hero.currency >= Data.wall_cost: + hero.currency -= Data.wall_cost level.set_wall(point, multiplayer.get_unique_id()) wall_preview.visible = false diff --git a/PCs/hero.gd b/PCs/hero.gd index 7264363..8cbb48a 100644 --- a/PCs/hero.gd +++ b/PCs/hero.gd @@ -137,6 +137,8 @@ func check_removal() -> void: for card: Card in unique_cards: if !hand.contents.has(card): index = unique_cards.find(card) + for i: int in selection_boxes.size(): + selection_boxes[i].set_amount(hand.contents.count(unique_cards[i])) if index >= 0: unique_cards.remove_at(index) selection_boxes[index].queue_free() @@ -327,6 +329,7 @@ func draw_to_hand_size() -> void: var box: CardSelectionBox = card_select_scene.instantiate() box.set_card(card) box.set_key(i) + box.set_amount(hand.contents.count(unique_cards[i])) selection_boxes.append(box) $HUD/selection_boxes.add_child(box) hand_selected_index = 0 @@ -342,8 +345,7 @@ func update_selected_box() -> void: func equip_weapon(slot: int = 0) -> void: if hand.size == 0: return - var energy_cost: int = int(hand.item_at(hand_selected_index).rarity) + 1 - energy_cost *= 2 + var energy_cost: int = selected_card.cost if energy < energy_cost: return if weapons[slot] != null: @@ -360,7 +362,7 @@ func equip_weapon(slot: int = 0) -> void: #decrement_selected() weapons[slot] = cards[slot].weapon_scene.instantiate() weapons[slot].name = str(weapons_spawn_count) - weapons[slot].duration = cards[slot].duration + weapons[slot].duration = 1 networked_equip_weapon.rpc(Data.cards.find(cards[slot]), 0, weapons_spawn_count) weapons_spawn_count += 1 weapons[slot].set_multiplayer_authority(multiplayer.get_unique_id()) diff --git a/PCs/hero.tscn b/PCs/hero.tscn index 859df2f..a09c393 100644 --- a/PCs/hero.tscn +++ b/PCs/hero.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=64 format=3 uid="uid://dxgxbtf68lcv5"] +[gd_scene load_steps=68 format=3 uid="uid://dxgxbtf68lcv5"] [ext_resource type="Script" uid="uid://1fqpoegbdm6n" path="res://PCs/hero.gd" id="1_pihpe"] [ext_resource type="Resource" uid="uid://b5pc3frhx467q" path="res://Classes/Engineer/class.tres" id="2_dbyo0"] @@ -36,6 +36,7 @@ [ext_resource type="AudioStream" uid="uid://bn8lkvy5wibvo" path="res://Audio/cardSlide1.ogg" id="28_1thk8"] [ext_resource type="AudioStream" uid="uid://d32gpcu8w1yvn" path="res://Audio/cardSlide2.ogg" id="29_s0a0l"] [ext_resource type="AudioStream" uid="uid://val5n418yebw" path="res://Audio/cardSlide3.ogg" id="30_djhlg"] +[ext_resource type="Texture2D" uid="uid://up7omskwg0yx" path="res://Assets/Textures/battery.png" id="30_rim6q"] [ext_resource type="AudioStream" uid="uid://ck6g061w7i6ro" path="res://Audio/cardSlide4.ogg" id="31_546e6"] [ext_resource type="AudioStream" uid="uid://bj8eitlsjdotb" path="res://Audio/cardSlide5.ogg" id="32_tg7y0"] [ext_resource type="AudioStream" uid="uid://d0620p56ad34a" path="res://Audio/cardSlide6.ogg" id="33_2v5co"] @@ -50,6 +51,8 @@ [ext_resource type="Script" uid="uid://b5h7jfwkyokes" path="res://PCs/FSM/building_state.gd" id="47_d8pnf"] [ext_resource type="Script" uid="uid://cjdv1onyfej0m" path="res://PCs/FSM/carding_state.gd" id="48_7d213"] [ext_resource type="Script" uid="uid://cf7m4yyiqhhru" path="res://PCs/FSM/fighting_state.gd" id="49_60hic"] +[ext_resource type="PackedScene" uid="uid://bg4pmewlvshu8" path="res://coin/Coin.glb" id="51_w13oc"] +[ext_resource type="Script" uid="uid://dq0yemhxscvtm" path="res://rotate.gd" id="52_rim6q"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"] radius = 0.3 @@ -79,6 +82,9 @@ viewport_path = NodePath("FirstPersonViewport") [sub_resource type="ViewportTexture" id="ViewportTexture_574jy"] viewport_path = NodePath("MiniMapViewport") +[sub_resource type="ViewportTexture" id="ViewportTexture_w13oc"] +viewport_path = NodePath("CoinViewport") + [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_tsiqi"] properties/0/path = NodePath(".:position") properties/0/spawn = true @@ -318,7 +324,7 @@ script = ExtResource("8_yl6ka") player = NodePath("..") wave_count = NodePath("EnemyTracker/WaveCount") lives_count = NodePath("LivesBar/LivesCount") -currency_count = NodePath("Minimap/CurrencyCount") +currency_count = NodePath("Currencies/CoinCounter/CurrencyCount") minimap_outline = NodePath("Minimap/MinimapBorder") minimap = NodePath("Minimap") minimap_cam = NodePath("../MiniMapViewport/Camera3D") @@ -328,14 +334,14 @@ hover_text = NodePath("InteractLabel") enemy_sprites = [NodePath("EnemyTracker/TextureRect"), NodePath("EnemyTracker/TextureRect2"), NodePath("EnemyTracker/TextureRect3"), NodePath("EnemyTracker/TextureRect4"), NodePath("EnemyTracker/TextureRect5")] enemy_counts = [NodePath("EnemyTracker/TextureRect/Label"), NodePath("EnemyTracker/TextureRect2/Label2"), NodePath("EnemyTracker/TextureRect3/Label3"), NodePath("EnemyTracker/TextureRect4/Label4"), NodePath("EnemyTracker/TextureRect5/Label5")] pickup_notif_scene = ExtResource("17_oyeww") -wave_start_label = NodePath("RichTextLabel") +wave_start_label = NodePath("StartWaveLabel") place_icon = NodePath("PlaceIcon") swap_icon = NodePath("SwapIcon") place_text = NodePath("PlaceIcon/RichTextLabel") swap_text = NodePath("SwapIcon/RichTextLabel") enemy_card_scene = ExtResource("18_dfkac") new_energy_bar = NodePath("EnergyBar") -energy_label = NodePath("EnergyLabel") +energy_label = NodePath("Currencies/HBoxContainer/EnergyLabel") primary_duration = NodePath("weapon_duration") secondary_duration = NodePath("weapon_duration2") @@ -361,6 +367,7 @@ offset_right = -331.0 offset_bottom = -1.0 grow_horizontal = 0 grow_vertical = 0 +mouse_filter = 2 texture = ExtResource("18_okmpi") [node name="RichTextLabel" type="RichTextLabel" parent="HUD/PlaceIcon"] @@ -370,6 +377,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 bbcode_enabled = true text = "#Primary Fire#" scroll_active = false @@ -389,6 +397,7 @@ offset_right = -6.0 offset_bottom = -1.0 grow_horizontal = 0 grow_vertical = 0 +mouse_filter = 2 texture = ExtResource("18_okmpi") [node name="RichTextLabel" type="RichTextLabel" parent="HUD/SwapIcon"] @@ -398,6 +407,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 bbcode_enabled = true text = "#Secondary Fire#" scroll_active = false @@ -405,6 +415,7 @@ horizontal_alignment = 1 vertical_alignment = 1 [node name="Minimap" type="TextureRect" parent="HUD"] +visible = false anchors_preset = 1 anchor_left = 1.0 anchor_right = 1.0 @@ -430,22 +441,8 @@ grow_horizontal = 0 mouse_filter = 2 texture = ExtResource("16_x1xjr") -[node name="CurrencyCount" type="Label" parent="HUD/Minimap"] -layout_mode = 1 -anchors_preset = 1 -anchor_left = 1.0 -anchor_right = 1.0 -offset_left = -61.0 -offset_top = 260.0 -offset_bottom = 318.0 -grow_horizontal = 0 -theme_override_colors/font_color = Color(0.988235, 0.909804, 0.65098, 1) -theme_override_font_sizes/font_size = 37 -text = "20" -horizontal_alignment = 1 -vertical_alignment = 1 - [node name="FPSCounter" type="Label" parent="HUD"] +visible = false anchors_preset = 1 anchor_left = 1.0 anchor_right = 1.0 @@ -630,13 +627,12 @@ offset_right = 296.0 offset_bottom = 84.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_colors/default_color = Color(0, 0, 0, 1) -theme_override_colors/font_outline_color = Color(1, 1, 1, 1) -theme_override_constants/outline_size = 5 -theme_override_font_sizes/normal_font_size = 32 +mouse_filter = 2 bbcode_enabled = true text = "[center]Press Button To do thing" scroll_active = false +horizontal_alignment = 1 +vertical_alignment = 1 [node name="VBoxContainer" type="VBoxContainer" parent="HUD"] anchors_preset = 4 @@ -647,20 +643,19 @@ offset_top = -295.0 offset_right = 445.0 offset_bottom = -40.0 grow_vertical = 0 +mouse_filter = 2 alignment = 2 -[node name="RichTextLabel" type="RichTextLabel" parent="HUD"] -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -300.0 -offset_top = 110.0 -offset_right = 300.0 -offset_bottom = 160.0 +[node name="StartWaveLabel" type="RichTextLabel" parent="HUD"] +anchors_preset = -1 +anchor_left = 0.34 +anchor_top = 0.085 +anchor_right = 0.69 +anchor_bottom = 0.155 grow_horizontal = 2 -theme_override_font_sizes/normal_font_size = 32 +mouse_filter = 2 bbcode_enabled = true -text = "[center]Press #Ready# to start wave[/center]" +text = "[center]#Ready# Start wave[/center]" scroll_active = false [node name="Control2" type="Control" parent="HUD"] @@ -672,6 +667,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 0 grow_vertical = 0 +mouse_filter = 2 [node name="Control3" type="Control" parent="HUD"] layout_mode = 3 @@ -682,6 +678,7 @@ anchor_right = 0.5 anchor_bottom = 0.5 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 [node name="EnergyBar" parent="HUD" instance=ExtResource("27_14ugt")] visible = false @@ -723,42 +720,31 @@ texture = ExtResource("26_dfkac") expand_mode = 3 stretch_mode = 5 -[node name="EnergyLabel" type="Label" parent="HUD"] -anchors_preset = -1 -anchor_left = 0.978 -anchor_top = 0.341 -anchor_right = 0.978 -anchor_bottom = 0.341 -offset_left = -103.0 -offset_bottom = 40.0 -grow_horizontal = 0 -text = "energy = 0" -horizontal_alignment = 1 -vertical_alignment = 1 - [node name="weapon_duration" type="Label" parent="HUD"] +visible = false anchors_preset = -1 anchor_left = 0.978 -anchor_top = 0.376 +anchor_top = 0.186 anchor_right = 0.978 -anchor_bottom = 0.376 +anchor_bottom = 0.186 offset_left = -103.0 offset_bottom = 40.0 grow_horizontal = 0 -text = "primary weapon rounds left = 0" +text = "w1 = 0" horizontal_alignment = 1 vertical_alignment = 1 [node name="weapon_duration2" type="Label" parent="HUD"] +visible = false anchors_preset = -1 anchor_left = 0.978 -anchor_top = 0.411 +anchor_top = 0.251 anchor_right = 0.978 -anchor_bottom = 0.411 +anchor_bottom = 0.261 offset_left = -103.0 offset_bottom = 40.0 grow_horizontal = 0 -text = "secondary weapon rounds left = 0" +text = "w2 = 0" horizontal_alignment = 1 vertical_alignment = 1 @@ -768,8 +754,46 @@ offset_left = 73.0 offset_top = 457.0 offset_right = 753.0 offset_bottom = 585.0 +mouse_filter = 2 alignment = 1 +[node name="Currencies" type="VBoxContainer" parent="HUD"] +anchors_preset = -1 +anchor_left = 0.95 +anchor_top = 0.05 +anchor_right = 0.95 +anchor_bottom = 0.05 +grow_horizontal = 0 + +[node name="CoinCounter" type="HBoxContainer" parent="HUD/Currencies"] +layout_mode = 2 + +[node name="CoinTexture" type="TextureRect" parent="HUD/Currencies/CoinCounter"] +layout_mode = 2 +mouse_filter = 2 +texture = SubResource("ViewportTexture_w13oc") + +[node name="CurrencyCount" type="Label" parent="HUD/Currencies/CoinCounter"] +layout_mode = 2 +text = "20" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="HUD/Currencies"] +layout_mode = 2 + +[node name="TextureRect" type="TextureRect" parent="HUD/Currencies/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("30_rim6q") +expand_mode = 3 +stretch_mode = 5 + +[node name="EnergyLabel" type="Label" parent="HUD/Currencies/HBoxContainer"] +layout_mode = 2 +text = "0" +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="WeaponSwapTimer" type="Timer" parent="."] wait_time = 0.4 one_shot = true @@ -826,6 +850,26 @@ script = ExtResource("49_60hic") hero = NodePath("..") metadata/_custom_type_script = "uid://cf7m4yyiqhhru" +[node name="CoinViewport" type="SubViewport" parent="."] +transparent_bg = true +size = Vector2i(64, 64) + +[node name="Coin" parent="CoinViewport" instance=ExtResource("51_w13oc")] + +[node name="Cylinder" parent="CoinViewport/Coin" index="0"] +layers = 8 + +[node name="Node3D" type="Node3D" parent="CoinViewport"] +script = ExtResource("52_rim6q") +speed = 70.0 + +[node name="Camera3D" type="Camera3D" parent="CoinViewport/Node3D"] +transform = Transform3D(1, 0, 0, 0, 0.74214, 0.670245, 0, -0.670245, 0.74214, 0, 0.977616, 1.08572) +cull_mask = 1047560 +projection = 1 +size = 2.243 + [connection signal="timeout" from="WeaponSwapTimer" to="." method="_on_timer_timeout"] [editable path="FirstPersonViewport/Head2/LeftHand/card_hand_model"] +[editable path="CoinViewport/Coin"] diff --git a/PCs/hud.gd b/PCs/hud.gd index d006421..2a791b4 100644 --- a/PCs/hud.gd +++ b/PCs/hud.gd @@ -32,6 +32,11 @@ var map_anchor: Node3D var cards: Array[EnemyCardUI] = [] +func _ready() -> void: + $StartWaveLabel.theme_type_variation = "WaveStartLabel" + $InteractLabel.theme_type_variation = "InteractLabel" + + func show_wave_generation_anim(wave: Wave) -> void: for card: EnemyCardUI in cards: card.queue_free() @@ -155,7 +160,7 @@ func set_currency_count(value: int) -> void: func set_energy_amount(value: int) -> void: - energy_label.text = "energy = " + str(value) + energy_label.text = str(value) func set_crosshair_visible(value: bool) -> void: diff --git a/PCs/player_movement.gd b/PCs/player_movement.gd index 80e1e25..7129f9c 100644 --- a/PCs/player_movement.gd +++ b/PCs/player_movement.gd @@ -222,8 +222,8 @@ func _unhandled_input(event: InputEvent) -> void: if !is_multiplayer_authority(): return if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: - player.rotation.y -= event.relative.x * (look_sens / zoom_factor) * (-1 if invert_x else 1) - head_angle -= event.relative.y * (look_sens / zoom_factor) * (-1 if invert_y else 1) + player.rotation.y -= (event.relative.x * get_viewport().get_final_transform().x.x) * (look_sens / zoom_factor) * (-1 if invert_x else 1) + head_angle -= (event.relative.y * get_viewport().get_final_transform().y.y) * (look_sens / zoom_factor) * (-1 if invert_y else 1) head_angle = clamp(head_angle, deg_to_rad(-max_look_down_angle), deg_to_rad(max_look_up_angle)) head.rotation.x = head_angle if weapon_holder: diff --git a/Scenes/Menus/MainMenu/main_menu.gd b/Scenes/Menus/MainMenu/main_menu.gd index 9e05e56..2bb06f4 100644 --- a/Scenes/Menus/MainMenu/main_menu.gd +++ b/Scenes/Menus/MainMenu/main_menu.gd @@ -21,7 +21,6 @@ var temp_data: SaveData func _ready() -> void: - $ProfileEditor/VBoxContainer/HBoxContainer/DisplayName.text = Data.player_profile.display_name load_stats(Data.save_data) #bg_level.a_star_graph_3d.make_grid() #bg_level.a_star_graph_3d.find_path() diff --git a/Scenes/Menus/MainMenu/main_menu.tscn b/Scenes/Menus/MainMenu/main_menu.tscn index 114a89d..cc2b1ef 100644 --- a/Scenes/Menus/MainMenu/main_menu.tscn +++ b/Scenes/Menus/MainMenu/main_menu.tscn @@ -1,6 +1,5 @@ -[gd_scene load_steps=27 format=3 uid="uid://8yv7excojcg0"] +[gd_scene load_steps=25 format=3 uid="uid://8yv7excojcg0"] -[ext_resource type="Theme" uid="uid://b6a0ip4p72tgx" path="res://UI/new_theme.tres" id="1_p1cib"] [ext_resource type="Script" uid="uid://ci8vq73u23viy" path="res://Scenes/Menus/MainMenu/main_menu.gd" id="2_ivytu"] [ext_resource type="PackedScene" uid="uid://y1qa1g3ic8sp" path="res://Worlds/GreenPlanet/Levels/Bridge/bridge.tscn" id="3_l8r4a"] [ext_resource type="AudioStream" uid="uid://cp6ph4ra7u5rk" path="res://Scenes/UI/drop_003.ogg" id="5_cwn2i"] @@ -18,24 +17,23 @@ [ext_resource type="Texture2D" uid="uid://cpa1hl36xfplg" path="res://Assets/Textures/first_scroll_seen.png" id="16_sv1gy"] [ext_resource type="Texture2D" uid="uid://ctbi3gm1me1t5" path="res://Assets/Textures/unlock_mage_achievement.png" id="17_6t4jd"] [ext_resource type="Script" uid="uid://cxrm2naq75jo1" path="res://Scripts/mod_menu.gd" id="19_6t4jd"] -[ext_resource type="FontFile" uid="uid://c3hwdjscf2hnk" path="res://Assets/Fonts/OpenType (.otf)/Kaph-Regular.otf" id="20_y5bw6"] [sub_resource type="ViewportTexture" id="ViewportTexture_5u75i"] viewport_path = NodePath("SubViewport") -[sub_resource type="AtlasTexture" id="AtlasTexture_6t4jd"] +[sub_resource type="AtlasTexture" id="AtlasTexture_74epv"] resource_local_to_scene = true atlas = ExtResource("8_1vnym") region = Rect2(0, 0, 32, 32) -[sub_resource type="Resource" id="Resource_y5bw6"] +[sub_resource type="Resource" id="Resource_sv1gy"] resource_local_to_scene = true script = ExtResource("5_u514r") title = "dog" target_type = 1 icon = ExtResource("7_2sylv") death_sprite = ExtResource("6_rsxwm") -sprite = SubResource("AtlasTexture_6t4jd") +sprite = SubResource("AtlasTexture_74epv") spawn_power = 10 health = 180 penalty = 10 @@ -69,23 +67,22 @@ region = Rect2(0, 0, 36, 36) atlas = ExtResource("17_6t4jd") region = Rect2(0, 0, 36, 36) -[node name="MainMenu" type="Control" node_paths=PackedStringArray("bg_level", "game_select_menu", "main_controls", "seed_entry", "profile_controls", "mods_controls")] +[node name="MainMenu" type="Control" node_paths=PackedStringArray("bg_level", "game_select_menu", "main_controls", "seed_entry", "mods_controls")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme = ExtResource("1_p1cib") script = ExtResource("2_ivytu") bg_level = NodePath("SubViewport/GridMap") game_select_menu = NodePath("GameSelectMenu") main_controls = NodePath("MainControls") seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit") -profile_controls = NodePath("ProfileEditor") mods_controls = NodePath("ModsMenu") [node name="TextureRect" type="TextureRect" parent="."] +visible = false layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -100,34 +97,27 @@ anchors_preset = -1 anchor_right = 1.0 anchor_bottom = 0.5 grow_horizontal = 2 -theme_override_colors/font_color = Color(0.8, 0.5644, 0.344, 1) -theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/line_spacing = -35 -theme_override_constants/outline_size = 55 -theme_override_fonts/font = ExtResource("20_y5bw6") -theme_override_font_sizes/font_size = 146 text = "decked out defense" horizontal_alignment = 1 vertical_alignment = 1 -[node name="MainControls" type="HBoxContainer" parent="."] +[node name="MainControls" type="VBoxContainer" parent="."] layout_mode = 1 anchors_preset = -1 -anchor_left = 0.05 -anchor_top = 0.95 -anchor_right = 0.95 -anchor_bottom = 0.95 -offset_top = -60.0 -grow_horizontal = 2 -grow_vertical = 0 +anchor_left = 0.1 +anchor_top = 0.4 +anchor_right = 0.9 +anchor_bottom = 0.9 +alignment = 2 [node name="PlayButton" type="Button" parent="MainControls"] layout_mode = 2 text = "Play" [node name="MultiplayerButton" type="Button" parent="MainControls"] +visible = false layout_mode = 2 disabled = true text = "Multiplayer" @@ -136,6 +126,10 @@ text = "Multiplayer" layout_mode = 2 text = "Mods" +[node name="StatsButton" type="Button" parent="MainControls"] +layout_mode = 2 +text = "Stats" + [node name="OptionsButton" type="Button" parent="MainControls"] layout_mode = 2 text = "Options @@ -146,50 +140,11 @@ layout_mode = 2 text = "Quit " -[node name="ProfileEditor" type="PanelContainer" parent="."] -layout_mode = 1 -anchors_preset = -1 -anchor_left = 0.97 -anchor_top = 0.95 -anchor_right = 0.97 -anchor_bottom = 0.95 -offset_left = -421.0 -offset_top = -150.0 -grow_horizontal = 0 -grow_vertical = 0 - -[node name="VBoxContainer" type="VBoxContainer" parent="ProfileEditor"] -layout_mode = 2 - -[node name="Label" type="Label" parent="ProfileEditor/VBoxContainer"] -layout_mode = 2 -text = "Current Profile" - -[node name="HBoxContainer" type="HBoxContainer" parent="ProfileEditor/VBoxContainer"] -layout_mode = 2 - -[node name="DisplayName" type="Label" parent="ProfileEditor/VBoxContainer/HBoxContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -text = "Dummy Name" - -[node name="MarginContainer" type="MarginContainer" parent="ProfileEditor/VBoxContainer/HBoxContainer"] -layout_mode = 2 -theme_override_constants/margin_left = 29 -theme_override_constants/margin_top = 2 -theme_override_constants/margin_right = 31 -theme_override_constants/margin_bottom = 4 - -[node name="DisplayNameEdit" type="Button" parent="ProfileEditor/VBoxContainer/HBoxContainer/MarginContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -text = "View Profile" - [node name="SubViewport" type="SubViewport" parent="."] size = Vector2i(1920, 1080) [node name="GridMap" parent="SubViewport" instance=ExtResource("3_l8r4a")] -enemy_pool = Array[ExtResource("5_u514r")]([SubResource("Resource_y5bw6"), ExtResource("9_hdp0s"), ExtResource("10_day26"), ExtResource("11_1mes0"), ExtResource("12_5vny5"), ExtResource("13_xb7gj")]) +enemy_pool = Array[ExtResource("5_u514r")]([SubResource("Resource_sv1gy"), ExtResource("9_hdp0s"), ExtResource("10_day26"), ExtResource("11_1mes0"), ExtResource("12_5vny5"), ExtResource("13_xb7gj")]) [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = SubResource("AudioStreamRandomizer_2jyua") @@ -617,8 +572,6 @@ text = "Confirm" [connection signal="pressed" from="MainControls/OptionsButton" to="." method="_on_options_button_pressed"] [connection signal="mouse_entered" from="MainControls/QuitButton" to="." method="_on_button_mouse_entered"] [connection signal="pressed" from="MainControls/QuitButton" to="." method="_on_quit_button_pressed"] -[connection signal="mouse_entered" from="ProfileEditor/VBoxContainer/HBoxContainer/MarginContainer/DisplayNameEdit" to="." method="_on_button_mouse_entered"] -[connection signal="pressed" from="ProfileEditor/VBoxContainer/HBoxContainer/MarginContainer/DisplayNameEdit" to="." method="_on_display_name_edit_pressed"] [connection signal="pressed" from="GameSelectMenu/VBoxContainer/HBoxContainer/BackButton" to="." method="_on_back_button_pressed"] [connection signal="pressed" from="GameSelectMenu/VBoxContainer/StandardButton" to="." method="_on_standard_button_pressed"] [connection signal="pressed" from="GameSelectMenu/VBoxContainer/DailyButton" to="." method="_on_daily_button_pressed"] diff --git a/Scenes/TowerBase/tower_base.gd b/Scenes/TowerBase/tower_base.gd index ecf70c6..5583df6 100644 --- a/Scenes/TowerBase/tower_base.gd +++ b/Scenes/TowerBase/tower_base.gd @@ -71,8 +71,8 @@ func networked_spawn_tower(card_index: int, caller_id: int) -> void: tower.owner_id = caller_id tower.position = Vector3(0, 1.2, 0) minimap_icon.modulate = Color.RED - duration = card.duration - enable_duration_sprites() + duration = 999 + #enable_duration_sprites() add_child(tower) @@ -82,6 +82,6 @@ func networked_remove_tower() -> void: #game_manager.connected_players_nodes[tower.owner_id].add_card(inventory.remove_at(0)) #game_manager.connected_players_nodes[tower.owner_id].unready_self() tower.queue_free() - disable_duration_sprites() + #disable_duration_sprites() tower = null minimap_icon.modulate = Color.GREEN diff --git a/Scenes/UI/card_hand.tscn b/Scenes/UI/card_hand.tscn index e46a984..112fb4e 100644 --- a/Scenes/UI/card_hand.tscn +++ b/Scenes/UI/card_hand.tscn @@ -11,7 +11,7 @@ title_text = NodePath("Title") description = NodePath("Description") target_label = NodePath("Title2") energy_cost = NodePath("EnergyCost") -duration = NodePath("Duration") +duration = NodePath("") [node name="Sprite2D" type="Sprite2D" parent="."] texture_filter = 1 @@ -72,13 +72,3 @@ theme_override_colors/font_color = Color(0.228497, 0.570097, 0.884935, 1) text = "3" horizontal_alignment = 1 vertical_alignment = 1 - -[node name="Duration" type="Label" parent="."] -offset_left = 125.0 -offset_top = 55.0 -offset_right = 42.0 -offset_bottom = 95.0 -theme_override_colors/font_color = Color(0.228497, 0.570097, 0.884935, 1) -text = "4" -horizontal_alignment = 1 -vertical_alignment = 1 diff --git a/Scenes/damage_particle.tscn b/Scenes/damage_particle.tscn index de8fef2..ae43cd4 100644 --- a/Scenes/damage_particle.tscn +++ b/Scenes/damage_particle.tscn @@ -6,10 +6,11 @@ viewport_path = NodePath("SubViewport") [node name="Node3D" type="Sprite3D"] -pixel_size = 0.0006 +pixel_size = 0.005 billboard = 1 no_depth_test = true fixed_size = true +texture_filter = 2 render_priority = 1 texture = SubResource("ViewportTexture_ppqlh") script = ExtResource("1_lgvaq") @@ -25,9 +26,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 5 -theme_override_font_sizes/font_size = 60 +theme_type_variation = &"DamageNumLabel" text = "12345" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/Scripts/Resources/card.gd b/Scripts/Resources/card.gd index bf86741..cc44a03 100644 --- a/Scripts/Resources/card.gd +++ b/Scripts/Resources/card.gd @@ -7,7 +7,7 @@ enum Faction { MAGE = 2, } -@export var duration: int +@export var cost: int @export var rarity: Data.Rarity @export var faction: Faction @export var turret_scene: PackedScene diff --git a/Scripts/card_hand.gd b/Scripts/card_hand.gd index a2a1ace..391501d 100644 --- a/Scripts/card_hand.gd +++ b/Scripts/card_hand.gd @@ -15,17 +15,7 @@ func set_card(value: Card) -> void: title_text.text = stats.display_name target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type]) rarity_sprite.region_rect = Rect2(64 * stats.rarity, 0, 64, 64) - if stats.rarity == Data.Rarity.COMMON: - energy_cost.text = "2" - if stats.rarity == Data.Rarity.UNCOMMON: - energy_cost.text = "4" - if stats.rarity == Data.Rarity.RARE: - energy_cost.text = "6" - if stats.rarity == Data.Rarity.EPIC: - energy_cost.text = "8" - if stats.rarity == Data.Rarity.LEGENDARY: - energy_cost.text = "10" - duration.text = str(value.duration) + energy_cost.text = str(value.cost) func process_card_text(card_text: CardText) -> String: diff --git a/Scripts/data.gd b/Scripts/data.gd index 5081c21..4acb8ac 100644 --- a/Scripts/data.gd +++ b/Scripts/data.gd @@ -19,8 +19,9 @@ enum EnemyType {UNDEFINED = 0, LAND = 1, AIR = 2} enum Rarity {COMMON = 0, UNCOMMON = 1, RARE = 2, EPIC = 3, LEGENDARY = 4} enum CardTags {DAMAGE = 0, UTILITY = 1, TARGETS_FLYING = 2} -static var weapon_recharge_delay: float = 1.5 +static var weapon_recharge_delay: float = 0.5 static var starting_cash: int = 10 +static var player_energy: int = 6 static var wall_cost: int = 1 static var printer_cost: int = 15 static var rarity_weights: Dictionary = { diff --git a/Scripts/game.gd b/Scripts/game.gd index cf5b3f1..42981f3 100644 --- a/Scripts/game.gd +++ b/Scripts/game.gd @@ -44,8 +44,9 @@ func _ready() -> void: version_label.text = "WORK IN PROGRESS | ALPHA - VERSION " + version + " | PLAYTEST" version_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER version_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER - version_label.add_theme_font_size_override("font_size", 18) - version_label.add_theme_color_override("font_color", Color(0.85, 0.85, 0.85, 0.7)) + version_label.theme_type_variation = "VersionLabel" + #version_label.add_theme_font_size_override("font_size", 18) + #version_label.add_theme_color_override("font_color", Color(0.85, 0.85, 0.85, 0.7)) version_label.set_anchors_preset(Control.PRESET_TOP_WIDE) UILayer.add_child(version_label) Input.set_custom_mouse_cursor(load("res://Assets/Textures/cursor_none.png"), Input.CURSOR_ARROW, Vector2(9, 6)) @@ -59,7 +60,7 @@ func parse_command(text: String, peer_id: int) -> void: for x: Card in Data.cards: if x.display_name == gift_name: gift = x - connected_players_nodes[peer_id].inventory.add(gift) + connected_players_nodes[peer_id].hand.add(gift) elif text.substr(1, 2) == "tr": chatbox.append_message("SERVER", Color.TOMATO, "[color=#f7a8b8]t[color=#55cdfc]r[color=#ffffff]a[color=#55cdfc]n[color=#f7a8b8]s [color=#e50000]r[color=#ff8d00]i[color=#ffee00]g[color=#028121]h[color=#004cff]t[color=#760088]s[color=white]!!") elif text.substr(1, 6) == "length": @@ -165,8 +166,8 @@ func spawn_enemy_wave() -> void: for spawn: EnemySpawner in level.enemy_spawns: spawn.visible = false spawn.spawn_wave() - for tower_base: TowerBase in level.walls.values(): - tower_base.disable_duration_sprites() + #for tower_base: TowerBase in level.walls.values(): + #tower_base.disable_duration_sprites() wave_started.emit() @@ -240,7 +241,7 @@ func end_wave() -> void: var player: Hero = connected_players_nodes[peer_id] as Hero player.hud.set_wave_count(wave) player.currency += ceili(pot / connected_players_nodes.size()) - player.energy = 12 + player.energy = Data.player_energy player.iterate_duration() player.draw_to_hand_size() player.unready_self() @@ -248,7 +249,7 @@ func end_wave() -> void: spawn.visible = true for tower_base: TowerBase in level.walls.values(): if tower_base.has_card: - tower_base.enable_duration_sprites() + #tower_base.enable_duration_sprites() tower_base.iterate_duration() if is_multiplayer_authority(): if NoiseRandom.randf_in_range(23 * wave, 0.0, 1.0) <= shop_chance: @@ -308,7 +309,7 @@ func start() -> void: spawn_players() for peer_id: int in connected_players_nodes: connected_players_nodes[peer_id].currency = ceili(float(Data.starting_cash) / float(connected_players_nodes.size())) - connected_players_nodes[peer_id].energy = 12 + connected_players_nodes[peer_id].energy = Data.player_energy connected_players_nodes[peer_id].draw_pile.shuffle() connected_players_nodes[peer_id].draw_to_hand_size() diff --git a/Shaders/jitter.gdshader b/Shaders/jitter.gdshader index 74ce4f8..56e284f 100644 --- a/Shaders/jitter.gdshader +++ b/Shaders/jitter.gdshader @@ -6,18 +6,17 @@ render_mode blend_mix, specular_disabled, vertex_lighting; -uniform bool affine_mapping = false; +global uniform bool affine_mapping = false; +global uniform ivec2 jitter_resolution = ivec2(320, 240); uniform sampler2D albedo : source_color, filter_nearest; uniform float alpha_scissor : hint_range(0, 1) = 0.5; -uniform float jitter: hint_range(0, 1) = 0.25; -uniform ivec2 resolution = ivec2(320, 240); vec4 snap_to_position(vec4 base_position) { vec4 snapped_position = base_position; snapped_position.xyz = base_position.xyz / base_position.w; - vec2 snap_resulotion = floor(vec2(resolution) * (1.0 - jitter)); + vec2 snap_resulotion = floor(vec2(jitter_resolution)); snapped_position.x = floor(snap_resulotion.x * snapped_position.x) / snap_resulotion.x; snapped_position.y = floor(snap_resulotion.y * snapped_position.y) / snap_resulotion.y; diff --git a/Shaders/mightyduke.gdshader b/Shaders/mightyduke.gdshader new file mode 100644 index 0000000..8150388 --- /dev/null +++ b/Shaders/mightyduke.gdshader @@ -0,0 +1,39 @@ +shader_type canvas_item; + +uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap; +uniform int color_depth : hint_range(1, 8) = 5; +uniform bool dithering = true; +uniform int resolution_scale = 4; + +int dithering_pattern(ivec2 fragcoord) { + const int pattern[] = { + -4, +0, -3, +1, + +2, -2, +3, -1, + -3, +1, -4, +0, + +3, -1, +2, -2 + }; + + int x = fragcoord.x % 4; + int y = fragcoord.y % 4; + + return pattern[y * 4 + x]; +} + +void fragment() { + ivec2 uv = ivec2(FRAGCOORD.xy / float(resolution_scale)); + vec3 color = texelFetch(SCREEN_TEXTURE, uv * resolution_scale, 0).rgb; + + // Convert from [0.0, 1.0] range to [0, 255] range + ivec3 c = ivec3(round(color * 255.0)); + + // Apply the dithering pattern + if (dithering) { + c += ivec3(dithering_pattern(uv)); + } + + // Truncate from 8 bits to color_depth bits + c >>= (8 - color_depth); + + // Convert back to [0.0, 1.0] range + COLOR = vec4(vec3(c) / float(1 << color_depth), 1.0); +} \ No newline at end of file diff --git a/Shaders/mightyduke.gdshader.uid b/Shaders/mightyduke.gdshader.uid new file mode 100644 index 0000000..00c78d4 --- /dev/null +++ b/Shaders/mightyduke.gdshader.uid @@ -0,0 +1 @@ +uid://dvvn4x6geogiv diff --git a/UI/CardSelectionBox/card_selection_box.gd b/UI/CardSelectionBox/card_selection_box.gd index 2169c1c..155f039 100644 --- a/UI/CardSelectionBox/card_selection_box.gd +++ b/UI/CardSelectionBox/card_selection_box.gd @@ -4,15 +4,18 @@ extends Control @export var icon: TextureRect @export var tags: VBoxContainer @export var cost_label: Label -@export var lifetime_label: Label @export var unselected_style_box: StyleBoxFlat @export var selected_style_box: StyleBoxFlat +@export var amount_label: Label + + +func set_amount(num: int) -> void: + amount_label.text = "x" + str(num) func set_card(card: Card) -> void: icon.texture = card.icon - cost_label.text = str(card.rarity + 1) - lifetime_label.text = str(card.duration) + cost_label.text = str(card.cost) for i: int in tags.get_child_count(): tags.get_child(i).queue_free() for tag: Data.CardTags in card.tags: diff --git a/UI/CardSelectionBox/card_selection_box.tscn b/UI/CardSelectionBox/card_selection_box.tscn index 3017f64..adcc674 100644 --- a/UI/CardSelectionBox/card_selection_box.tscn +++ b/UI/CardSelectionBox/card_selection_box.tscn @@ -6,17 +6,17 @@ [ext_resource type="StyleBox" uid="uid://csbgndc6vfayf" path="res://UI/CardSelectionBox/selected_style_box.tres" id="2_ek0dh"] [ext_resource type="Texture2D" uid="uid://bpcyxdpog3w85" path="res://Assets/Textures/assault_icon.png" id="2_m0g3h"] -[node name="Control" type="Control" node_paths=PackedStringArray("icon", "tags", "cost_label", "lifetime_label")] +[node name="Control" type="Control" node_paths=PackedStringArray("icon", "tags", "cost_label", "amount_label")] custom_minimum_size = Vector2(170, 0) layout_mode = 3 anchors_preset = 0 script = ExtResource("1_m0g3h") -icon = NodePath("PanelContainer/HBoxContainer/Icon") -tags = NodePath("PanelContainer/HBoxContainer/MarginContainer/Tags") -cost_label = NodePath("PanelContainer/HBoxContainer/Stats/Cost") -lifetime_label = NodePath("PanelContainer/HBoxContainer/Stats/Lifetime") +icon = NodePath("PanelContainer/VBoxContainer/HBoxContainer/Icon") +tags = NodePath("PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/Tags") +cost_label = NodePath("PanelContainer/VBoxContainer/HBoxContainer/Stats/Cost") unselected_style_box = ExtResource("2_0817q") selected_style_box = ExtResource("2_ek0dh") +amount_label = NodePath("PanelContainer/VBoxContainer/Label") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 2 @@ -24,45 +24,49 @@ offset_right = 152.0 offset_bottom = 124.0 theme_override_styles/panel = ExtResource("2_ek0dh") -[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"] layout_mode = 2 -[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/HBoxContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 theme_override_constants/margin_top = 10 theme_override_constants/margin_bottom = 10 -[node name="Tags" type="VBoxContainer" parent="PanelContainer/HBoxContainer/MarginContainer"] +[node name="Tags" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer/MarginContainer"] layout_mode = 2 -[node name="Icon2" type="TextureRect" parent="PanelContainer/HBoxContainer/MarginContainer/Tags"] +[node name="Icon2" type="TextureRect" parent="PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/Tags"] layout_mode = 2 size_flags_horizontal = 3 texture = ExtResource("1_k8442") stretch_mode = 5 -[node name="Icon" type="TextureRect" parent="PanelContainer/HBoxContainer"] +[node name="Icon" type="TextureRect" parent="PanelContainer/VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 texture = ExtResource("2_m0g3h") stretch_mode = 5 -[node name="Stats" type="VBoxContainer" parent="PanelContainer/HBoxContainer"] +[node name="Stats" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 -[node name="Cost" type="Label" parent="PanelContainer/HBoxContainer/Stats"] +[node name="Cost" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer/Stats"] layout_mode = 2 size_flags_vertical = 7 text = "3" horizontal_alignment = 1 vertical_alignment = 1 -[node name="Lifetime" type="Label" parent="PanelContainer/HBoxContainer/Stats"] +[node name="Label" type="Label" parent="PanelContainer/VBoxContainer"] layout_mode = 2 -size_flags_vertical = 7 -text = "6" +size_flags_vertical = 8 +text = "x2" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/UI/EnergyBar/energy_bar.gd b/UI/EnergyBar/energy_bar.gd index a7992bc..bfb3f13 100644 --- a/UI/EnergyBar/energy_bar.gd +++ b/UI/EnergyBar/energy_bar.gd @@ -119,6 +119,8 @@ func gain_energy(energy_gained: float, energy_type: Data.EnergyType = Data.Energ energy += energy_gained progress_bar.value = energy big_progress_bar.value = energy + #TODO: Theres a bug here that should be fixed by making the discrete and continuous bars + #into a different ui element which i think i wanna do anyway if energy_type == Data.EnergyType.DISCRETE and int(energy) > prev_energy_int: cell_icons[int(energy) - 1].visible = true prev_energy_int = int(energy) diff --git a/UI/new_theme.tres b/UI/new_theme.tres index 482d884..2fff5d0 100644 --- a/UI/new_theme.tres +++ b/UI/new_theme.tres @@ -1,5 +1,6 @@ -[gd_resource type="Theme" load_steps=16 format=3 uid="uid://b6a0ip4p72tgx"] +[gd_resource type="Theme" load_steps=17 format=3 uid="uid://b6a0ip4p72tgx"] +[ext_resource type="FontFile" uid="uid://bqy8dm2o3piqm" path="res://Assets/Fonts/Quaver v1.0/quaver.ttf" id="2_i4k6b"] [ext_resource type="StyleBox" uid="uid://lpof3jdy7hr7" path="res://UI/new_style_box_flat.tres" id="4_o03gw"] [ext_resource type="FontFile" uid="uid://c17ml15e2qan0" path="res://Assets/Fonts/TrueType (.ttf)/Sagewold-Regular.ttf" id="4_v3wda"] @@ -97,6 +98,9 @@ CheckButton/styles/hover = SubResource("StyleBoxEmpty_v4c6d") CheckButton/styles/hover_pressed = SubResource("StyleBoxEmpty_pdxi3") CheckButton/styles/normal = SubResource("StyleBoxEmpty_8epi8") CheckButton/styles/pressed = SubResource("StyleBoxEmpty_o02xp") +DamageNumLabel/base_type = &"Label" +DamageNumLabel/font_sizes/font_size = 8 +DamageNumLabel/fonts/font = ExtResource("2_i4k6b") HBoxContainer/constants/separation = 10 Label/colors/font_color = Color(0.941129, 0.938917, 0.927802, 1) Label/font_sizes/font_size = 34 @@ -108,6 +112,7 @@ LineEdit/fonts/font = ExtResource("4_v3wda") LineEdit/styles/focus = SubResource("StyleBoxFlat_s5vy1") LineEdit/styles/normal = SubResource("StyleBoxFlat_s5vy1") PanelContainer/styles/panel = ExtResource("4_o03gw") +StartWaveLabel/base_type = &"Label" TabBar/fonts/font = ExtResource("4_v3wda") TabContainer/colors/font_hovered_color = Color(0.894118, 0.890196, 0.870588, 1) TabContainer/colors/font_selected_color = Color(0.895148, 0.891833, 0.869117, 1) @@ -120,3 +125,6 @@ TabContainer/styles/tab_focus = SubResource("StyleBoxFlat_ehga6") TabContainer/styles/tab_hovered = SubResource("StyleBoxFlat_tuxkj") TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_ehga6") TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_tuxkj") +VersionLabel/base_type = &"Label" +VersionLabel/colors/font_color = Color(0.85, 0.85, 0.85, 0.7) +VersionLabel/font_sizes/font_size = 16 diff --git a/UI/psx_ui.tres b/UI/psx_ui.tres new file mode 100644 index 0000000..25c6a96 --- /dev/null +++ b/UI/psx_ui.tres @@ -0,0 +1,9 @@ +[gd_resource type="Theme" format=3 uid="uid://jn4qqx5hxc5i"] + +[resource] +Button/font_sizes/font_size = 8 +InteractLabel/base_type = &"Label" +StartWaveLabel/base_type = &"Label" +VersionLabel/base_type = &"Label" +VersionLabel/colors/font_color = Color(0.85, 0.85, 0.85, 0.7) +VersionLabel/font_sizes/font_size = 8 diff --git a/Weapons/Assault/weapon_material.tres b/Weapons/Assault/weapon_material.tres index c3006bb..5eafd2f 100644 --- a/Weapons/Assault/weapon_material.tres +++ b/Weapons/Assault/weapon_material.tres @@ -6,8 +6,5 @@ [resource] render_priority = 0 shader = ExtResource("1_r6w0r") -shader_parameter/affine_mapping = true shader_parameter/albedo = ExtResource("2_kbuty") shader_parameter/alpha_scissor = 0.5 -shader_parameter/jitter = 0.25 -shader_parameter/resolution = Vector2i(320, 240) diff --git a/Worlds/GreenPlanet/Levels/Bridge/bridge.tscn b/Worlds/GreenPlanet/Levels/Bridge/bridge.tscn index b92e174..c368027 100644 --- a/Worlds/GreenPlanet/Levels/Bridge/bridge.tscn +++ b/Worlds/GreenPlanet/Levels/Bridge/bridge.tscn @@ -1,11 +1,14 @@ -[gd_scene load_steps=33 format=3 uid="uid://y1qa1g3ic8sp"] +[gd_scene load_steps=38 format=3 uid="uid://y1qa1g3ic8sp"] [ext_resource type="Script" uid="uid://cvejbo3srx8py" path="res://Scripts/level.gd" id="1_ws6nn"] [ext_resource type="PackedScene" uid="uid://d2yv447trxkwt" path="res://Scenes/enemy_spawner.tscn" id="3_5imwp"] [ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="3_6od8s"] -[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="5_6od8s"] +[ext_resource type="Texture2D" uid="uid://cdnhe2mi5c5ln" path="res://Assets/Textures/dead_eye_dog.png" id="3_uh5sr"] +[ext_resource type="Texture2D" uid="uid://g00wwrlxxdc5" path="res://Assets/Textures/icon_eye_dog.png" id="4_g08yk"] +[ext_resource type="PackedScene" uid="uid://bvq6tbkuv2mfp" path="res://Enemies/EyeDog/eye_dog.tscn" id="5_asmpj"] [ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="5_j6d65"] [ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="6_ks6qx"] +[ext_resource type="Texture2D" uid="uid://dj13g1w14mekw" path="res://Assets/Textures/eye_dog.png" id="6_vrxvq"] [ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="9_4gdda"] [ext_resource type="PackedScene" uid="uid://1b2ikdanl66b" path="res://Scenes/CardPrinter/card_printer.tscn" id="9_r25gu"] [ext_resource type="Script" uid="uid://cxwtuxytavfu5" path="res://Scripts/enemy_goal.gd" id="9_s3rd7"] @@ -21,6 +24,36 @@ [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://Worlds/GreenPlanet/Levels/Bridge/bridge.glb" id="30_ttr7n"] +[sub_resource type="AtlasTexture" id="AtlasTexture_p1iv6"] +resource_local_to_scene = true +atlas = ExtResource("6_vrxvq") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="Resource" id="Resource_uvxyn"] +resource_local_to_scene = true +script = ExtResource("3_6od8s") +title = "Eye Dog" +target_type = 1 +scene = ExtResource("5_asmpj") +icon = ExtResource("4_g08yk") +death_sprite = ExtResource("3_uh5sr") +sprite = SubResource("AtlasTexture_p1iv6") +spawn_power = 10 +health = 180 +penalty = 10 +movement_speed = 1.5 +spawn_cooldown = 1.2 +common_group = 6 +common_cost = 1 +uncommon_group = 10 +uncommon_cost = 2 +rare_group = 16 +rare_cost = 3 +epic_group = 22 +epic_cost = 5 +legendary_group = 28 +legendary_cost = 6 + [sub_resource type="Curve3D" id="Curve3D_3rdl2"] _data = { "points": PackedVector3Array(0, 0, 0, 0, 0, 0, 12.3765, 1.00006, -13.0874, 0, 0, 0, 0, 0, 0, -13.1528, 5.17887, -14.4739), @@ -235,7 +268,7 @@ size = Vector3(70.0478, 1, 73.4615) [node name="Bridge" type="Node3D" node_paths=PackedStringArray("tower_path", "player_spawns", "enemy_spawns", "enemy_goals", "corpses", "flow_field", "cinematic_cam", "printer", "shop")] script = ExtResource("1_ws6nn") -enemy_pool = Array[ExtResource("3_6od8s")]([ExtResource("5_6od8s"), ExtResource("9_4gdda"), ExtResource("5_j6d65"), ExtResource("6_ks6qx")]) +enemy_pool = Array[ExtResource("3_6od8s")]([SubResource("Resource_uvxyn"), ExtResource("9_4gdda"), ExtResource("5_j6d65"), ExtResource("6_ks6qx")]) tower_path = NodePath("Towers") player_spawns = [NodePath("PlayerSpawnLocations/PlayerSpawn1"), NodePath("PlayerSpawnLocations/PlayerSpawn2"), NodePath("PlayerSpawnLocations/PlayerSpawn3"), NodePath("PlayerSpawnLocations/PlayerSpawn4")] enemy_spawns = [NodePath("GroundSpawn"), NodePath("GroundSpawn2"), NodePath("GroundSpawn3"), NodePath("GroundSpawn4"), NodePath("GroundSpawn5"), NodePath("AirSpawn")] @@ -293,9 +326,6 @@ loop = false transform = Transform3D(3.27007e-05, 0.999663, -0.0260566, -0.00250896, 0.0260566, 0.99966, 0.999999, 3.26858e-05, 0.00250896, 0, 0, 0) cull_mask = 1 -[node name="Sun" type="DirectionalLight3D" parent="."] -transform = Transform3D(0.917074, 0.155176, 0.367281, -0.398717, 0.356914, 0.84477, 8.88179e-16, -0.921158, 0.389188, 0, 100, 0) - [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource("Environment_l41d0") diff --git a/card_placing_tool.gd b/card_placing_tool.gd index adf0dea..f08149a 100644 --- a/card_placing_tool.gd +++ b/card_placing_tool.gd @@ -42,8 +42,7 @@ func put_card_in_tower_base(tower_base: TowerBase) -> void: if hero.hand.size <= 0: return var card: Card = hero.selected_card - var energy_cost: int = int(card.rarity) + 1 - energy_cost *= 2 + var energy_cost: int = card.cost if hero.energy < energy_cost: return if tower_base.has_card: diff --git a/coin/Coin.glb b/coin/Coin.glb new file mode 100644 index 0000000000000000000000000000000000000000..793e65f53174fc6624527c1fb9b73fd8007662a4 GIT binary patch literal 5972 zcmYe#32|d$U|rGlg)-_(-CoSe+$p#0MG zjJ(w1Vvzrm5{pxv^K0f0x`(c(8vrVSejR&WMyawvLvxW z$tv1F&k_Pm42&&JjZICBbPRP2^o&dmK)}?}%)rFV#Ka;N5KfXyL-ZHJ@=h5d=e)c!Mzsr|qI_4^31nHU=EU~16WvCTR5 zV($;zf&4{?4blr!gUG}uAaV6dU)?_*+U*hh%{?|;1=Obt34 z>fik!a|p3PdSPnN+0gLc5Aqiw_MiXtusGU}&W5H3usMX-AiXd(=xovVhxf%b=YY*2 z#0KewsX=FdVlmzSnZ*=%1~7#3f6*&w|z_2}&X|LgZ7r5}83 zSegN;!C*tphoxtbdvLO$X&9^qoed2iSpEX}9VZ*47p5Ma4Gn)-eh0-JJ~k-*z|^3y z6ZZAkJj=4Q|Np<nHah9ch!@eFHkiEk15APFsf7lMhW?*;#3Y$$J zw$S^-b|5(r`$?AN{(yZwdl(rS?Dk$fzi;2g^Psr1%h}hn2P6l|n;=a(~Ufo;@IQAaM>N8}^qTceh(1QVlLgN{_qmgRw!f5Zqu-gc=lcJgoTa zU)~AIQ@X_1Bu~K14=(2zroT5 zh>e~$K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pB2sLpB2&Ll#3WLmopGLmopmLoP!BLm@*hLm@*RLji*ggA+pm zgA+p`0~_M7Xt$WucwDg5Ca2)0tj=kF)%O`S5TL6@`Cse%O!@$76neXOS4B~_FEv;?mK!ODxk;M!Q+(IDC zcyyMx%vICzbE{-n?HS_-tvW7$roqF{rCG&Rj&~%dRq1d>lAAP-G{4uxsKi} zdbQ~`OUjW9mUe;J3>+N-6P#r}w{7GONaC>Uce+*oTF8khQ(xPc zCM~_Fl%N^OAFjr5{S?cCV`eNzcArg&T#_cuwvd$@?iGcwCCySGN literal 0 HcmV?d00001 diff --git a/coin/Coin.glb.import b/coin/Coin.glb.import new file mode 100644 index 0000000..edb7c42 --- /dev/null +++ b/coin/Coin.glb.import @@ -0,0 +1,44 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bg4pmewlvshu8" +path="res://.godot/imported/Coin.glb-dcf33c435a74febc9dfe74054dddd467.scn" + +[deps] + +source_file="res://coin/Coin.glb" +dest_files=["res://.godot/imported/Coin.glb-dcf33c435a74febc9dfe74054dddd467.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_node_type_suffixes=true +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={ +"materials": { +"coin": { +"use_external/enabled": true, +"use_external/path": "uid://5mnnhn5p1tll" +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/coin/Coin_coin.png b/coin/Coin_coin.png new file mode 100644 index 0000000000000000000000000000000000000000..a98727c7b8621d12d311c35bba3df6e82d71655b GIT binary patch literal 406 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}W~mXLX}-P;S_}*f5)2Fs z9t;c&jBuKXQHp^TD#F1i4QC55FfcGosCd7Jfq{WD-_5NU#0TSBTHDTn1PeSOiy0WW zg+Q3`(%rg03=9k(JzX3_A~@epy~umWfybF~BZKw^&U&3=EINnfl?|C**u{xPhA)lL zbzODJ|HRc!S@Y#`^ZQ?aPxx^+fBHhbKARG`Bu$!cOXf_C*)bc#*o_3=?o4`fpNV5f znpI)Rio`ce3Jx4Q-B@nLG4f9J_}tbVv6^|~Mxpah&DfuDZ2BDQu#@?+P}+61>gkKm cpO*c>xO|e$eyz>RCxL>-)78&qol`;+00+Z_?*IS* literal 0 HcmV?d00001 diff --git a/coin/Coin_coin.png.import b/coin/Coin_coin.png.import new file mode 100644 index 0000000..c190f72 --- /dev/null +++ b/coin/Coin_coin.png.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bayjketjls0lt" +path.s3tc="res://.godot/imported/Coin_coin.png-130d4e26928a415246fa81206a49adee.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "bb4a8a7e338539895ead7701c1dd8cd9" +} + +[deps] + +source_file="res://coin/Coin_coin.png" +dest_files=["res://.godot/imported/Coin_coin.png-130d4e26928a415246fa81206a49adee.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/coin/coin.png b/coin/coin.png new file mode 100644 index 0000000000000000000000000000000000000000..a98727c7b8621d12d311c35bba3df6e82d71655b GIT binary patch literal 406 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}W~mXLX}-P;S_}*f5)2Fs z9t;c&jBuKXQHp^TD#F1i4QC55FfcGosCd7Jfq{WD-_5NU#0TSBTHDTn1PeSOiy0WW zg+Q3`(%rg03=9k(JzX3_A~@epy~umWfybF~BZKw^&U&3=EINnfl?|C**u{xPhA)lL zbzODJ|HRc!S@Y#`^ZQ?aPxx^+fBHhbKARG`Bu$!cOXf_C*)bc#*o_3=?o4`fpNV5f znpI)Rio`ce3Jx4Q-B@nLG4f9J_}tbVv6^|~Mxpah&DfuDZ2BDQu#@?+P}+61>gkKm cpO*c>xO|e$eyz>RCxL>-)78&qol`;+00+Z_?*IS* literal 0 HcmV?d00001 diff --git a/coin/coin.png.import b/coin/coin.png.import new file mode 100644 index 0000000..4e972ca --- /dev/null +++ b/coin/coin.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctjkfe23t6crn" +path.s3tc="res://.godot/imported/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://coin/coin.png" +dest_files=["res://.godot/imported/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/coin/coin_material.tres b/coin/coin_material.tres new file mode 100644 index 0000000..796f4c9 --- /dev/null +++ b/coin/coin_material.tres @@ -0,0 +1,10 @@ +[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://5mnnhn5p1tll"] + +[ext_resource type="Shader" uid="uid://c5bffujq0l70k" path="res://Shaders/jitter.gdshader" id="1_38tga"] +[ext_resource type="Texture2D" uid="uid://ctjkfe23t6crn" path="res://coin/coin.png" id="2_kttjc"] + +[resource] +render_priority = 0 +shader = ExtResource("1_38tga") +shader_parameter/albedo = ExtResource("2_kttjc") +shader_parameter/alpha_scissor = 0.5 diff --git a/left_hand/left_hand_mat.tres b/left_hand/left_hand_mat.tres index 78293a4..473d6e9 100644 --- a/left_hand/left_hand_mat.tres +++ b/left_hand/left_hand_mat.tres @@ -7,8 +7,5 @@ [resource] render_priority = 0 shader = ExtResource("1_bpyoj") -shader_parameter/affine_mapping = true shader_parameter/albedo = SubResource("PlaceholderTexture2D_6krsv") shader_parameter/alpha_scissor = 0.5 -shader_parameter/jitter = 0.25 -shader_parameter/resolution = Vector2i(320, 240) diff --git a/main.gd b/main.gd index c8940e7..0855886 100644 --- a/main.gd +++ b/main.gd @@ -13,6 +13,10 @@ var multiplayer_lobby_scene_path: String = "res://Scenes/Menus/multiplayer_lobby var singleplayer_lobby_scene_path: String = "res://Scenes/Menus/singleplayer_lobby.tscn" +func _ready() -> void: + Engine.max_fps = 60 + + func load_main_menu() -> void: load_scene(main_menu_scene_path) await loaded_scene diff --git a/main.tscn b/main.tscn index 5d00c4b..58d27a8 100644 --- a/main.tscn +++ b/main.tscn @@ -1,23 +1,19 @@ -[gd_scene load_steps=8 format=3 uid="uid://d2k8y13qfvch0"] +[gd_scene load_steps=7 format=3 uid="uid://d2k8y13qfvch0"] -[ext_resource type="Shader" uid="uid://diugvmtoos1ti" path="res://Shaders/pixeldither.gdshader" id="2_1bvp3"] [ext_resource type="Script" uid="uid://cx1xj7esl03ui" path="res://main.gd" id="2_h2yge"] [ext_resource type="Texture2D" uid="uid://6frn8lcwwehv" path="res://Assets/TextureAtlases/puppyfruit.png" id="2_lquwl"] [ext_resource type="Script" uid="uid://p1ugbcmjuwxg" path="res://Scripts/boot_logo.gd" id="3_7mycd"] -[ext_resource type="Texture2D" uid="uid://bpo5fu2a26mr7" path="res://blk-nx64-1x.png" id="3_h2yge"] +[ext_resource type="Shader" uid="uid://dvvn4x6geogiv" path="res://Shaders/mightyduke.gdshader" id="6_7mycd"] [sub_resource type="AtlasTexture" id="AtlasTexture_272bh"] atlas = ExtResource("2_lquwl") region = Rect2(0, 0, 256, 256) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_7mycd"] -shader = ExtResource("2_1bvp3") -shader_parameter/shader_enabled = true -shader_parameter/palette = ExtResource("3_h2yge") +[sub_resource type="ShaderMaterial" id="ShaderMaterial_272bh"] +shader = ExtResource("6_7mycd") +shader_parameter/color_depth = 5 shader_parameter/dithering = true -shader_parameter/dithering_size = 4 shader_parameter/resolution_scale = 1 -shader_parameter/quantization_level = 8 [node name="Main" type="Node" node_paths=PackedStringArray("scene", "movies")] script = ExtResource("2_h2yge") @@ -41,9 +37,9 @@ anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -128.0 -offset_top = -128.0 +offset_top = -147.0 offset_right = 128.0 -offset_bottom = 128.0 +offset_bottom = 109.0 grow_horizontal = 2 grow_vertical = 2 texture = SubResource("AtlasTexture_272bh") @@ -54,16 +50,11 @@ color_rect = NodePath("../ColorRect") layout_mode = 1 anchors_preset = -1 anchor_left = 0.5 -anchor_top = 0.5 +anchor_top = 0.77 anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -52.0 -offset_top = 205.0 -offset_right = 52.0 -offset_bottom = 20.0 +anchor_bottom = 0.77 grow_horizontal = 2 grow_vertical = 2 -theme_override_font_sizes/font_size = 91 text = "puppyfruit" horizontal_alignment = 1 vertical_alignment = 1 @@ -76,9 +67,9 @@ anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -165.0 -offset_top = 85.0 +offset_top = 50.0 offset_right = 190.0 -offset_bottom = 170.0 +offset_bottom = 135.0 grow_horizontal = 2 grow_vertical = 2 color = Color(0.192157, 0.415686, 0.223529, 1) @@ -89,8 +80,8 @@ color = Color(0.192157, 0.415686, 0.223529, 1) layer = 2 visible = false -[node name="ColorRect" type="ColorRect" parent="CanvasLayer"] -material = SubResource("ShaderMaterial_7mycd") +[node name="ColorRect2" type="ColorRect" parent="CanvasLayer"] +material = SubResource("ShaderMaterial_272bh") anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/project.godot b/project.godot index 296e66e..04e8341 100644 --- a/project.godot +++ b/project.godot @@ -30,7 +30,8 @@ gdscript/warnings/inferred_declaration=2 window/size/viewport_width=1920 window/size/viewport_height=1080 -window/stretch/mode="canvas_items" +window/stretch/mode="viewport" +window/stretch/scale_mode="integer" [editor] @@ -55,7 +56,8 @@ import/blender/enabled=false [gui] -theme/custom="res://UI/new_theme.tres" +theme/custom="uid://b6a0ip4p72tgx" +theme/default_font_antialiasing=0 [input] @@ -221,3 +223,14 @@ Pause={ [rendering] textures/canvas_textures/default_texture_filter=0 + +[shader_globals] + +affine_mapping={ +"type": "bool", +"value": true +} +jitter_resolution={ +"type": "ivec2", +"value": Vector2i(320, 240) +} diff --git a/rotate.gd b/rotate.gd new file mode 100644 index 0000000..7ee869c --- /dev/null +++ b/rotate.gd @@ -0,0 +1,7 @@ +extends Node3D + +@export var speed: float = 1.0 + + +func _process(delta: float) -> void: + rotation_degrees.y += speed * delta diff --git a/rotate.gd.uid b/rotate.gd.uid new file mode 100644 index 0000000..15de2d5 --- /dev/null +++ b/rotate.gd.uid @@ -0,0 +1 @@ +uid://dq0yemhxscvtm