système de sauvegarde, scène 3D de test sur la base astra et passage en forward+

This commit is contained in:
2026-02-06 10:28:36 +01:00
parent 83d462f2f4
commit cc421a951f
97 changed files with 2138 additions and 1007 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
[gd_resource type="GradientTexture1D" load_steps=2 format=3 uid="uid://c4usrfeevb4n1"]
[gd_resource type="GradientTexture1D" format=3 uid="uid://c4usrfeevb4n1"]
[sub_resource type="Gradient" id="Gradient_tbl1d"]
interpolation_mode = 1
offsets = PackedFloat32Array(0.18263473, 0.2994012, 0.4730539, 0.6766467)
colors = PackedColorArray(0, 0, 0, 1, 0.0974324, 0.14984256, 0.19949976, 1, 0.15294118, 0.1764706, 0.27450982, 1, 1, 1, 1, 1)
offsets = PackedFloat32Array(0.15111111, 0.28, 0.44444445, 0.64, 0.72888887)
colors = PackedColorArray(0.015686275, 0.003921569, 0.050980393, 1, 0.13725491, 0.39215687, 0.6666667, 1, 0.0627451, 0.05882353, 0.16862746, 1, 0.5882353, 0.7019608, 0.85882354, 1, 1, 1, 1, 1)
[resource]
gradient = SubResource("Gradient_tbl1d")

View File

@@ -1,5 +1,5 @@
[gd_resource type="StandardMaterial3D" load_steps=0 format=3 uid="uid://c26wmvhmhpqw7"]
[gd_resource type="StandardMaterial3D" format=3 uid="uid://c26wmvhmhpqw7"]
[resource]
transparency = 1
albedo_color = Color(0, 0.18850002, 0.29, 0.8156863)
albedo_color = Color(0.14069998, 0.39652818, 0.67, 0.8901961)

View File

@@ -1,3 +1,5 @@
// Copied here https://www.youtube.com/watch?v=tPl7zfwuEEA
shader_type spatial;
render_mode world_vertex_coords;
@@ -14,6 +16,7 @@ void vertex() {
}
void fragment() {
METALLIC = 0.0;
SPECULAR = specular;
ROUGHNESS = roughness;

View File

@@ -12,9 +12,14 @@ var next_mouse_pos : Vector2
func _ready():
%Version.text = ProjectSettings.get_setting("application/config/version")
%Start.text = tr("CONTINUE") if GameInfo.game_loaded else tr("START")
%Restart.visible = GameInfo.game_loaded
func _on_start_pressed():
SceneManager.change_scene("INTRO")
if 'demeter_intro' not in GameInfo.game_data.dialogs_done:
SceneManager.change_scene("INTRO")
else:
SceneManager.change_scene("REGION")
func _process(delta):
next_mouse_pos = get_viewport().get_mouse_position()
@@ -41,3 +46,8 @@ func _process(delta):
%Planet3d.rotate(Vector3.UP, planet_rotation.x * delta)
%Planet3d.rotate(Vector3.RIGHT, planet_rotation.y * delta)
func _on_restart_button_down():
GameInfo.restart_game_data()
_on_start_pressed()

View File

@@ -1,17 +1,18 @@
[gd_scene load_steps=12 format=3 uid="uid://dxvtm81tq1a6w"]
[gd_scene format=3 uid="uid://dxvtm81tq1a6w"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_4ph5l"]
[ext_resource type="Script" uid="uid://cwmp2une7hobe" path="res://stages/title_screen/scripts/title_screen.gd" id="1_6yuhi"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_6yuhi"]
[ext_resource type="Texture2D" uid="uid://cdpqg3pkjcw2h" path="res://stages/title_screen/assets/textures/title.png" id="3_y6tw6"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://common/icons/rotate.svg" id="5_6yuhi"]
[ext_resource type="PackedScene" uid="uid://cm5b7w7j6527f" path="res://stages/title_screen/planet_3d.tscn" id="5_7a1qq"]
[ext_resource type="Shader" uid="uid://bv2rghn44mrrf" path="res://stages/title_screen/resources/shaders/stars.gdshader" id="7_y6tw6"]
[sub_resource type="ViewportTexture" id="ViewportTexture_6yuhi"]
viewport_path = NodePath("SubViewport")
[sub_resource type="FastNoiseLite" id="FastNoiseLite_qnk88"]
seed = -907666519
[sub_resource type="FastNoiseLite" id="FastNoiseLite_6yuhi"]
seed = 1468520525
frequency = 1.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7a1qq"]
@@ -33,25 +34,23 @@ sky_material = SubResource("ShaderMaterial_7a1qq")
background_mode = 2
sky = SubResource("Sky_65b6a")
sky_custom_fov = 61.7
reflected_light_source = 1
tonemap_exposure = 1.54
glow_enabled = true
ambient_light_source = 3
glow_intensity = 1.16
glow_bloom = 0.49
glow_hdr_threshold = 0.32
glow_hdr_scale = 0.0
glow_hdr_luminance_cap = 5.63
fog_light_energy = 0.0
fog_density = 0.0
fog_sky_affect = 0.0
fog_height = -1024.0
fog_height_density = 0.4145
adjustment_enabled = true
adjustment_brightness = 1.04
adjustment_contrast = 1.2
adjustment_saturation = 0.88
[node name="TitleScreen" type="CanvasLayer"]
[node name="TitleScreen" type="CanvasLayer" unique_id=1166097103]
script = ExtResource("1_6yuhi")
[node name="Background1" type="TextureRect" parent="."]
[node name="Background1" type="TextureRect" parent="." unique_id=765477669]
z_index = -1
anchors_preset = 15
anchor_right = 1.0
@@ -62,7 +61,7 @@ texture = SubResource("ViewportTexture_6yuhi")
expand_mode = 2
stretch_mode = 6
[node name="MarginContainer" type="MarginContainer" parent="."]
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=602845661]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -70,25 +69,25 @@ grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_4ph5l")
[node name="Version" type="Label" parent="MarginContainer"]
[node name="Version" type="Label" parent="MarginContainer" unique_id=875225181]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
text = "Version"
[node name="GridContainer" type="HBoxContainer" parent="MarginContainer"]
[node name="GridContainer" type="HBoxContainer" parent="MarginContainer" unique_id=975183276]
layout_mode = 2
alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/GridContainer"]
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/GridContainer" unique_id=1713044942]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
theme_override_constants/separation = 40
theme_override_constants/separation = 20
alignment = 1
[node name="Logo" type="TextureRect" parent="MarginContainer/GridContainer/VBoxContainer"]
[node name="Logo" type="TextureRect" parent="MarginContainer/GridContainer/VBoxContainer" unique_id=549806567]
z_index = 2
custom_minimum_size = Vector2(400, 0)
layout_mode = 2
@@ -98,7 +97,7 @@ texture = ExtResource("3_y6tw6")
expand_mode = 5
stretch_mode = 5
[node name="Start" type="Button" parent="MarginContainer/GridContainer/VBoxContainer"]
[node name="Start" type="Button" parent="MarginContainer/GridContainer/VBoxContainer" unique_id=366586661]
unique_name_in_owner = true
z_index = 1
layout_mode = 2
@@ -109,27 +108,46 @@ theme_override_font_sizes/font_size = 33
text = "START"
icon = ExtResource("3_6yuhi")
[node name="Credits" type="VBoxContainer" parent="MarginContainer/GridContainer"]
[node name="Restart" type="Button" parent="MarginContainer/GridContainer/VBoxContainer" unique_id=1324703681]
unique_name_in_owner = true
z_index = 1
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("1_4ph5l")
theme_override_font_sizes/font_size = 33
text = "RESTART"
icon = ExtResource("5_6yuhi")
flat = true
[node name="Credits" type="VBoxContainer" parent="MarginContainer/GridContainer" unique_id=871547635]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
[node name="SubViewport" type="SubViewport" parent="."]
[node name="SubViewport" type="SubViewport" parent="." unique_id=1703203942]
size = Vector2i(1980, 1080)
[node name="Planet3d" parent="SubViewport" instance=ExtResource("5_7a1qq")]
[node name="Planet3d" parent="SubViewport" unique_id=926789923 instance=ExtResource("5_7a1qq")]
unique_name_in_owner = true
noise = SubResource("FastNoiseLite_qnk88")
noise = SubResource("FastNoiseLite_6yuhi")
[node name="Camera3D" type="Camera3D" parent="SubViewport"]
[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)
current = true
fov = 34.0
[node name="WorldEnvironment" type="WorldEnvironment" parent="SubViewport"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="SubViewport" unique_id=466718971]
environment = SubResource("Environment_nmsah")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewport"]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewport" unique_id=1446693225]
transform = Transform3D(0.044800885, 0.76661056, -0.6405476, -0.8325595, 0.38302267, 0.4001729, 0.55212104, 0.51536596, 0.65540874, -23.18848, 19.508549, 0)
light_volumetric_fog_energy = 0.0
light_specular = 0.0
shadow_enabled = true
shadow_normal_bias = 0.0
shadow_opacity = 0.48
shadow_blur = 3.055
[connection signal="pressed" from="MarginContainer/GridContainer/VBoxContainer/Start" to="." method="_on_start_pressed"]
[connection signal="button_down" from="MarginContainer/GridContainer/VBoxContainer/Restart" to="." method="_on_restart_button_down"]