DreamBall/levels/forest/level.tscn
Taevas 709ce8eea3
split gravity logic, various bug fixes
fixed gravity strength being possibly strong at level beginning
fixed restarting being allowed after getting the last ring
fixed save file's "played_for" being reset or set to another file's
fixed the displayed save file total play time not being updated on main menu

maybe there's other stuff
2025-04-29 21:18:04 +02:00

283 lines
14 KiB
Text

[gd_scene load_steps=10 format=3 uid="uid://e1761h6d522a"]
[ext_resource type="PackedScene" uid="uid://cnnvwotv33u1b" path="res://elements/player.tscn" id="2_mjogx"]
[ext_resource type="PackedScene" uid="uid://cakmsiye3hjfe" path="res://levels/forest/music.tscn" id="3_n1xsx"]
[ext_resource type="PackedScene" uid="uid://cpm3laywhlbq5" path="res://elements/ring.tscn" id="4_p8yhq"]
[ext_resource type="PackedScene" uid="uid://da6lkdiskdh8v" path="res://elements/tree.tscn" id="6_1e514"]
[ext_resource type="PackedScene" uid="uid://c77bli40240nk" path="res://elements/sign.tscn" id="6_ifogr"]
[sub_resource type="GDScript" id="GDScript_mqwxc"]
script/source = "extends Level
var cycle := 0
func _init() -> void:
self.id = \"forest\"
self.thumbnail = load(\"res://levels/forest/thumbnail.png\")
func _process(_delta: float) -> void:
var moving_ring: Ring = $Rings/Ring18
if !moving_ring.collected:
if moving_ring.position.y < 55 or moving_ring.position.y > 65:
cycle += 1
moving_ring.position.y += 0.5 if cycle % 2 else -0.5
func _on_player_velocity_change(new_velocity: float) -> void:
self.velocity = new_velocity
self.music.adaptInstrumentsToVelocity(new_velocity)
"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_grcut"]
sky_top_color = Color(0, 0.504542, 0.579919, 1)
sky_horizon_color = Color(9.62615e-08, 0.776269, 0.496436, 1)
sky_curve = 0.219613
ground_bottom_color = Color(0.078119, 0.275869, 4.81308e-08, 1)
ground_horizon_color = Color(0.300489, 0.406247, 0.0024617, 1)
sun_angle_max = 224.83
sun_curve = 0.212132
[sub_resource type="Sky" id="Sky_gxmta"]
sky_material = SubResource("ProceduralSkyMaterial_grcut")
[sub_resource type="Environment" id="Environment_y3whn"]
background_mode = 2
sky = SubResource("Sky_gxmta")
sky_rotation = Vector3(0.0872665, 0.698132, 0.0872665)
ambient_light_source = 3
ambient_light_color = Color(1, 1, 1, 1)
reflected_light_source = 2
[node name="Forest" type="Node3D"]
script = SubResource("GDScript_mqwxc")
metadata/_custom_type_script = "uid://w3fetao1pegm"
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.920505, 0.195366, -0.338383, 0, 0.866025, 0.5, 0.390731, 0.460252, -0.797181, 0, 0, 0)
shadow_enabled = true
directional_shadow_mode = 0
[node name="Environment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_y3whn")
[node name="Music" parent="." instance=ExtResource("3_n1xsx")]
[node name="Player" parent="." instance=ExtResource("2_mjogx")]
[node name="Sign" parent="." instance=ExtResource("6_ifogr")]
transform = Transform3D(-4.37114e-08, 8.74228e-08, 1, 0, -1, 8.74228e-08, 1, 3.82137e-15, 4.37114e-08, -450, 132.977, 0)
[node name="Text" parent="Sign" index="0"]
transform = Transform3D(-35, 5.28485e-06, 0, -5.28485e-06, -35, 0, 0, 0, 35, 0, 0, 0)
text = "Watch out!"
[node name="Trees" type="Node3D" parent="."]
[node name="Tree" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(50, 0, 0, 0, 50, 0, 0, 0, 50, -166.536, -11.8384, -469.041)
[node name="Tree2" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(50, 0, 0, 0, 50, 0, 0, 0, 50, 151.043, 21.0645, -469.041)
[node name="Tree3" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(49.9919, 0, 0.897924, 0, 50, 0, -0.897924, 0, 49.9919, -6.724, 21.0645, -304.466)
[node name="Tree5" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(21.5838, 0, -45.1014, 0, 50, 0, 45.1014, 0, 21.5838, -559.128, -11.8384, -617.545)
[node name="Tree6" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(21.5838, 0, -45.1014, 0, 50, 0, 45.1014, 0, 21.5838, -422.037, 21.0645, -331.08)
[node name="Tree7" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(22.3903, 0, -44.7065, 0, 50, 0, 44.7065, 0, 22.3903, -638.593, 21.0645, -402.347)
[node name="Tree8" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(21.5838, 0, -45.1014, 0, 50, 0, 45.1014, 0, 21.5838, -177.653, -11.8384, -1054.18)
[node name="Tree9" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(21.5838, 0, -45.1014, 0, 50, 0, 45.1014, 0, 21.5838, -40.5612, 21.0645, -767.719)
[node name="Tree10" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(22.3903, 0, -44.7065, 0, 50, 0, 44.7065, 0, 22.3903, -257.117, 21.0645, -838.986)
[node name="Tree4" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(99.9839, 0, 1.79585, 0, 100, 0, -1.79585, 0, 99.9839, -1364.86, -175.335, 0)
[node name="Tree11" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-43.5607, 0, -24.5452, 0, 50, 0, 24.5452, 0, -43.5607, -1217.19, -162.236, -899.854)
[node name="Tree12" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-43.5607, 0, -24.5452, 0, 50, 0, 24.5452, 0, -43.5607, -1493.87, -129.333, -743.953)
[node name="Tree13" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-43.1129, 0, -25.3235, 0, 50, 0, 25.3235, 0, -43.1129, -1437.22, -129.333, -964.782)
[node name="Tree21" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(43.702, -3.82055e-06, 24.2928, -4.37114e-06, -50, 0, 24.2928, -2.12374e-06, -43.702, -720.948, -151.717, -868.914)
[node name="Tree22" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(43.702, -3.82055e-06, 24.2928, -4.37114e-06, -50, 0, 24.2928, -2.12374e-06, -43.702, -442.614, -138.897, -713.013)
[node name="Tree23" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(43.2617, -3.78206e-06, 25.0684, -4.37114e-06, -50, 0, 25.0684, -2.19155e-06, -43.2617, -498.508, -148.169, -933.842)
[node name="Tree14" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-40.9446, 0, 28.6974, 0, 50, 0, -28.6974, 0, -40.9446, -802.261, -162.236, -963.2)
[node name="Tree15" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-40.9446, 0, 28.6974, 0, 50, 0, -28.6974, 0, -40.9446, -1062.32, -129.333, -1145.47)
[node name="Tree16" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-41.4533, 0, 27.9575, 0, 50, 0, -27.9575, 0, -41.4533, -838.672, -129.333, -1189.69)
[node name="Tree17" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-40.9446, 0, 28.6974, 0, 50, 0, -28.6974, 0, -40.9446, -920.26, -162.236, -395.526)
[node name="Tree18" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-40.9446, 0, 28.6974, 0, 50, 0, -28.6974, 0, -40.9446, -1180.32, -129.333, -577.8)
[node name="Tree19" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-41.4533, 0, 27.9575, 0, 50, 0, -27.9575, 0, -41.4533, -956.672, -129.333, -622.019)
[node name="Tree20" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-86.2257, 0, -50.647, 0, 100, 0, 50.647, 0, -86.2257, -403.452, -325.733, -1896.75)
[node name="Tree24" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-49.3043, 0, -8.31176, 0, 50, 0, 8.31176, 0, -49.3043, -872.494, -329.892, 280.439)
[node name="Tree25" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-49.3043, 0, -8.31176, 0, 50, 0, 8.31176, 0, -49.3043, -1185.65, -296.989, 333.231)
[node name="Tree26" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-49.1471, 0, -9.19585, 0, 50, 0, 9.19585, 0, -49.1471, -1057.44, -296.989, 144.719)
[node name="Tree27" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-28.781, 0, 40.8859, 0, 50, 0, -40.8859, 0, -28.781, -460.677, -329.892, 361.614)
[node name="Tree28" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-28.781, 0, 40.8859, 0, 50, 0, -40.8859, 0, -28.781, -643.482, -296.989, 139.279)
[node name="Tree29" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-29.5106, 0, 40.3624, 0, 50, 0, -40.3624, 0, -29.5106, -418.092, -296.989, 136.2)
[node name="Tree33" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(-99.9329, 0, 3.66263, 0, 100, 0, -3.66263, 0, -99.9329, 400.625, -493.389, -47.2644)
[node name="Tree35" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(38.8743, 0, 31.445, 0, 50, 0, -31.445, 0, 38.8743, 482.075, -447.386, 330.875)
[node name="Tree43" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(45.1454, 0, -21.4917, 0, 50, 0, 21.4917, 0, 45.1454, -141.477, -480.289, 82.6511)
[node name="Tree44" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(45.1454, 0, -21.4917, 0, 50, 0, 21.4917, 0, 45.1454, 145.268, -447.386, 219.157)
[node name="Tree45" parent="Trees" instance=ExtResource("6_1e514")]
transform = Transform3D(45.5241, 0, -20.6775, 0, 50, 0, 20.6775, 0, 45.5241, -67.9216, -447.386, 299.94)
[node name="Rings" type="Node3D" parent="."]
[node name="Ring" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, -2, 0)
[node name="Ring2" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -3, 0)
[node name="Ring11" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 64.625, 0)
[node name="Ring26" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(20, 0, 0, 0, 20, 0, 0, 0, 20, -220.266, 264.294, 0)
[node name="Ring3" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 5, -8, 0)
[node name="Ring4" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 4, -8, 0)
[node name="Ring5" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 20, -4, 0)
[node name="Ring6" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 19, -4, 0)
[node name="Ring7" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 39.2269, -8, 0)
[node name="Ring8" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 38.2269, -8, 0)
[node name="Ring9" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-1.31134e-08, -0.3, 0, 0.3, -1.31134e-08, 0, 0, 0, 0.3, 54.2269, -4, 0)
[node name="Ring10" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 53.227, -4, 0)
[node name="Ring12" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 78, 10, 0)
[node name="Ring14" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 42.708, 48.7486, 0)
[node name="Ring13" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 64.1634, 30.568, 0)
[node name="Ring15" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, 9.73236, 65.3451, 0)
[node name="Ring16" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0, 0.5, -23.606, 88.7308, 0)
[node name="Ring17" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-8.74228e-08, -2, 0, 2, -8.74228e-08, 0, 0, 0, 2, -104.638, 112.884, 0)
[node name="Ring18" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-8.74228e-08, -2, 0, 2, -8.74228e-08, 0, 0, 0, 2, -452.906, 58.8928, 0)
[node name="Ring19" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-8.74228e-08, -2, 0, 2, -8.74228e-08, 0, 0, 0, 2, -742.534, 126.395, 0)
[node name="Ring20" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -1018.15, -27.6358, 0)
[node name="Ring21" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -1018.15, -66.5463, 0)
[node name="Ring22" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, -1018.15, -85.7121, 0)
[node name="Ring24" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-0.51303, -1.40954, 0, 1.40954, -0.51303, 0, 0, 0, 1.5, -1001.17, -87.6138, 0)
[node name="Ring25" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-3.0598e-08, -0.7, 0, 0.7, -3.0598e-08, 0, 0, 0, 0.7, -966.1, -87.6138, 0)
[node name="Ring27" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -881.143, -72.4025, 0)
[node name="Ring28" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -793.893, -58.0851, 0)
[node name="Ring29" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -706.288, -35.6603, 0)
[node name="Ring30" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -619.038, -21.3428, 0)
[node name="Ring31" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-5.24537e-08, -1.2, 0, 1.2, -5.24537e-08, 0, 0, 0, 1.2, -510.173, 3.82137, 0)
[node name="Ring32" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(-0.563606, -1.05941, 0, 1.05941, -0.563606, 0, 0, 0, 1.2, -416.969, 37.1114, 0)
[node name="Ring33" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(1.25802, 0.327712, 0, -0.327712, 1.25802, 0, 0, 0, 1.3, -289.057, 121.083, 0)
[node name="Ring34" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -218.208, 206.247, 0)
[node name="Ring23" parent="Rings" instance=ExtResource("4_p8yhq")]
transform = Transform3D(0.939693, 0.34202, 0, -0.34202, 0.939693, 0, 0, 0, 1, -1018.15, -96.9134, 0)
[connection signal="velocity_change" from="Player" to="." method="_on_player_velocity_change"]
[editable path="Sign"]