added realtime day night cycle based on system time

This commit is contained in:
Derek
2025-03-16 13:05:28 -05:00
parent efb3fee189
commit e3b887d66c
21 changed files with 2613 additions and 2298 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=50 format=4 uid="uid://f7e0v1r6ra6c"]
[gd_scene load_steps=48 format=4 uid="uid://f7e0v1r6ra6c"]
[ext_resource type="Material" uid="uid://b6hhomp4kcjvb" path="res://assets/materials/prototype/tadaoando.tres" id="3_pecld"]
[ext_resource type="PackedScene" uid="uid://c0uv33kbndbvy" path="res://assets/trashcan.tscn" id="4_2tu3b"]
@@ -19,6 +19,7 @@
[ext_resource type="Material" uid="uid://dy2pswr330jnk" path="res://assets/materials/prototype/brick.tres" id="23_pyop4"]
[ext_resource type="PackedScene" uid="uid://bycbdb5u5ewgl" path="res://assets/tree_2.tscn" id="24_od0q8"]
[ext_resource type="PackedScene" uid="uid://c7vrpfdh603kr" path="res://assets/bottle_1.tscn" id="25_fk5nr"]
[ext_resource type="PackedScene" uid="uid://cwy8iv8nlwqrc" path="res://assets/realtime_day_night_cycle.tscn" id="26_qoxo0"]
[ext_resource type="PackedScene" uid="uid://c6bpysq1tjhy4" path="res://vendingmahcine.tscn" id="26_rsia7"]
[ext_resource type="PackedScene" uid="uid://8cwmkiwcoaji" path="res://terrain1.tscn" id="27_hlma7"]
[ext_resource type="PackedScene" uid="uid://dlhjacsike5a4" path="res://assets/oildrum1.tscn" id="31_jbe2q"]
@@ -26,23 +27,6 @@
[ext_resource type="PackedScene" uid="uid://df34olntmk0wl" path="res://assets/vent_1.tscn" id="32_x8mvi"]
[ext_resource type="PackedScene" uid="uid://dt4t2a48204v1" path="res://assets/spikes_1.tscn" id="33_u3uct"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_py8au"]
[sub_resource type="Sky" id="Sky_g3jkj"]
sky_material = SubResource("ProceduralSkyMaterial_py8au")
[sub_resource type="Environment" id="Environment_tngkl"]
background_mode = 2
sky = SubResource("Sky_g3jkj")
ambient_light_source = 3
ambient_light_color = Color(0.618759, 0.713374, 0.772947, 1)
tonemap_exposure = 1.25
sdfgi_enabled = true
glow_enabled = true
adjustment_enabled = true
adjustment_brightness = 1.1
adjustment_contrast = 1.1
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mianr"]
albedo_color = Color(0.323355, 0.462817, 0.242752, 1)
@@ -344,14 +328,6 @@ _data = {
[node name="AssetChecker" type="Node3D" groups=["ui"]]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_tngkl")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.878885, -0.476463, 0.0233089, 0.386275, 0.739495, 0.551307, -0.279914, -0.475532, 0.833977, 0, 0, 0)
light_energy = 2.0
shadow_enabled = true
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.54059, -4.88213, 0)
material_override = ExtResource("3_pecld")
@@ -602,3 +578,6 @@ libraries = {
&"": SubResource("AnimationLibrary_ey8td")
}
autoplay = "Menu"
[node name="Realtime Day Night Cycle" parent="." instance=ExtResource("26_qoxo0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.9891, 1.53028, 4.26966)

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=31 format=3 uid="uid://dsnddbrlqkav2"]
[gd_scene load_steps=29 format=3 uid="uid://dsnddbrlqkav2"]
[ext_resource type="Script" uid="uid://bkii8jwf0k7tq" path="res://scripts/LevelManager.gd" id="1_laua1"]
[ext_resource type="Resource" uid="uid://dn3t7wcoumlm3" path="res://GameModes/standard.tres" id="2_2umal"]
[ext_resource type="PackedScene" uid="uid://cwy8iv8nlwqrc" path="res://assets/realtime_day_night_cycle.tscn" id="3_bpxqw"]
[ext_resource type="PackedScene" uid="uid://drwae3loscbw7" path="res://assets/player.tscn" id="4_a8lcp"]
[ext_resource type="Script" uid="uid://12l74jckdnpl" path="res://scripts/room_manager.gd" id="5_ngmqi"]
[ext_resource type="PackedScene" uid="uid://djr7vnr1hcx82" path="res://assets/spider2.tscn" id="6_qmuhr"]
@@ -21,23 +22,6 @@
[ext_resource type="PackedScene" uid="uid://db7xqf12sayj0" path="res://assets/chest_spawner.tscn" id="20_ena8c"]
[ext_resource type="PackedScene" uid="uid://dgapcuvg0gtmm" path="res://assets/scene_changer.tscn" id="20_j4ook"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w6vpl"]
sky_top_color = Color(0.623488, 0.812575, 0.900791, 1)
sky_horizon_color = Color(0.705872, 0.745394, 0.758448, 1)
ground_bottom_color = Color(0.5, 0.5, 0.5, 1)
ground_horizon_color = Color(0.705872, 0.745394, 0.758448, 1)
[sub_resource type="Sky" id="Sky_6g0ku"]
sky_material = SubResource("ProceduralSkyMaterial_w6vpl")
[sub_resource type="Environment" id="Environment_klp4b"]
background_mode = 2
sky = SubResource("Sky_6g0ku")
tonemap_mode = 2
glow_enabled = true
fog_enabled = true
fog_density = 0.0005
[sub_resource type="Animation" id="Animation_3e03q"]
length = 0.001
tracks/0/type = "position_3d"
@@ -91,24 +75,13 @@ map_name = "Wall Runnin"
gamemode = ExtResource("2_2umal")
player = NodePath("Player")
MAX_PARTICLES = 75
expected_ammo = {
"heavy": 25,
"light": 500,
"medium": 50,
"rocket": 3,
"shotgun": 20
}
[node name="Realtime Day Night Cycle" parent="." instance=ExtResource("3_bpxqw")]
transform = Transform3D(-0.582719, 0, -0.812674, 0, 1, 0, 0.812674, 0, -0.582719, 0, 0, 0)
[node name="Player" parent="." instance=ExtResource("4_a8lcp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26.4194, 277.483, -34.6215)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_klp4b")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.78152, -0.330606, 0.52908, 0, 0.848048, 0.529919, -0.62388, 0.414143, -0.662767, 0, 0, 0)
shadow_enabled = true
[node name="Level" type="Node3D" parent="." groups=["enemy_hivemind"]]
script = ExtResource("5_ngmqi")
room_lockdown = true
@@ -203,7 +176,7 @@ door_open_start = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="Level/Door"]
root_node = NodePath("../..")
libraries = {
"": SubResource("AnimationLibrary_s1qpx")
&"": SubResource("AnimationLibrary_s1qpx")
}
[node name="RoomCheck" type="Area3D" parent="Level"]

View File

@@ -1,8 +1,9 @@
[gd_scene load_steps=29 format=3 uid="uid://uo43j7bomkf3"]
[gd_scene load_steps=27 format=3 uid="uid://uo43j7bomkf3"]
[ext_resource type="Script" uid="uid://bkii8jwf0k7tq" path="res://scripts/LevelManager.gd" id="1_8o3mm"]
[ext_resource type="Resource" uid="uid://dn3t7wcoumlm3" path="res://GameModes/standard.tres" id="2_knkyv"]
[ext_resource type="PackedScene" uid="uid://drwae3loscbw7" path="res://assets/player.tscn" id="3_sn6s8"]
[ext_resource type="PackedScene" uid="uid://cwy8iv8nlwqrc" path="res://assets/realtime_day_night_cycle.tscn" id="3_uc3ig"]
[ext_resource type="Script" uid="uid://12l74jckdnpl" path="res://scripts/room_manager.gd" id="4_iqtg8"]
[ext_resource type="PackedScene" uid="uid://djr7vnr1hcx82" path="res://assets/spider2.tscn" id="5_vb31s"]
[ext_resource type="Script" uid="uid://bw1uh8yc13tjy" path="res://scripts/switch_door.gd" id="6_xph2x"]
@@ -19,23 +20,6 @@
[ext_resource type="Material" uid="uid://b6hhomp4kcjvb" path="res://assets/materials/prototype/tadaoando.tres" id="21_s6xxg"]
[ext_resource type="PackedScene" uid="uid://dgapcuvg0gtmm" path="res://assets/scene_changer.tscn" id="22_6kw07"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w6vpl"]
sky_top_color = Color(0.623488, 0.812575, 0.900791, 1)
sky_horizon_color = Color(0.705872, 0.745394, 0.758448, 1)
ground_bottom_color = Color(0.5, 0.5, 0.5, 1)
ground_horizon_color = Color(0.705872, 0.745394, 0.758448, 1)
[sub_resource type="Sky" id="Sky_6g0ku"]
sky_material = SubResource("ProceduralSkyMaterial_w6vpl")
[sub_resource type="Environment" id="Environment_klp4b"]
background_mode = 2
sky = SubResource("Sky_6g0ku")
tonemap_mode = 2
glow_enabled = true
fog_mode = 1
fog_density = 1.0
[sub_resource type="Animation" id="Animation_3e03q"]
length = 0.001
tracks/0/type = "position_3d"
@@ -89,24 +73,13 @@ map_name = "Wall Runnin"
gamemode = ExtResource("2_knkyv")
player = NodePath("Player")
MAX_PARTICLES = 75
expected_ammo = {
"heavy": 25,
"light": 500,
"medium": 50,
"rocket": 3,
"shotgun": 20
}
[node name="Realtime Day Night Cycle" parent="." instance=ExtResource("3_uc3ig")]
transform = Transform3D(0.510503, -0.00501647, 0.859861, 0.00982605, 0.999952, 3.48377e-10, -0.85982, 0.00844904, 0.510528, 0, 0, 0)
[node name="Player" parent="." instance=ExtResource("3_sn6s8")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26.4194, 277.483, -34.6215)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_klp4b")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.78152, -0.330606, 0.52908, 0, 0.848048, 0.529919, -0.62388, 0.414143, -0.662767, 0, 0, 0)
shadow_enabled = true
[node name="Level" type="Node3D" parent="." groups=["enemy_hivemind"]]
script = ExtResource("4_iqtg8")
room_lockdown = true
@@ -165,7 +138,7 @@ door_open_start = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="Level/Door"]
root_node = NodePath("../..")
libraries = {
"": SubResource("AnimationLibrary_s1qpx")
&"": SubResource("AnimationLibrary_s1qpx")
}
[node name="RoomCheck" type="Area3D" parent="Level"]

View File

@@ -20,13 +20,13 @@
[ext_resource type="PackedScene" uid="uid://do6gt53xr2l23" path="res://assets/garbage_bin.tscn" id="19_ma1ga"]
[ext_resource type="PackedScene" uid="uid://wsk4w1xmb3p4" path="res://assets/Audio/train1.tscn" id="19_vcb4t"]
[ext_resource type="Texture2D" uid="uid://ciwlwynk4jt2k" path="res://assets/Models/boxcar1.albdeo.png" id="20_qpg5a"]
[ext_resource type="Texture2D" uid="uid://cixlw3pnskjm4" path="res://assets/Models/boxcar1.rough.png" id="21_t6wsg"]
[ext_resource type="Texture2D" uid="uid://du5psl01pl58u" path="res://assets/Models/boxcar1.normal.png" id="22_v4e4d"]
[ext_resource type="Texture2D" uid="uid://cvdh3jecb65ka" path="res://assets/Models/boxcar1.rough.png" id="21_t6wsg"]
[ext_resource type="Texture2D" uid="uid://dypcs5eicgvec" path="res://assets/Models/boxcar1.normal.png" id="22_v4e4d"]
[ext_resource type="Texture2D" uid="uid://bdb2yv36ffmk8" path="res://assets/Models/boxcar1.doors.png" id="23_saeg6"]
[ext_resource type="Texture2D" uid="uid://sjohow3p4tvl" path="res://assets/Models/boxcar1.doors.rough.png" id="24_hnc6c"]
[ext_resource type="Texture2D" uid="uid://bmxhwygo4dpkf" path="res://assets/Models/boxcar1.doors.normal.png" id="25_7wb5s"]
[ext_resource type="Texture2D" uid="uid://dwh7ugcppm4k" path="res://assets/Models/boxcar1.wheel.albedo.png" id="26_2d20r"]
[ext_resource type="Texture2D" uid="uid://oeyauoofbcdf" path="res://assets/Models/boxcar1.wheel.rough.png" id="27_yuljh"]
[ext_resource type="Texture2D" uid="uid://cprosq81sf424" path="res://assets/Models/boxcar1.wheel.rough.png" id="27_yuljh"]
[ext_resource type="Texture2D" uid="uid://5i5urt5i8fjd" path="res://assets/Models/boxcar1.wheel.normal.png" id="28_tulwp"]
[ext_resource type="Texture2D" uid="uid://4lve7kqobqx2" path="res://assets/Models/boxcar1.coupler.albedo.png" id="29_1k31y"]
[ext_resource type="Texture2D" uid="uid://bxek6q1nxy1ks" path="res://assets/Models/boxcar1.coupler.normal.png" id="30_veuc5"]
@@ -44,13 +44,10 @@
[ext_resource type="PackedScene" uid="uid://dgapcuvg0gtmm" path="res://assets/scene_changer.tscn" id="43_x54pr"]
[ext_resource type="Resource" uid="uid://bxcxqt7rmfvdw" path="res://GameModes/hubworld.tres" id="44_1akso"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_nb6x7"]
sky_top_color = Color(0.500562, 0.697334, 0.809889, 1)
sky_horizon_color = Color(0.633243, 0.578258, 0.62378, 1)
ground_horizon_color = Color(0.633983, 0.579022, 0.624523, 1)
[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_e2mk2"]
[sub_resource type="Sky" id="Sky_1fe4l"]
sky_material = SubResource("ProceduralSkyMaterial_nb6x7")
sky_material = SubResource("PhysicalSkyMaterial_e2mk2")
[sub_resource type="Environment" id="Environment_q2cfn"]
background_mode = 2
@@ -1162,16 +1159,17 @@ _data = {
&"trainmove": SubResource("Animation_6nfej")
}
[node name="Test Level 2" type="Node3D" node_paths=PackedStringArray("player")]
[node name="Test Level 2" type="Node3D" node_paths=PackedStringArray("player", "time_based_sun")]
script = ExtResource("1_orhgl")
gamemode = ExtResource("2_ynfvy")
player = NodePath("Player")
time_based_sun = NodePath("DirectionalLight3D")
[node name="Player" parent="." instance=ExtResource("2_f87c2")]
transform = Transform3D(-0.866025, 0, -0.5, 0, 1, 0, 0.5, 0, -0.866025, -44.3464, 70.2562, -23.9068)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.420794, 0.292511, -0.858703, -0.23587, 0.949309, 0.207791, 0.875956, 0.115105, 0.468458, 0, 0, 0)
transform = Transform3D(-0.848049, 0.238103, 0.473415, 0, -0.893371, 0.449319, 0.52992, 0.381044, 0.757622, 0, 0, 0)
light_bake_mode = 1
shadow_enabled = true
@@ -1476,7 +1474,7 @@ transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -69.19
[node name="AnimationPlayer" type="AnimationPlayer" parent="Decorations"]
root_node = NodePath("../..")
libraries = {
"": SubResource("AnimationLibrary_1w2xf")
&"": SubResource("AnimationLibrary_1w2xf")
}
autoplay = "trainmove"