Equilibrage, amélioration du tutoriel et de la clarté des éléments de gameplay
* Rajout d'une région supplémentaire pour finir le jeu, et renommage de la dernière map en "Base Borea" * Amélioration de la clarté du détecteur * Les objectifs du tutoriel et les indications de jeu apparaissent désormais en haut de l'écran * Changement des étapes du tutoriel * Amélioration de la lisibilité du voyage dans le vaisseau (avec un décompte de distance jusqu'à la fin du jeu) * Changement de la génération de map : la zone fertile est désormais uniquement au centre de la carte, les chunks sont également plus petits * Changement des objectifs à réaliser ainsi que des recharges, seule 8 par région désormais * Les modificateurs de région n'évoluent plus
This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="2_nq5i2"]
|
||||
[ext_resource type="PackedScene" uid="uid://edxmvtvtipwq" path="res://gui/game/alert/alert.tscn" id="2_ykapk"]
|
||||
[ext_resource type="PackedScene" uid="uid://brfsapvj2quxm" path="res://gui/game/energy_info/energy_info.tscn" id="4_2wykm"]
|
||||
[ext_resource type="PackedScene" uid="uid://fnv0qhkh40mv" path="res://gui/game/announce/announce.tscn" id="4_h6540"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="6_2wykm"]
|
||||
[ext_resource type="PackedScene" uid="uid://df0eop555wfj5" path="res://gui/game/objective_progress_bar/objective_progress_bar.tscn" id="6_dr1y2"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="6_h6540"]
|
||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="6_id0t5"]
|
||||
[ext_resource type="Texture2D" uid="uid://b43thuq8piv18" path="res://common/icons/skull.svg" id="7_dr1y2"]
|
||||
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
|
||||
@@ -36,6 +34,43 @@ fill_to = Vector2(1.5, 0.5)
|
||||
font = ExtResource("6_2wykm")
|
||||
font_size = 40
|
||||
|
||||
[sub_resource type="Animation" id="Animation_rcm5b"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("%ObjectiveLabel/..:theme_override_constants/margin_top")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ajf5p"]
|
||||
resource_name = "bump"
|
||||
length = 0.4
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("%ObjectiveLabel/..:theme_override_constants/margin_top")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.23333333, 0.4),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0, 20, 0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jomh8"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_rcm5b"),
|
||||
&"bump": SubResource("Animation_ajf5p")
|
||||
}
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_rcm5b"]
|
||||
font = ExtResource("6_2wykm")
|
||||
font_size = 20
|
||||
@@ -68,9 +103,6 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Announce" parent="." unique_id=94658910 instance=ExtResource("4_h6540")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=2054297293]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -89,7 +121,7 @@ mouse_filter = 2
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 0
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="ObjectiveProgressBar" parent="MarginContainer/VBoxContainer" unique_id=2043451865 instance=ExtResource("6_dr1y2")]
|
||||
unique_name_in_owner = true
|
||||
@@ -114,26 +146,56 @@ text = "0 Plant Point"
|
||||
label_settings = SubResource("LabelSettings_id0t5")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RechargesLeftLabel" type="Label" parent="MarginContainer/VBoxContainer" unique_id=1254074923]
|
||||
[node name="ObjectiveContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer" unique_id=946367772]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_left = 0
|
||||
theme_override_constants/margin_top = 0
|
||||
theme_override_constants/margin_right = 0
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="ObjectiveLabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer/ObjectiveContainer" unique_id=2044989003]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(600, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 0
|
||||
theme_override_colors/default_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
|
||||
theme_override_constants/shadow_outline_size = 8
|
||||
theme_override_constants/shadow_offset_x = 0
|
||||
theme_override_constants/shadow_offset_y = 0
|
||||
theme_override_fonts/normal_font = ExtResource("6_2wykm")
|
||||
theme_override_fonts/bold_font = ExtResource("6_2wykm")
|
||||
theme_override_fonts/bold_italics_font = ExtResource("6_2wykm")
|
||||
theme_override_fonts/italics_font = ExtResource("6_2wykm")
|
||||
theme_override_font_sizes/normal_font_size = 30
|
||||
theme_override_font_sizes/bold_font_size = 30
|
||||
theme_override_font_sizes/bold_italics_font_size = 30
|
||||
theme_override_font_sizes/italics_font_size = 30
|
||||
theme_override_font_sizes/mono_font_size = 30
|
||||
bbcode_enabled = true
|
||||
text = "Action en cours Action en cours Action en cours Action en cours Action en cours "
|
||||
fit_content = true
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ObjectiveAnimationPlayer" type="AnimationPlayer" parent="MarginContainer/VBoxContainer/ObjectiveContainer/ObjectiveLabel" unique_id=31675045]
|
||||
unique_name_in_owner = true
|
||||
libraries/ = SubResource("AnimationLibrary_jomh8")
|
||||
|
||||
[node name="GiveUpButton" type="Button" parent="MarginContainer/VBoxContainer" unique_id=1128310884]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "9 charges left"
|
||||
label_settings = ExtResource("6_h6540")
|
||||
horizontal_alignment = 1
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
text = "GIVE_UP"
|
||||
icon = ExtResource("7_dr1y2")
|
||||
|
||||
[node name="Inventory" parent="MarginContainer" unique_id=1178590658 instance=ExtResource("9_id0t5")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 8
|
||||
|
||||
[node name="GiveUpButton" type="Button" parent="MarginContainer" unique_id=1128310884]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 8
|
||||
text = "GIVE_UP"
|
||||
icon = ExtResource("7_dr1y2")
|
||||
|
||||
[node name="Help" type="VBoxContainer" parent="MarginContainer" unique_id=645268912]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_27lg1"]
|
||||
shader = ExtResource("1_v570a")
|
||||
shader_parameter/strength = 5.45500025585262
|
||||
shader_parameter/mix_percentage = 0.02400000114
|
||||
shader_parameter/strength = 0.0
|
||||
shader_parameter/mix_percentage = 0.0
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_h2bel"]
|
||||
viewport_path = NodePath("NightAnimation/SubViewport")
|
||||
@@ -55,12 +55,12 @@ _data = {
|
||||
|
||||
[node name="PassDay" type="CanvasLayer" unique_id=335255544]
|
||||
layer = 3
|
||||
visible = false
|
||||
script = ExtResource("1_0pm4g")
|
||||
|
||||
[node name="Blur" type="ColorRect" parent="." unique_id=546890405]
|
||||
unique_name_in_owner = true
|
||||
physics_interpolation_mode = 0
|
||||
visible = false
|
||||
material = SubResource("ShaderMaterial_27lg1")
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -72,6 +72,7 @@ script = ExtResource("2_bhfpo")
|
||||
|
||||
[node name="PassDayInfo" type="VBoxContainer" parent="." unique_id=833110506]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -139,3 +140,7 @@ theme_override_constants/margin_bottom = 15
|
||||
[node name="EnergyPassDayInfo" parent="MarginContainer" unique_id=2044341204 instance=ExtResource("2_feyaf")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 15
|
||||
theme_override_constants/margin_top = 15
|
||||
theme_override_constants/margin_right = 15
|
||||
theme_override_constants/margin_bottom = 15
|
||||
|
||||
@@ -10,16 +10,15 @@ var score_mirror :
|
||||
score_mirror = v
|
||||
score_update(true)
|
||||
|
||||
var objective_text : String = "" : set = set_objective_text
|
||||
|
||||
func _ready():
|
||||
GameInfo.game_data.current_region_data.updated.connect(_on_region_updated)
|
||||
GameInfo.game_data.player_data.updated.connect(_on_player_updated)
|
||||
GameInfo.game_data.current_region_data.pass_day_ended.connect(_on_region_pass_day_ended)
|
||||
|
||||
|
||||
%ObjectiveProgressBar.visible = not "tutorial" in GameInfo.game_data.current_region_data.flags
|
||||
%SimplePlantPointScore.visible = "tutorial" in GameInfo.game_data.current_region_data.flags
|
||||
|
||||
charge_update(GameInfo.game_data.current_region_data)
|
||||
state_update(GameInfo.game_data.current_region_data)
|
||||
player_update(GameInfo.game_data.player_data, false)
|
||||
%EnergyInfo.reset_size()
|
||||
@@ -28,6 +27,7 @@ func _ready():
|
||||
score_mirror = GameInfo.game_data.current_region_data.get_score()
|
||||
for p : PlantData in GameInfo.game_data.current_region_data.plants:
|
||||
score_by_plant[str(p.random_seed)] = p.get_score()
|
||||
set_objective_text()
|
||||
|
||||
func _on_player_updated(player_data : PlayerData):
|
||||
player_update(player_data)
|
||||
@@ -48,8 +48,6 @@ func player_update(player_data : PlayerData, with_animation = true):
|
||||
else:
|
||||
%NoEnergyVignette.modulate.a = 1. if player_data.energy == 0 else 0.
|
||||
|
||||
|
||||
|
||||
func _on_region_updated(region_data : RegionData):
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
if score_mirror != region_data.get_score():
|
||||
@@ -70,23 +68,19 @@ func _on_region_updated(region_data : RegionData):
|
||||
score_mirror -= score_by_plant[key]
|
||||
score_by_plant.erase(key)
|
||||
|
||||
charge_update(region_data)
|
||||
state_update(region_data)
|
||||
|
||||
func _on_give_up_pressed():
|
||||
GameInfo.game_data.give_up()
|
||||
SceneManager.change_to_scene_id('ASTRA')
|
||||
|
||||
func charge_update(region_data : RegionData):
|
||||
%RechargesLeftLabel.text = tr("%d_CHARGE_LEFT") % (region_data.charges)
|
||||
|
||||
func score_update(with_animation = true):
|
||||
var objective_progression : float
|
||||
var objective = GameInfo.game_data.current_region_data.objective
|
||||
if GameInfo.game_data.current_region_data.state == RegionData.State.SUCCEEDED:
|
||||
objective_progression = 1.
|
||||
%ObjectiveProgressBar.text = tr("FULL")
|
||||
%ObjectiveProgressBar.text = tr("FULL") + " %d" % [score_mirror]
|
||||
else:
|
||||
var objective = GameInfo.game_data.current_region_data.objective
|
||||
objective_progression = (float(score_mirror) / max(float(objective), 1))
|
||||
%ObjectiveProgressBar.text = "%d/%d" % [score_mirror, objective]
|
||||
|
||||
@@ -107,17 +101,11 @@ func score_update(with_animation = true):
|
||||
|
||||
func state_update(region_data : RegionData):
|
||||
if region_data.state == RegionData.State.SUCCEEDED:
|
||||
%Alert.text = "SHIP_IS_READY_TO_TAKE_OFF"
|
||||
objective_text = "SHIP_IS_READY_TO_TAKE_OFF"
|
||||
if "tutorial" in region_data.flags:
|
||||
%Alert.text = "TUTORIAL_FINISHED"
|
||||
%Alert.modulate = Color("ffa617ff")
|
||||
%Alert.appear()
|
||||
objective_text = "PASS_THE_MYSTERIOUS_DOOR"
|
||||
elif region_data.state == RegionData.State.FAILED:
|
||||
%Alert.text = "NO_RECHARGE_LEFT"
|
||||
%Alert.modulate = Color("FF006E")
|
||||
%Alert.appear()
|
||||
else:
|
||||
%Alert.disappear()
|
||||
objective_text = "NO_RECHARGE_LEFT"
|
||||
%GiveUpButton.visible = region_data.state == RegionData.State.FAILED
|
||||
|
||||
func plant_changing_score(plant_data: PlantData, amount : int):
|
||||
@@ -167,16 +155,16 @@ func spawn_score_particle(
|
||||
sprite_particle.queue_free()
|
||||
|
||||
|
||||
func set_objective_text(v : String = objective_text):
|
||||
objective_text = v
|
||||
if is_node_ready():
|
||||
if (objective_text != "" and objective_text != %ObjectiveLabel.text):
|
||||
%ObjectiveAnimationPlayer.play("bump")
|
||||
AudioManager.play_sfx("Screen_interaction")
|
||||
%ObjectiveLabel.text = v
|
||||
|
||||
func _on_player_action_tried_without_energy():
|
||||
$AnimationPlayer.play("no_energy_left")
|
||||
|
||||
func _on_player_upgraded():
|
||||
$EffectAnimation.play("upgrade")
|
||||
|
||||
func _on_region_pass_day_ended(region:Region):
|
||||
if region.data.charges == 1:
|
||||
%Announce.announce(
|
||||
tr("LAST_RECHARGE"),
|
||||
tr("%d_GARDEN_SCORE_LEFT") % [region.data.objective - region.garden.get_score()],
|
||||
Announce.RED_COLOR
|
||||
)
|
||||
$EffectAnimation.play("upgrade")
|
||||
@@ -8,6 +8,7 @@ signal succeded
|
||||
var indicators : Array[InGameIndicator]
|
||||
@export var player : Player
|
||||
@export var region : Region
|
||||
@export var game_gui : GameGui
|
||||
|
||||
@onready var steps : Array[Step] = [
|
||||
Step.new(
|
||||
@@ -15,6 +16,11 @@ var indicators : Array[InGameIndicator]
|
||||
(func ():
|
||||
return player.global_position.distance_to(region.data.player_spawn) > 30)
|
||||
),
|
||||
Step.new(
|
||||
"CHANGE_ZOOM_WITH_Z_X",
|
||||
(func ():
|
||||
return GameInfo.settings_data.zoom != 1.)
|
||||
),
|
||||
Step.new(
|
||||
"SELECT_ITEM_WITH_SCROLL_CLICK_OR_NUMBER",
|
||||
(func ():
|
||||
@@ -23,13 +29,18 @@ var indicators : Array[InGameIndicator]
|
||||
Step.new(
|
||||
"LEFT_CLICK_TO_USE_ITEMS",
|
||||
(func ():
|
||||
return player.data.inventory.get_item() and Input.is_action_just_pressed("action"))
|
||||
return player.instruction is Player.ItemActionInstruction)
|
||||
),
|
||||
Step.new(
|
||||
"USE_YOUR_DETECTOR_TO_FIND_THE_BATTERY",
|
||||
(func ():
|
||||
return player.position.distance_to(Vector2.ZERO) < 600)
|
||||
),
|
||||
Step.new(
|
||||
"RECHARGE_IN_THE_RECHARGE_STATION",
|
||||
(func ():
|
||||
return region and region.data and region.data.charges != 10)
|
||||
),
|
||||
Step.new(
|
||||
"DIG_A_TALION_VEIN_WITH_SHOVEL",
|
||||
(func ():
|
||||
@@ -60,11 +71,6 @@ var indicators : Array[InGameIndicator]
|
||||
return true
|
||||
return false)
|
||||
),
|
||||
Step.new(
|
||||
"RECHARGE_TO_PASS_DAYS",
|
||||
(func ():
|
||||
return region and region.data and region.data.charges != 10)
|
||||
),
|
||||
Step.new(
|
||||
"GAIN_FIRST_PLANT_POINT",
|
||||
(func ():
|
||||
@@ -112,6 +118,7 @@ func _process(_d):
|
||||
return
|
||||
step_gui.suceeded = step.succeeded
|
||||
if not step.succeeded:
|
||||
game_gui.objective_text = step.text
|
||||
success = false
|
||||
if success:
|
||||
finish_tutorial()
|
||||
|
||||
@@ -159,6 +159,7 @@ func bounce(
|
||||
direction : Vector2 = Vector2.UP,
|
||||
transition_type: Tween.TransitionType = Tween.TransitionType.TRANS_BOUNCE,
|
||||
):
|
||||
setup_default_values()
|
||||
start_anim()
|
||||
await add_tween(
|
||||
"position",
|
||||
|
||||
Reference in New Issue
Block a user