Skip to content

Commit

Permalink
some more balancing
Browse files Browse the repository at this point in the history
word weapon first upgrade was op and too cheap
-> made another upgrade to break it up (not to +5 need to pay 100 for +2 and 150 for +3)

coin audio too loud and together with louder heart beat the audio can glitch a bit
-> reduced to -15 in stead of -12

buffed water cooler recover health
-> .2 to .35

wave manager
-> changed various functions and respawn timings (can refine furture) not sure how i feel about this yet need to play more

world
-> some world objects have annoying clipplings (pushed away although outside) so i shifted it slightly
  • Loading branch information
LimZiJia committed Jul 25, 2023
1 parent 0a850a4 commit a3e1857
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ weapon_name = &"Calculator"
description = "+5 damage
+1 calculator"
level = 2
cost = 200
cost = 500
weapon_stat = SubResource("Resource_m2px5")
4 changes: 2 additions & 2 deletions resources/weapon_upgrades/word/word_weapon_upgrade_2.tres
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
script = ExtResource("2_7yvto")
cooldown = 1.0
count = 1
damage = 15.0
damage = 12.0
knockback = 1500.0
metadata = {}

[resource]
script = ExtResource("1_5ardu")
weapon_name = &"Word"
description = "+5 damage"
description = "+2 damage"
level = 2
cost = 100
weapon_stat = SubResource("Resource_m18qi")
8 changes: 4 additions & 4 deletions resources/weapon_upgrades/word/word_weapon_upgrade_3.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://c0lpsglxa7gk"]
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://bwlwurb337od7"]

[ext_resource type="Script" path="res://resources/weapon_upgrades/weapon_upgrade.gd" id="1_1naio"]
[ext_resource type="Script" path="res://scenes/weapons/weapon_stats/weapon_stat.gd" id="2_1xt2t"]
Expand All @@ -7,14 +7,14 @@
script = ExtResource("2_1xt2t")
cooldown = 1.0
count = 1
damage = 20.0
damage = 15.0
knockback = 1500.0
metadata = {}

[resource]
script = ExtResource("1_1naio")
weapon_name = &"Word"
description = "+5 damage"
description = "+3 damage"
level = 3
cost = 500
cost = 150
weapon_stat = SubResource("Resource_m18qi")
13 changes: 6 additions & 7 deletions resources/weapon_upgrades/word/word_weapon_upgrade_4.tres
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://b6qcrd7qlli61"]
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://c0lpsglxa7gk"]

[ext_resource type="Script" path="res://resources/weapon_upgrades/weapon_upgrade.gd" id="1_16huu"]
[ext_resource type="Script" path="res://scenes/weapons/weapon_stats/weapon_stat.gd" id="2_ndgxd"]

[sub_resource type="Resource" id="Resource_m18qi"]
script = ExtResource("2_ndgxd")
cooldown = 0.9
cooldown = 1.0
count = 1
damage = 30.0
damage = 20.0
knockback = 1500.0
metadata = {}

[resource]
script = ExtResource("1_16huu")
weapon_name = &"Word"
description = "+10 damage
-0.1s cooldown"
level = 4
cost = 2000
description = "+5 damage"
level = 6
cost = 500
weapon_stat = SubResource("Resource_m18qi")
19 changes: 10 additions & 9 deletions resources/weapon_upgrades/word/word_weapon_upgrade_5.tres
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://c3j7xqh1qh1lx"]
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://b6qcrd7qlli61"]

[ext_resource type="Script" path="res://resources/weapon_upgrades/weapon_upgrade.gd" id="1_ix1rt"]
[ext_resource type="Script" path="res://scenes/weapons/weapon_stats/weapon_stat.gd" id="2_dweau"]
[ext_resource type="Script" path="res://resources/weapon_upgrades/weapon_upgrade.gd" id="1_16huu"]
[ext_resource type="Script" path="res://scenes/weapons/weapon_stats/weapon_stat.gd" id="2_ndgxd"]

[sub_resource type="Resource" id="Resource_m18qi"]
script = ExtResource("2_dweau")
script = ExtResource("2_ndgxd")
cooldown = 0.9
count = 2
count = 1
damage = 30.0
knockback = 1500.0
metadata = {}

[resource]
script = ExtResource("1_ix1rt")
script = ExtResource("1_16huu")
weapon_name = &"Word"
description = "+1 word"
level = 5
cost = 5000
description = "+10 damage
-0.1s cooldown"
level = 4
cost = 2000
weapon_stat = SubResource("Resource_m18qi")
20 changes: 20 additions & 0 deletions resources/weapon_upgrades/word/word_weapon_upgrade_6.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[gd_resource type="Resource" script_class="WeaponUpgrade" load_steps=4 format=3 uid="uid://c3j7xqh1qh1lx"]

[ext_resource type="Script" path="res://resources/weapon_upgrades/weapon_upgrade.gd" id="1_ix1rt"]
[ext_resource type="Script" path="res://scenes/weapons/weapon_stats/weapon_stat.gd" id="2_dweau"]

[sub_resource type="Resource" id="Resource_m18qi"]
script = ExtResource("2_dweau")
cooldown = 0.9
count = 2
damage = 30.0
knockback = 1500.0
metadata = {}

[resource]
script = ExtResource("1_ix1rt")
weapon_name = &"Word"
description = "+1 word"
level = 5
cost = 5000
weapon_stat = SubResource("Resource_m18qi")
11 changes: 6 additions & 5 deletions resources/weapon_upgrades/word/word_weapon_upgrade_data.tres
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[gd_resource type="Resource" script_class="WeaponUpgradesData" load_steps=8 format=3 uid="uid://ckabhhn8i42ps"]
[gd_resource type="Resource" script_class="WeaponUpgradesData" load_steps=9 format=3 uid="uid://b7gub5sgdpo3"]

[ext_resource type="Script" path="res://resources/weapon_upgrades/weapon_upgrade_data.gd" id="1_aexae"]
[ext_resource type="PackedScene" uid="uid://bgwhgewn87l0s" path="res://scenes/weapons/word/word_weapon_controller.tscn" id="2_5pldk"]
[ext_resource type="Resource" uid="uid://b3cjttikobny" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_1.tres" id="3_rhvhm"]
[ext_resource type="Resource" uid="uid://cyuqca2i8xuom" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_2.tres" id="3_sylwv"]
[ext_resource type="Resource" uid="uid://c0lpsglxa7gk" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_3.tres" id="4_7ksjm"]
[ext_resource type="Resource" uid="uid://b6qcrd7qlli61" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_4.tres" id="5_ey7c2"]
[ext_resource type="Resource" uid="uid://c3j7xqh1qh1lx" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_5.tres" id="6_2fh0f"]
[ext_resource type="Resource" uid="uid://bwlwurb337od7" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_3.tres" id="4_7ksjm"]
[ext_resource type="Resource" uid="uid://c0lpsglxa7gk" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_4.tres" id="5_ey7c2"]
[ext_resource type="Resource" uid="uid://b6qcrd7qlli61" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_5.tres" id="6_2fh0f"]
[ext_resource type="Resource" uid="uid://c3j7xqh1qh1lx" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_6.tres" id="7_wce5y"]

[resource]
script = ExtResource("1_aexae")
weapon_name = &"Word"
upgrades = Array[Resource("res://resources/weapon_upgrades/weapon_upgrade.gd")]([ExtResource("3_rhvhm"), ExtResource("3_sylwv"), ExtResource("4_7ksjm"), ExtResource("5_ey7c2"), ExtResource("6_2fh0f")])
upgrades = Array[Resource("res://resources/weapon_upgrades/weapon_upgrade.gd")]([ExtResource("3_rhvhm"), ExtResource("3_sylwv"), ExtResource("4_7ksjm"), ExtResource("5_ey7c2"), ExtResource("6_2fh0f"), ExtResource("7_wce5y")])
weapon_scene = ExtResource("2_5pldk")
4 changes: 2 additions & 2 deletions scenes/game_object/book/book.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ _data = {
"spawn": SubResource("Animation_0o65e")
}

[sub_resource type="ShaderMaterial" id="ShaderMaterial_wol20"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_os8mg"]
resource_local_to_scene = true
shader = ExtResource("7_7kivl")
shader_parameter/lerp_percent = 0.0
Expand Down Expand Up @@ -301,7 +301,7 @@ money = 8
[node name="HitFlashComponent" parent="." node_paths=PackedStringArray("health_component", "sprite") instance=ExtResource("5_j28e0")]
health_component = NodePath("../HealthComponent")
sprite = NodePath("../Visuals/BookSprite")
hit_flash_material = SubResource("ShaderMaterial_wol20")
hit_flash_material = SubResource("ShaderMaterial_os8mg")

[node name="FreezableComponent" parent="." node_paths=PackedStringArray("hurtbox_component", "velocity_component", "sprite") instance=ExtResource("8_w4gbr")]
hurtbox_component = NodePath("../HurtboxComponent")
Expand Down
6 changes: 3 additions & 3 deletions scenes/game_object/bookshelf/bookshelf.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ _data = {
"attack": SubResource("Animation_mb0hy")
}

[sub_resource type="ShaderMaterial" id="ShaderMaterial_0lipm"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_tin87"]
resource_local_to_scene = true
shader = ExtResource("7_10tro")
shader_parameter/lerp_percent = 0.0
Expand Down Expand Up @@ -133,7 +133,7 @@ money = 20
[node name="HitFlashComponent" parent="." node_paths=PackedStringArray("health_component", "sprite") instance=ExtResource("6_ti1ov")]
health_component = NodePath("../HealthComponent")
sprite = NodePath("../Visuals/BookshelfSprite")
hit_flash_material = SubResource("ShaderMaterial_0lipm")
hit_flash_material = SubResource("ShaderMaterial_tin87")

[node name="FreezableComponent" parent="." node_paths=PackedStringArray("hurtbox_component", "velocity_component", "sprite") instance=ExtResource("9_sv366")]
hurtbox_component = NodePath("../HurtboxComponent")
Expand All @@ -156,7 +156,7 @@ path_desired_distance = 34.0
target_desired_distance = 34.0

[node name="HitboxComponent" parent="." instance=ExtResource("13_uyge8")]
collision_layer = 4
collision_layer = 2
collision_mask = 0

[node name="CollisionShape2D" type="CollisionShape2D" parent="HitboxComponent"]
Expand Down
2 changes: 1 addition & 1 deletion scenes/game_object/coin/coin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ func on_player_collect_area_body_entered(body: Node2D) -> void:

func drop_money() -> void:
GameEvents.emit_money_collected(money)
AudioManager.play_audio("pick_up_coin", -12.0)
AudioManager.play_audio("pick_up_coin", -15.0)
queue_free()
2 changes: 1 addition & 1 deletion scenes/game_object/water_cooler/water_cooler.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func _ready() -> void:
func on_body_entered(body: Node2D) -> void:
if body is Player:
var health_component := (body as Player).health_component
health_component.heal_percent(0.2)
health_component.heal_percent(0.40)
collected.emit()
AudioManager.play_audio("drink", 12.0, 1.25)
queue_free()
2 changes: 1 addition & 1 deletion scenes/manager/upgrade_manager.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=7 format=3 uid="uid://du2ktn8bc1io3"]

[ext_resource type="Script" path="res://scenes/manager/upgrade_manager.gd" id="1_ftk8e"]
[ext_resource type="Resource" uid="uid://ckabhhn8i42ps" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_data.tres" id="2_x06s2"]
[ext_resource type="Resource" uid="uid://b7gub5sgdpo3" path="res://resources/weapon_upgrades/word/word_weapon_upgrade_data.tres" id="2_x06s2"]
[ext_resource type="PackedScene" uid="uid://ocl5j5ch8y0d" path="res://scenes/ui/shop_screen.tscn" id="3_7u1xt"]
[ext_resource type="Resource" uid="uid://dk8p5sdy7rf2l" path="res://resources/weapon_upgrades/calculator/calculator_weapon_upgrade_data.tres" id="3_absg0"]
[ext_resource type="Resource" uid="uid://bspuoy6v5dah4" path="res://resources/weapon_upgrades/number/number_weapon_upgrade_data.tres" id="4_habg1"]
Expand Down
17 changes: 9 additions & 8 deletions scenes/manager/wave_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends Node2D

const MIN_SPAWN_RADIUS := 720.0
const MAX_SPAWN_RADIUS := 1080.0
const MIN_WAVE_TIME := 10.0

# Each dictionary has the following structure:
# {
Expand Down Expand Up @@ -31,28 +32,28 @@ func on_timer_timeout() -> void:
match cur_wave:
5: enemy_table.add_item(
{
"cost": 2.0,
"cost": 3.0,
"scene": preload("res://scenes/game_object/exam_paper/exam_paper.tscn"),
"weight": 20,
},
20)
8: enemy_table.add_item(
{
"cost": 3.0,
"cost": 4.0,
"scene": preload("res://scenes/game_object/printer/printer.tscn"),
"weight": 20,
},
20)
10: enemy_table.add_item(
15: enemy_table.add_item(
{
"cost": 20,
"cost": 10,
"scene": preload("res://scenes/game_object/bookshelf/bookshelf.tscn"),
"weight": 15,
},
15)
20: enemy_table.add_item(
30: enemy_table.add_item(
{
"cost": 40,
"cost": 25,
"scene": preload("res://scenes/game_object/professor/professor.tscn"),
"weight": 8,
},
Expand All @@ -62,7 +63,7 @@ func on_timer_timeout() -> void:

func get_target_cost() -> float:
# TODO: Create mathematical formula for cost
return 6 * log(cur_wave) + 10
return 0.1 * cur_wave + 10#6 * log(cur_wave) + 10


func get_spawn_position() -> Vector2:
Expand Down Expand Up @@ -106,5 +107,5 @@ func start_wave() -> void:
target_cost -= enemy.cost
actual_cost += enemy.cost

$Timer.wait_time = actual_cost + randf_range(-2.0, 3.0)
$Timer.wait_time = MIN_WAVE_TIME + actual_cost/5 + randf_range(-3.0, 3.0)
$Timer.start()
5 changes: 4 additions & 1 deletion scenes/world/world.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ outlines = Array[PackedVector2Array]([PackedVector2Array(-239, -1153, 34.5356, -
size = Vector2(70.875, 585)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_nal4u"]
size = Vector2(150, 103)
size = Vector2(150, 102.5)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_w3n1w"]
size = Vector2(119, 113)
Expand Down Expand Up @@ -433,6 +433,7 @@ monitoring = false
script = ExtResource("25_b3vhs")

[node name="CollisionShape2D" type="CollisionShape2D" parent="TileMap/WorldObjects/WorldObject24"]
position = Vector2(0, 3.25)
shape = SubResource("RectangleShape2D_nal4u")

[node name="WorldObject25" type="Area2D" parent="TileMap/WorldObjects"]
Expand Down Expand Up @@ -693,6 +694,7 @@ monitoring = false
script = ExtResource("25_b3vhs")

[node name="CollisionShape2D" type="CollisionShape2D" parent="TileMap/WorldObjects/WorldObject50"]
position = Vector2(2, 0)
shape = SubResource("RectangleShape2D_w3n1w")

[node name="WorldObject51" type="Area2D" parent="TileMap/WorldObjects"]
Expand All @@ -703,6 +705,7 @@ monitoring = false
script = ExtResource("25_b3vhs")

[node name="CollisionShape2D" type="CollisionShape2D" parent="TileMap/WorldObjects/WorldObject51"]
position = Vector2(1, 0)
shape = SubResource("RectangleShape2D_w3n1w")

[node name="WorldObject52" type="Area2D" parent="TileMap/WorldObjects"]
Expand Down

0 comments on commit a3e1857

Please sign in to comment.