Dev demo 1.2

* Ajout d'un paramètre de FOV
* Ajout d'un paramètre d'auto pickup des graines
This commit is contained in:
2026-06-08 18:37:55 +02:00
parent 1e2563e328
commit 5aff9eadaa
13 changed files with 124 additions and 47 deletions

View File

@@ -9,6 +9,7 @@ signal language_changed(settings : SettingsData)
signal sound_changed(settings : SettingsData) signal sound_changed(settings : SettingsData)
signal video_changed(settings : SettingsData) signal video_changed(settings : SettingsData)
signal game_changed(settings : SettingsData) signal game_changed(settings : SettingsData)
signal fov_changed(value : float)
#region ------------------ Language ------------------ #region ------------------ Language ------------------
@@ -52,9 +53,19 @@ const AVAILABLE_LANGUAGES_LABEL = [
#region ------------------ Controls ------------------ #region ------------------ Controls ------------------
@export var action_remapped : Array[String] = [] @export var action_remapped : Array[String] = []
@export var input_remapped : Array[InputEvent] = [] @export var input_remapped : Array[InputEvent] = []
@export var auto_pickup := true
@export var fov := 75. :
set(v):
fov = v
fov_changed.emit(fov)
#region ------------------ Game ------------------ #region ------------------ Game ------------------
const MAX_ZOOM = 2. const MAX_ZOOM = 2.

View File

@@ -114,6 +114,7 @@ func _process(delta):
if elapsed_time > last_just_dropped_item_objects_updated + JUST_DROPPED_ITEM_UPDATE_INTERVAL: if elapsed_time > last_just_dropped_item_objects_updated + JUST_DROPPED_ITEM_UPDATE_INTERVAL:
update_just_dropped_item_objects() update_just_dropped_item_objects()
if GameInfo.settings_data.auto_pickup:
take_surrounding_seeds() take_surrounding_seeds()
move_and_slide() move_and_slide()

View File

@@ -60,7 +60,7 @@ current = true
near = 0.003 near = 0.003
[node name="Outline" type="MeshInstance3D" parent="Camera3D" unique_id=1477584785] [node name="Outline" type="MeshInstance3D" parent="Camera3D" unique_id=1477584785]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.9337665e-08, 0, -0.87116754) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.96128e-09, 0, -0.24486887)
mesh = SubResource("QuadMesh_o44vi") mesh = SubResource("QuadMesh_o44vi")
surface_material_override/0 = ExtResource("2_fcmrk") surface_material_override/0 = ExtResource("2_fcmrk")

View File

@@ -32,6 +32,11 @@ func _ready():
%MoveTutorial.visible = not "3d_move" in GameInfo.game_data.tutorials_done %MoveTutorial.visible = not "3d_move" in GameInfo.game_data.tutorials_done
%InteractTutorial.visible = false %InteractTutorial.visible = false
%Camera3D.fov = GameInfo.settings_data.fov
GameInfo.settings_data.fov_changed.connect(
func(fov : float):
%Camera3D.fov = fov
)
func _input(event): func _input(event):
if controlling_player: if controlling_player:

View File

@@ -16,7 +16,7 @@ script = ExtResource("1_g86te")
[node name="ControlsWindow" parent="." unique_id=257725506 instance=ExtResource("1_mnd1d")] [node name="ControlsWindow" parent="." unique_id=257725506 instance=ExtResource("1_mnd1d")]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(900, 500) custom_minimum_size = Vector2(900, 600)
layout_mode = 1 layout_mode = 1
title = "CONTROLS" title = "CONTROLS"

View File

@@ -7,8 +7,11 @@ const INPUT_GROUP_SCENE = preload("res://gui/menu/controls/input_group.tscn")
func _ready(): func _ready():
create_input_list() create_input_list()
if not Engine.is_editor_hint(): %ControlsWindow.hide()
%ControlsWindow.close_window() %ControlsWindow.closed.connect(
func ():
GameInfo.save_settings()
)
func open_controls(): func open_controls():
create_input_list() create_input_list()

View File

@@ -11,14 +11,18 @@ func _ready():
setup_languages() setup_languages()
setup_sound() setup_sound()
setup_video() setup_video()
setup_controls()
show() show()
if not Engine.is_editor_hint(): %SettingsWindow.hide()
%SettingsWindow.close_window() %SettingsWindow.closed.connect(
func():
GameInfo.save_settings()
)
func open_settings(): func open_settings():
setup_languages() setup_languages()
setup_sound() setup_sound()
setup_video() setup_controls()
show() show()
%SettingsWindow.open_window() %SettingsWindow.open_window()
@@ -41,6 +45,10 @@ func setup_sound():
func setup_video(): func setup_video():
%FullScreenCheckBox.button_pressed = settings.full_screen %FullScreenCheckBox.button_pressed = settings.full_screen
func setup_controls():
%AutoPickupCheckBox.button_pressed = settings.auto_pickup
%FovSlider.value = settings.fov
func _on_language_option_button_item_selected(index: int): func _on_language_option_button_item_selected(index: int):
settings.language = SettingsData.AVAILABLE_LANGUAGES[index] settings.language = SettingsData.AVAILABLE_LANGUAGES[index]
@@ -62,3 +70,10 @@ func _on_sfx_slider_value_changed(value: float):
if value != settings.sfx_volume: if value != settings.sfx_volume:
%SfxTestPlayer.play() %SfxTestPlayer.play()
settings.sfx_volume = min(1.0, value) settings.sfx_volume = min(1.0, value)
func _on_auto_pickup_check_box_toggled(toggled_on: bool):
settings.auto_pickup = toggled_on
func _on_fov_slider_value_changed(value):
if is_node_ready():
settings.fov = value

View File

@@ -23,6 +23,7 @@ script = ExtResource("1_7t8mv")
[node name="SettingsWindow" parent="." unique_id=798514856 instance=ExtResource("1_gkn1k")] [node name="SettingsWindow" parent="." unique_id=798514856 instance=ExtResource("1_gkn1k")]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3 process_mode = 3
custom_minimum_size = Vector2(700, 600)
layout_mode = 1 layout_mode = 1
offset_left = -349.99994 offset_left = -349.99994
offset_right = 350.00055 offset_right = 350.00055
@@ -131,6 +132,40 @@ size_flags_horizontal = 10
size_flags_vertical = 4 size_flags_vertical = 4
theme = ExtResource("2_7t8mv") theme = ExtResource("2_7t8mv")
[node name="FovSliderText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings" unique_id=1512796885 instance=ExtResource("4_rbiwc")]
layout_mode = 2
size_flags_horizontal = 3
text = "FOV"
[node name="FovSlider" type="HSlider" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings" unique_id=1863124478]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource("2_7t8mv")
min_value = 25.0
max_value = 150.0
value = 25.0
[node name="GameTitle" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" unique_id=1070654753 instance=ExtResource("3_rbiwc")]
layout_mode = 2
title = "GAME"
[node name="GameSettings" type="GridContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" unique_id=51915883]
layout_mode = 2
columns = 2
[node name="AutoPickupText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/GameSettings" unique_id=1206884739 instance=ExtResource("4_rbiwc")]
layout_mode = 2
text = "AUTO_PICKUP"
[node name="AutoPickupCheckBox" type="CheckBox" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/GameSettings" unique_id=679739606]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 10
size_flags_vertical = 4
theme = ExtResource("2_7t8mv")
[node name="MusicTestPlayer" type="AudioStreamPlayer" parent="." unique_id=1716804039] [node name="MusicTestPlayer" type="AudioStreamPlayer" parent="." unique_id=1716804039]
unique_name_in_owner = true unique_name_in_owner = true
stream = ExtResource("6_8f00b") stream = ExtResource("6_8f00b")
@@ -151,5 +186,7 @@ bus = &"Sfx"
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/EnvSlider" to="." method="_on_env_slider_value_changed"] [connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/EnvSlider" to="." method="_on_env_slider_value_changed"]
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/SFXSlider" to="." method="_on_sfx_slider_value_changed"] [connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/SFXSlider" to="." method="_on_sfx_slider_value_changed"]
[connection signal="toggled" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings/FullScreenCheckBox" to="." method="_on_full_screen_check_box_toggled"] [connection signal="toggled" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings/FullScreenCheckBox" to="." method="_on_full_screen_check_box_toggled"]
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings/FovSlider" to="." method="_on_fov_slider_value_changed"]
[connection signal="toggled" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/GameSettings/AutoPickupCheckBox" to="." method="_on_auto_pickup_check_box_toggled"]
[editable path="SettingsWindow"] [editable path="SettingsWindow"]

View File

@@ -24,6 +24,7 @@ func open_window():
%ControlAnimationPlayer.appear() %ControlAnimationPlayer.appear()
func close_window(): func close_window():
if visible:
%ControlAnimationPlayer.disappear(0.3) %ControlAnimationPlayer.disappear(0.3)
await get_tree().create_timer(0.3).timeout await get_tree().create_timer(0.3).timeout
hide() hide()

View File

@@ -103,7 +103,7 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
color = Color(0.036075003, 0.019499997, 0.13, 0.98039216) color = Color(0.036075003, 0.019499997, 0.13, 0.78431374)
[node name="MarginContainer" type="MarginContainer" parent="Container" unique_id=243001225] [node name="MarginContainer" type="MarginContainer" parent="Container" unique_id=243001225]
layout_mode = 1 layout_mode = 1

View File

@@ -16,7 +16,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
config/name="Seeding The Wasteland" config/name="Seeding The Wasteland"
config/description="Seeding planets is a survival, managment and cosy game in which you play a little gardener robot." config/description="Seeding planets is a survival, managment and cosy game in which you play a little gardener robot."
config/version="demo-1.1" config/version="demo-1.2"
run/main_scene="uid://c5bruelvqbm1k" run/main_scene="uid://c5bruelvqbm1k"
config/features=PackedStringArray("4.6", "Forward Plus") config/features=PackedStringArray("4.6", "Forward Plus")
config/icon="uid://df0y0s666ui4h" config/icon="uid://df0y0s666ui4h"

View File

@@ -64,7 +64,7 @@ shader = ExtResource("8_pjo5j")
shader_parameter/strength = 5.00000023424012 shader_parameter/strength = 5.00000023424012
shader_parameter/mix_percentage = 0.3 shader_parameter/mix_percentage = 0.3
[sub_resource type="FastNoiseLite" id="FastNoiseLite_1xafb"] [sub_resource type="FastNoiseLite" id="FastNoiseLite_lwj2x"]
frequency = 1.0 frequency = 1.0
[sub_resource type="Animation" id="Animation_gn4uv"] [sub_resource type="Animation" id="Animation_gn4uv"]
@@ -448,9 +448,12 @@ flat = true
[node name="SubViewport" type="SubViewport" parent="." unique_id=1703203942] [node name="SubViewport" type="SubViewport" parent="." unique_id=1703203942]
size = Vector2i(1980, 1080) size = Vector2i(1980, 1080)
[node name="WorldEnvironment" type="WorldEnvironment" parent="SubViewport" unique_id=902577390]
[node name="Planet3d" parent="SubViewport" unique_id=926789923 instance=ExtResource("5_7a1qq")] [node name="Planet3d" parent="SubViewport" unique_id=926789923 instance=ExtResource("5_7a1qq")]
unique_name_in_owner = true unique_name_in_owner = true
noise = SubResource("FastNoiseLite_1xafb") details = 20
noise = SubResource("FastNoiseLite_lwj2x")
[node name="Camera3D" type="Camera3D" parent="SubViewport" unique_id=806252928] [node name="Camera3D" type="Camera3D" parent="SubViewport" unique_id=806252928]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.369979, 0, 64.323425) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.369979, 0, 64.323425)
@@ -472,13 +475,11 @@ autoplay = &"arrive"
[node name="Settings" parent="." unique_id=1832300574 instance=ExtResource("18_lwj2x")] [node name="Settings" parent="." unique_id=1832300574 instance=ExtResource("18_lwj2x")]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
z_index = 100 z_index = 100
mouse_filter = 2 mouse_filter = 2
[node name="Controls" parent="." unique_id=36425199 instance=ExtResource("19_rf16a")] [node name="Controls" parent="." unique_id=36425199 instance=ExtResource("19_rf16a")]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
z_index = 100 z_index = 100
mouse_filter = 2 mouse_filter = 2

View File

@@ -186,6 +186,9 @@ ENVIRONMENT_VOLUME,Environment Volume,Volume de l'environnement
SFX_VOLUME,Sfx Volume,Volume des bruitages SFX_VOLUME,Sfx Volume,Volume des bruitages
VIDEO,Video,Vidéo VIDEO,Video,Vidéo
FULLSCREEN,Fullscreen,Plein écran FULLSCREEN,Fullscreen,Plein écran
FOV,Fov,Fov
GAME,Game,Jeu
AUTO_PICKUP,Auto pickup seeds,Récolte automatique des graines
CONTROLS,Controls,Contrôles CONTROLS,Controls,Contrôles
MOVE_RIGHT,Move right,Déplacement à droite MOVE_RIGHT,Move right,Déplacement à droite
MOVE_LEFT,Move left,Déplacement à gauche MOVE_LEFT,Move left,Déplacement à gauche
1 keys en fr
186 SFX_VOLUME Sfx Volume Volume des bruitages
187 VIDEO Video Vidéo
188 FULLSCREEN Fullscreen Plein écran
189 FOV Fov Fov
190 GAME Game Jeu
191 AUTO_PICKUP Auto pickup seeds Récolte automatique des graines
192 CONTROLS Controls Contrôles
193 MOVE_RIGHT Move right Déplacement à droite
194 MOVE_LEFT Move left Déplacement à gauche