From ef8d45cce21d4ebb45ec119e33fdd92072f7207f Mon Sep 17 00:00:00 2001 From: kevadesu Date: Sun, 18 May 2025 17:58:59 +0200 Subject: [PATCH] At last... --- Level_Core.tscn | 181 +++++++++++++++++++++++++++++++++++++++++++++--- checkpoint.tres | 5 ++ main.gd | 1 + pause_menu.tscn | 2 +- player.gd | 8 ++- 5 files changed, 186 insertions(+), 11 deletions(-) create mode 100644 checkpoint.tres diff --git a/Level_Core.tscn b/Level_Core.tscn index c02e761..ae76395 100644 --- a/Level_Core.tscn +++ b/Level_Core.tscn @@ -7,6 +7,7 @@ [ext_resource type="Texture2D" uid="uid://dyl3l77lgdjfe" path="res://addons/kenney_prototype_textures/purple/texture_01.png" id="2_gp22r"] [ext_resource type="PackedScene" uid="uid://daoyebc0vm7sd" path="res://pause_menu.tscn" id="3_i8tni"] [ext_resource type="Shape3D" uid="uid://ck3ryefc358gp" path="res://wall_ncwt.tres" id="3_n0qnv"] +[ext_resource type="Material" uid="uid://ca7djd5dag6ny" path="res://checkpoint.tres" id="5_27422"] [ext_resource type="Texture2D" uid="uid://d15530ei26qvv" path="res://addons/kenney_prototype_textures/purple/texture_02.png" id="5_r3eyv"] [ext_resource type="Texture2D" uid="uid://bg3acux3c10o6" path="res://addons/kenney_prototype_textures/dark/texture_13.png" id="6_qbfpe"] [ext_resource type="FontFile" uid="uid://bulwhh7xjiip0" path="res://InstrumentSerif-Regular.ttf" id="8_o5bhp"] @@ -33,10 +34,6 @@ albedo_texture = ExtResource("2_gp22r") [sub_resource type="PlaneMesh" id="PlaneMesh_rv2mx"] size = Vector2(10, 10) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_33ny2"] -transparency = 1 -albedo_color = Color(0.618889, 0.459095, 1, 1) - [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_o66vw"] albedo_texture = ExtResource("5_r3eyv") @@ -135,7 +132,7 @@ shape = ExtResource("3_n0qnv") transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.5, -27.5, 10, 12.5) mesh = SubResource("PlaneMesh_rv2mx") skeleton = NodePath("../MeshInstance3D") -surface_material_override/0 = SubResource("StandardMaterial3D_33ny2") +surface_material_override/0 = ExtResource("5_27422") [node name="StaticBody3D_S1" type="StaticBody3D" parent="MeshInstance3D14"] @@ -156,7 +153,7 @@ shape = ExtResource("3_n0qnv") transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.5, -27.5, 10, 7.5) mesh = SubResource("PlaneMesh_rv2mx") skeleton = NodePath("../MeshInstance3D") -surface_material_override/0 = SubResource("StandardMaterial3D_33ny2") +surface_material_override/0 = ExtResource("5_27422") [node name="StaticBody3D_S1" type="StaticBody3D" parent="MeshInstance3D24"] @@ -167,7 +164,7 @@ shape = ExtResource("3_n0qnv") transform = Transform3D(-3.49691e-08, -1, -1.31134e-08, 0, -4.37114e-08, 0.3, -0.8, 4.37114e-08, 5.73206e-16, -30.8179, 12, 10.0294) mesh = SubResource("PlaneMesh_rv2mx") skeleton = NodePath("../MeshInstance3D") -surface_material_override/0 = SubResource("StandardMaterial3D_33ny2") +surface_material_override/0 = ExtResource("5_27422") [node name="MeshInstance3D26" type="MeshInstance3D" parent="."] transform = Transform3D(1, 0, 0, 0, 0.707107, 0.353553, 0, -0.707107, 0.353553, -12.5, 10, 12.5) @@ -318,6 +315,7 @@ shape = ExtResource("3_n0qnv") transform = Transform3D(2, 0, 0, 0, 1, 0, 0, 0, 2, 5, 20, -5) mesh = SubResource("PlaneMesh_rv2mx") skeleton = NodePath("../MeshInstance3D") +surface_material_override/0 = ExtResource("5_27422") [node name="StaticBody3D_S2" type="StaticBody3D" parent="MeshInstance3D48"] @@ -375,6 +373,14 @@ skeleton = NodePath("../MeshInstance3D") [node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D64/StaticBody3D"] shape = ExtResource("2_7sds5") +[node name="CollisionShape3D2" type="CollisionShape3D" parent="MeshInstance3D64/StaticBody3D"] +transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, -5, 5, 0) +shape = ExtResource("3_n0qnv") + +[node name="CollisionShape3D3" type="CollisionShape3D" parent="MeshInstance3D64/StaticBody3D"] +transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, -25, 15, 0) +shape = ExtResource("3_n0qnv") + [node name="MeshInstance3D63" type="MeshInstance3D" parent="."] transform = Transform3D(-1, -8.74228e-08, -3.82137e-15, 0, -4.37114e-08, 1, -8.74228e-08, 1, 4.37114e-08, -20, 25, -15) mesh = SubResource("PlaneMesh_rv2mx") @@ -751,7 +757,7 @@ transform = Transform3D(-0.556745, 0, -0.830685, 0, 0.999999, 0, 0.830682, 0, -0 offset = Vector2(1, 0) modulate = Color(0.943031, 0.787658, 0.994854, 1) outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) -text = "Algebra and wall gliding" +text = "maths and wall gliding" font = ExtResource("2_fq2vn") [node name="Label3D20" type="Label3D" parent="."] @@ -769,7 +775,25 @@ transform = Transform3D(0.031202, 0, 0.999515, 0, 0.999999, 0, -0.999512, 0, 0.0 offset = Vector2(1, 0) modulate = Color(0.943031, 0.787658, 0.994854, 1) outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) -text = "Wall traps" +text = "wall traps" +font = ExtResource("2_fq2vn") + +[node name="Label3D29" type="Label3D" parent="."] +transform = Transform3D(0.0291966, 0.352723, 0.935274, -0.0110057, 0.935727, -0.352553, -0.999512, 0, 0.0312013, -55.0713, 24.2644, -5.57596) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "station 2" +font = ExtResource("8_o5bhp") +font_size = 512 +outline_size = 127 + +[node name="Label3D30" type="Label3D" parent="."] +transform = Transform3D(0.0291966, 0.352723, 0.935274, -0.0110057, 0.935727, -0.352553, -0.999512, 0, 0.0312013, -55.5911, 22.8852, -5.57596) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "combination" font = ExtResource("2_fq2vn") [node name="Label3D22" type="Label3D" parent="."] @@ -783,6 +807,15 @@ similar mechanics as those walls, so you'll have to try answering the questions correctly by passing through the right wall" font = ExtResource("2_fq2vn") +[node name="Label3D31" type="Label3D" parent="."] +transform = Transform3D(0.031202, 0, 0.999515, 0, 0.999999, 0, -0.999512, 0, 0.0312013, -54.6138, 21.1992, -5.57596) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "The tutorial is basically over, so try to complete +this station with everything you've learnt so far!" +font = ExtResource("2_fq2vn") + [node name="Label3D13" type="Label3D" parent="."] transform = Transform3D(-4.37113e-08, 0, -1, 0, 1, 0, 0.999999, 0, -4.37115e-08, -31.08, 12, 10) offset = Vector2(1, 0) @@ -979,6 +1012,136 @@ font = ExtResource("2_fq2vn") font_size = 128 outline_size = 48 +[node name="MeshInstance3D66" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 2, -30, 20, -5) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D66"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D66/StaticBody3D"] +shape = ExtResource("2_7sds5") + +[node name="MeshInstance3D74" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 2, -50, 20, -5) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") +surface_material_override/0 = ExtResource("5_27422") + +[node name="StaticBody3D_S3" type="StaticBody3D" parent="MeshInstance3D74"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D74/StaticBody3D_S3"] +shape = ExtResource("2_7sds5") + +[node name="MeshInstance3D67" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -40, 20, -10) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D67"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D67/StaticBody3D"] +shape = ExtResource("2_7sds5") +disabled = true + +[node name="MeshInstance3D68" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -40, 20, 0) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D68"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D68/StaticBody3D"] +shape = ExtResource("2_7sds5") + +[node name="MeshInstance3D69" type="MeshInstance3D" parent="."] +transform = Transform3D(-1, 8.74228e-08, 3.82137e-15, 0, -4.37114e-08, 1, 8.74228e-08, 1, 4.37114e-08, -40, 25, -5) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D69"] +transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -40, 0, 0) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D69/StaticBody3D"] +transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -40, 0, 0) +shape = ExtResource("3_n0qnv") + +[node name="MeshInstance3D70" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -40, 25, 5) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D70"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D70/StaticBody3D"] +shape = ExtResource("2_7sds5") + +[node name="MeshInstance3D71" type="MeshInstance3D" parent="."] +transform = Transform3D(-1, -8.74228e-08, -3.82137e-15, 0, -4.37114e-08, 1, -8.74228e-08, 1, 4.37114e-08, -40, 25, -15) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D71"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D71/StaticBody3D"] +shape = ExtResource("2_7sds5") + +[node name="MeshInstance3D72" type="MeshInstance3D" parent="."] +transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -35, 25, 0) +material_override = SubResource("StandardMaterial3D_n8jav") +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D3") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D72"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D72/StaticBody3D"] +transform = Transform3D(-1, 8.74228e-08, -9.95507e-10, -8.74228e-08, -1, 8.74114e-08, -9.95499e-10, 8.74114e-08, 1, 0, 0.114, 0) +shape = ExtResource("2_7sds5") + +[node name="MeshInstance3D73" type="MeshInstance3D" parent="."] +transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -35, 25, -10) +material_override = SubResource("StandardMaterial3D_cjnpp") +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D3") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D73"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D73/StaticBody3D"] +transform = Transform3D(-1, 8.74228e-08, -9.95507e-10, -8.74228e-08, -1, 8.74114e-08, -9.95499e-10, 8.74114e-08, 1, 0, 0, 0) +shape = ExtResource("2_7sds5") + +[node name="Label3D26" type="Label3D" parent="."] +transform = Transform3D(0.0271902, -0.685056, 0.727983, 0.025569, 0.728491, 0.684579, -0.999302, 0, 0.0373241, -32.6862, 21.0691, -5.50222) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "What comes once in a minute, twice in a moment, but never in a thousand years? +----- +Was kommt einmal in einer Minute, zweimal in einem Moment aber nie in tausend Jahren?" +font = ExtResource("2_fq2vn") +font_size = 64 +outline_size = 24 + +[node name="Label3D27" type="Label3D" parent="."] +transform = Transform3D(-4.37113e-08, 0, 1, 0, 1, 0, -0.999999, 0, -4.37114e-08, -34.9428, 25.0789, -0.0186324) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "M" +font = ExtResource("2_fq2vn") +font_size = 128 +outline_size = 48 + +[node name="Label3D28" type="Label3D" parent="."] +transform = Transform3D(-4.37113e-08, 0, 1, 0, 1, 0, -0.999999, 0, -4.37114e-08, -34.9428, 25.11, -10.0375) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "E" +font = ExtResource("2_fq2vn") +font_size = 128 +outline_size = 48 + [node name="Label3D10" type="Label3D" parent="."] transform = Transform3D(-0.111676, -0.112887, 0.987312, 0.0138923, 0.993252, 0.115138, -0.993647, 0.0265751, -0.109355, 5.67565, 2.01538, -0.103783) offset = Vector2(1, 0) diff --git a/checkpoint.tres b/checkpoint.tres new file mode 100644 index 0000000..862a977 --- /dev/null +++ b/checkpoint.tres @@ -0,0 +1,5 @@ +[gd_resource type="StandardMaterial3D" format=3 uid="uid://ca7djd5dag6ny"] + +[resource] +transparency = 1 +albedo_color = Color(0.618889, 0.459095, 1, 1) diff --git a/main.gd b/main.gd index 4cc8791..65590c2 100644 --- a/main.gd +++ b/main.gd @@ -6,6 +6,7 @@ var paused = false var checkpoint0 = Vector3(0, 2, 1.374) var checkpoint1 = Vector3(-27.5, 13, 12.5) var checkpoint2 = Vector3(0, 22, 1.374) +var checkpoint3 = Vector3(-50, 25, -5) var checkpoint = checkpoint0 @onready var checkpointtext = $Label_Station var time_accum = 0.0 # Timer accumulator diff --git a/pause_menu.tscn b/pause_menu.tscn index fa52741..eea5013 100644 --- a/pause_menu.tscn +++ b/pause_menu.tscn @@ -92,6 +92,6 @@ label_settings = SubResource("LabelSettings_d3xb4") horizontal_alignment = 1 vertical_alignment = 1 -[connection signal="pressed" from="MarginContainer/VBoxContainer/ResumeButton" to="." method="_on_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/ResumeButton" to="." method="_on_resume_button_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/ResumeButton" to="." method="_on_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/ExitButton" to="." method="_on_exit_button_pressed"] diff --git a/player.gd b/player.gd index 1d373eb..65cae47 100644 --- a/player.gd +++ b/player.gd @@ -49,6 +49,11 @@ func _integrate_forces(state): levelcore = get_node("/root/LevelCore") levelcore.checkpoint = levelcore.checkpoint2 levelcore.checkpointtext.text = "station 2" + elif collider is StaticBody3D and collider.name == "StaticBody3D_S3": + print("chat we hit the checkpoint three") + levelcore = get_node("/root/LevelCore") + levelcore.checkpoint = levelcore.checkpoint3 + levelcore.checkpointtext.text = "station 3" #func _integrate_forces(state): @@ -75,7 +80,8 @@ func _process(delta: float) -> void: input.z = Input.get_axis("move_forward", "move_back") # apply_central_force(twist_pivot.basis * input * 3000.0 * delta) - apply_central_force(twist_pivot.basis * input * 6000.0 * delta) +# apply_central_force(twist_pivot.basis * input * 6000.0 * delta) + apply_central_force(twist_pivot.basis * input * 4500.0 * delta) if Input.is_action_just_pressed("proluz_ui_pause"): Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)