Projekt kommt rasch voran

This commit is contained in:
kevadesu 2025-05-12 19:39:03 +02:00
parent c918fdcaf0
commit fcfbc32636
6 changed files with 182 additions and 23 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://bn20cqfwvm2oe"]
[gd_scene load_steps=31 format=3 uid="uid://bn20cqfwvm2oe"]
[ext_resource type="Script" uid="uid://wr38f8q1w7yq" path="res://main.gd" id="1_fwt2i"]
[ext_resource type="PackedScene" uid="uid://bs6yq6gy7k2sb" path="res://player.tscn" id="1_lsi31"]
@ -8,7 +8,10 @@
[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="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"]
[ext_resource type="FontFile" uid="uid://dhn2iwihgai4c" path="res://InstrumentSerif-Italic.ttf" id="10_o66vw"]
[ext_resource type="FontFile" uid="uid://c0deno8y61t32" path="res://InstrumentSans-Italic-VariableFont_wdth,wght.ttf" id="12_2uy0w"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_rv2mx"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
@ -52,12 +55,33 @@ albedo_texture = ExtResource("2_gp22r")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qbfpe"]
albedo_texture = ExtResource("2_gp22r")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_n8jav"]
albedo_texture = ExtResource("6_qbfpe")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cjnpp"]
albedo_texture = ExtResource("6_qbfpe")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5l3ux"]
albedo_texture = ExtResource("2_gp22r")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7rthl"]
albedo_texture = ExtResource("5_r3eyv")
[sub_resource type="LabelSettings" id="LabelSettings_qbfpe"]
font = ExtResource("10_o66vw")
font_size = 75
font_color = Color(0.941176, 0.788235, 0.996078, 1)
outline_size = 10
outline_color = Color(0, 0, 0, 1)
shadow_size = 16
shadow_color = Color(0.180005, 0.180005, 0.180005, 0.647059)
[sub_resource type="LabelSettings" id="LabelSettings_27422"]
font = ExtResource("12_2uy0w")
font_size = 22
outline_size = 4
outline_color = Color(0, 0, 0, 1)
[node name="LevelCore" type="Node3D"]
script = ExtResource("1_fwt2i")
@ -289,9 +313,19 @@ transform = Transform3D(2, 0, 0, 0, 1, 0, 0, 0, 2, 5, 20, -5)
mesh = SubResource("PlaneMesh_rv2mx")
skeleton = NodePath("../MeshInstance3D")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D48"]
[node name="StaticBody3D_S2" type="StaticBody3D" parent="MeshInstance3D48"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D48/StaticBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D48/StaticBody3D_S2"]
shape = ExtResource("2_7sds5")
[node name="MeshInstance3D58" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 2, -10, 20, -5)
mesh = SubResource("PlaneMesh_rv2mx")
skeleton = NodePath("../MeshInstance3D")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D58"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D58/StaticBody3D"]
shape = ExtResource("2_7sds5")
[node name="MeshInstance3D6" type="MeshInstance3D" parent="."]
@ -523,6 +557,54 @@ skeleton = NodePath("../MeshInstance3D3")
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D39/StaticBody3D"]
shape = ExtResource("3_n0qnv")
[node name="MeshInstance3D56" type="MeshInstance3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -5, 25, 0)
material_override = SubResource("StandardMaterial3D_n8jav")
mesh = SubResource("PlaneMesh_rv2mx")
skeleton = NodePath("../MeshInstance3D3")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D56"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D56/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="MeshInstance3D57" type="MeshInstance3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -5, 25, -10)
material_override = SubResource("StandardMaterial3D_cjnpp")
mesh = SubResource("PlaneMesh_rv2mx")
skeleton = NodePath("../MeshInstance3D3")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D57"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D57/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="MeshInstance3D59" type="MeshInstance3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -15, 25, 0)
material_override = SubResource("StandardMaterial3D_n8jav")
mesh = SubResource("PlaneMesh_rv2mx")
skeleton = NodePath("../MeshInstance3D3")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D59"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D59/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="MeshInstance3D60" type="MeshInstance3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, -15, 25, -10)
material_override = SubResource("StandardMaterial3D_cjnpp")
mesh = SubResource("PlaneMesh_rv2mx")
skeleton = NodePath("../MeshInstance3D3")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D60"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D60/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="MeshInstance3D40" type="MeshInstance3D" parent="."]
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, 15, 15, -10)
material_override = SubResource("StandardMaterial3D_qbfpe")
@ -612,7 +694,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 jumps"
text = "Algebra and wall gliding"
font = ExtResource("2_fq2vn")
[node name="Label3D20" type="Label3D" parent="."]
@ -633,6 +715,17 @@ outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1)
text = "Wall traps"
font = ExtResource("2_fq2vn")
[node name="Label3D22" type="Label3D" parent="."]
transform = Transform3D(0.031202, 0, 0.999515, 0, 0.999999, 0, -0.999512, 0, 0.0312013, -1.36618, 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 = "Do you happen to remember the wall at the beginning of the level that
disappeared from a different perspective? Wall traps involve using the
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="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)
@ -649,6 +742,18 @@ font = ExtResource("2_fq2vn")
font_size = 64
outline_size = 24
[node name="Label3D23" type="Label3D" parent="."]
transform = Transform3D(0.0271902, -0.685056, 0.727983, 0.025569, 0.728491, 0.684579, -0.999302, 0, 0.0373241, -12.6999, 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 has a ring, but no finger?
-----
Was hat einen Ring, dafür aber keinen Finger?"
font = ExtResource("2_fq2vn")
font_size = 64
outline_size = 24
[node name="Label3D14" type="Label3D" parent="."]
transform = Transform3D(-3.87981e-08, 0.887598, -0.460619, -2.01342e-08, 0.460618, 0.8876, 0.999999, 4.37113e-08, 1.91069e-15, -19.861, 11, 10)
offset = Vector2(1, 0)
@ -879,6 +984,32 @@ outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1)
text = "To unlock/free the cursor, press Shift+Enter"
font = ExtResource("2_fq2vn")
[node name="Label_Station" type="Label" parent="."]
offset_left = 100.0
offset_top = 100.0
offset_right = 490.0
offset_bottom = 199.0
text = "DEMO-Version"
label_settings = SubResource("LabelSettings_qbfpe")
[node name="Label_Controls" type="Label" parent="."]
offset_left = 100.0
offset_top = 200.0
offset_right = 625.0
offset_bottom = 290.0
text = "esc - pause
shift+r - back to checkpoint/Zurück zum Checkpoint
f5 - restart level/Level neu starten"
label_settings = SubResource("LabelSettings_27422")
[node name="Label_Controls2" type="Label" parent="."]
offset_left = 100.0
offset_top = 300.0
offset_right = 625.0
offset_bottom = 390.0
text = "time/zeit: "
label_settings = SubResource("LabelSettings_27422")
[node name="PauseMenu" parent="." instance=ExtResource("3_i8tni")]
visible = false

View file

@ -3,25 +3,27 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bg3acux3c10o6"
path="res://.godot/imported/texture_13.png-51cb3f38ea774c85cb3ad561d20c5b53.ctex"
path.s3tc="res://.godot/imported/texture_13.png-51cb3f38ea774c85cb3ad561d20c5b53.s3tc.ctex"
path.etc2="res://.godot/imported/texture_13.png-51cb3f38ea774c85cb3ad561d20c5b53.etc2.ctex"
metadata={
"vram_texture": false
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
[deps]
source_file="res://addons/kenney_prototype_textures/dark/texture_13.png"
dest_files=["res://.godot/imported/texture_13.png-51cb3f38ea774c85cb3ad561d20c5b53.ctex"]
dest_files=["res://.godot/imported/texture_13.png-51cb3f38ea774c85cb3ad561d20c5b53.s3tc.ctex", "res://.godot/imported/texture_13.png-51cb3f38ea774c85cb3ad561d20c5b53.etc2.ctex"]
[params]
compress/mode=0
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@ -31,4 +33,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
detect_3d/compress_to=0

View file

@ -51,7 +51,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Downloads/ProjektLuzid.exe"
export_path="Exports/Windows/ProjektLuzid.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
@ -65,7 +65,7 @@ script_export_mode=2
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
@ -77,7 +77,7 @@ codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon="uid://0hcyy1njk5tu"
application/console_wrapper_icon=""
application/console_wrapper_icon="uid://fad7xr2jj2nu"
application/icon_interpolation=4
application/file_version=""
application/product_version=""

20
main.gd
View file

@ -3,16 +3,18 @@ extends Node3D
var paused = false
#var showpaused = false
var checkpoint = "checkpoint0"
var checkpoint0 = Vector3(0, 2, 1.374)
var checkpoint1 = Vector3(-27.5, 13, 12.5)
var checkpoint2 = Vector3(0, 22, 1.374)
var checkpoint = checkpoint0
@onready var checkpointtext = $Label_Station
var time_accum = 0.0 # Timer accumulator
@onready var player = get_node("Player")
var elapsed_time := 0.0
func _ready() -> void:
var player = get_node("Player")
$Label_Station.text = "station 0"
# while true:
# wait(5)
# print(player.checkpoint)
@ -30,11 +32,23 @@ func wait(seconds: float) -> void:
await get_tree().create_timer(seconds).timeout
func _process(delta: float):
elapsed_time += delta
if Input.is_action_just_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
pauseMenu()
elif Input.is_action_just_pressed("proluz_ui_respawn"):
player.teleport_to_checkpoint
var player = get_node("Player")
player.teleport_to_checkpoint()
elif Input.is_action_just_pressed("proluz_ui_reset"):
get_tree().reload_current_scene()
$Label_Controls2.text = get_formatted_time()
func get_formatted_time() -> String:
var total_milliseconds = int(elapsed_time * 1000)
var minutes = total_milliseconds / 60000
var seconds = (total_milliseconds % 60000) / 1000
var milliseconds = total_milliseconds % 1000
return "time: %02d:%02d.%03d" % [minutes, seconds, milliseconds]
func pauseMenu():
if paused:

View file

@ -24,23 +24,30 @@ func _ready() -> void:
var touched = false
func teleport_to_checkpoint():
if levelcore.has_variable(checkpoint):
levelcore = get_node("/root/LevelCore")
var target_position = levelcore.checkpoint
global_transform.origin = target_position
print("teleport to ", target_position, " successful")
else:
print("checkpoint ", checkpoint, " does not exist")
# IM STUCK ON THIS
func _integrate_forces(state):
# while not get_node_or_null("/Level_Core/LevelCore"):
# await get_tree().process_frame
# levelcore = get_node("/Level_Core/LevelCore")
# print("levelcore set!")
for i in range(state.get_contact_count()):
var collider = state.get_contact_collider_object(i)
if collider is StaticBody3D and collider.name == "StaticBody3D_S1":
#checkpoint = levelcore.checkpoint1
print("chat we hit the checkpoint one")
levelcore = get_node("/root/LevelCore")
levelcore.checkpoint = levelcore.checkpoint1
levelcore.checkpointtext.text = "station 1"
elif collider is StaticBody3D and collider.name == "StaticBody3D_S2":
print("chat we hit the checkpoint one")
levelcore = get_node("/root/LevelCore")
levelcore.checkpoint = levelcore.checkpoint2
levelcore.checkpointtext.text = "station 2"
#func _integrate_forces(state):
# for i in range(state.get_contact_count()):

View file

@ -69,6 +69,11 @@ proluz_ui_respawn={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
proluz_ui_reset={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194336,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[rendering]