From c3c846fb2258d2b5511005d64ae9a36bbfae5153 Mon Sep 17 00:00:00 2001 From: douwe Date: Thu, 28 Aug 2025 18:11:29 +0200 Subject: [PATCH] Setting up project to build the different systems. --- scenes/{ => coding}/code_runner.gd | 0 scenes/{ => coding}/code_runner.gd.uid | 0 scenes/coding/code_runner.tscn | 87 +++++++++++ .../coding/memory_entry.tscn | 0 scenes/entities/Robots.tscn | 55 +++++++ scenes/main.tscn | 143 ------------------ .../word/BlockLibrary.tres | 2 +- .../word/BlockMaterial.tres | 2 +- .../word/blocky_game_atlas.webp | Bin .../word/blocky_game_atlas.webp.import | 6 +- scenes/word/voxel_world.tscn | 47 ++++++ 11 files changed, 194 insertions(+), 148 deletions(-) rename scenes/{ => coding}/code_runner.gd (100%) rename scenes/{ => coding}/code_runner.gd.uid (100%) create mode 100644 scenes/coding/code_runner.tscn rename memory_entry.tscn => scenes/coding/memory_entry.tscn (100%) create mode 100644 scenes/entities/Robots.tscn delete mode 100644 scenes/main.tscn rename BlockLibrary.tres => scenes/word/BlockLibrary.tres (92%) rename BlockMaterial.tres => scenes/word/BlockMaterial.tres (80%) rename blocky_game_atlas.webp => scenes/word/blocky_game_atlas.webp (100%) rename blocky_game_atlas.webp.import => scenes/word/blocky_game_atlas.webp.import (69%) create mode 100644 scenes/word/voxel_world.tscn diff --git a/scenes/code_runner.gd b/scenes/coding/code_runner.gd similarity index 100% rename from scenes/code_runner.gd rename to scenes/coding/code_runner.gd diff --git a/scenes/code_runner.gd.uid b/scenes/coding/code_runner.gd.uid similarity index 100% rename from scenes/code_runner.gd.uid rename to scenes/coding/code_runner.gd.uid diff --git a/scenes/coding/code_runner.tscn b/scenes/coding/code_runner.tscn new file mode 100644 index 0000000..4671074 --- /dev/null +++ b/scenes/coding/code_runner.tscn @@ -0,0 +1,87 @@ +[gd_scene load_steps=2 format=3 uid="uid://7q00x01xdsal"] + +[ext_resource type="Script" uid="uid://brnfd6h7eh0n7" path="res://scenes/coding/code_runner.gd" id="1_mphwn"] + +[node name="CodeRunner" type="Node"] +script = ExtResource("1_mphwn") + +[node name="Timer" type="Timer" parent="."] + +[node name="ProgrammerUI" type="PanelContainer" parent="."] +anchors_preset = 9 +anchor_bottom = 1.0 +offset_right = 314.0 +grow_vertical = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="ProgrammerUI"] +layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="Label" type="Label" parent="ProgrammerUI/VBoxContainer"] +layout_mode = 2 +text = "Programming" +horizontal_alignment = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="ProgrammerUI/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="ProgrammerUI/VBoxContainer/HBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="ProgrammerUI/VBoxContainer/HBoxContainer/VBoxContainer"] +layout_mode = 2 +text = " Source Code " + +[node name="Code" type="CodeEdit" parent="ProgrammerUI/VBoxContainer/HBoxContainer/VBoxContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_vertical = 3 +text = "Set 1 /2 +Cpy /2 /3 +Add /2 /3 /3 + +" +placeholder_text = "Code here" +symbol_tooltip_on_hover = true +line_length_guidelines = Array[int]([5, 7, 9, 11]) +gutters_draw_executing_lines = true +gutters_draw_line_numbers = true +gutters_zero_pad_line_numbers = true + +[node name="Memory" type="VBoxContainer" parent="ProgrammerUI/VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 + +[node name="HBoxContainer2" type="HBoxContainer" parent="ProgrammerUI/VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 10 +alignment = 1 + +[node name="compileButton" type="Button" parent="ProgrammerUI/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = "[C]" + +[node name="StopButton" type="Button" parent="ProgrammerUI/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = "[ ]" + +[node name="PlayButton" type="Button" parent="ProgrammerUI/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = ">" + +[node name="PauseButton" type="Button" parent="ProgrammerUI/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = "||" + +[node name="StepButton" type="Button" parent="ProgrammerUI/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +text = ">|" + +[connection signal="timeout" from="Timer" to="." method="_tick"] +[connection signal="pressed" from="ProgrammerUI/VBoxContainer/HBoxContainer2/compileButton" to="." method="_on_compile_button_pressed"] +[connection signal="pressed" from="ProgrammerUI/VBoxContainer/HBoxContainer2/StopButton" to="." method="_on_stop_button_pressed"] +[connection signal="pressed" from="ProgrammerUI/VBoxContainer/HBoxContainer2/PlayButton" to="." method="_on_play_button_pressed"] +[connection signal="pressed" from="ProgrammerUI/VBoxContainer/HBoxContainer2/PauseButton" to="." method="_on_pause_button_pressed"] +[connection signal="pressed" from="ProgrammerUI/VBoxContainer/HBoxContainer2/StepButton" to="." method="_on_step_button_pressed"] diff --git a/memory_entry.tscn b/scenes/coding/memory_entry.tscn similarity index 100% rename from memory_entry.tscn rename to scenes/coding/memory_entry.tscn diff --git a/scenes/entities/Robots.tscn b/scenes/entities/Robots.tscn new file mode 100644 index 0000000..0a124d5 --- /dev/null +++ b/scenes/entities/Robots.tscn @@ -0,0 +1,55 @@ +[gd_scene load_steps=10 format=3 uid="uid://b84ihb5xw37pm"] + +[ext_resource type="VoxelBlockyLibrary" uid="uid://bsue4rd3wdfsl" path="res://scenes/word/BlockLibrary.tres" id="1_r886l"] +[ext_resource type="Material" uid="uid://de6s8en5fcyyw" path="res://scenes/word/BlockMaterial.tres" id="2_nnl6p"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_e1sxe"] +sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) +ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) + +[sub_resource type="Sky" id="Sky_0wfyh"] +sky_material = SubResource("ProceduralSkyMaterial_e1sxe") + +[sub_resource type="Environment" id="Environment_5yot8"] +background_mode = 2 +sky = SubResource("Sky_0wfyh") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_o5qli"] +albedo_color = Color(0.313808, 0.455394, 0.721014, 1) + +[sub_resource type="BoxMesh" id="BoxMesh_oo1c2"] +material = SubResource("StandardMaterial3D_o5qli") + +[sub_resource type="VoxelGeneratorFlat" id="VoxelGeneratorFlat_r886l"] +channel = 0 + +[sub_resource type="VoxelMesherBlocky" id="VoxelMesherBlocky_na0f1"] +library = ExtResource("1_r886l") + +[node name="Robots" type="Node"] + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_5yot8") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.866024, -0.433016, 0.250001, 0, 0.499998, 0.866026, -0.500003, 0.749999, -0.43301, 0, 0, 0) +shadow_enabled = true + +[node name="Camera3D" type="Camera3D" parent="."] +transform = Transform3D(0.0323208, -0.600077, 0.799289, 0, 0.799707, 0.600391, -0.999478, -0.0194051, 0.0258472, 5.78515, 9.22018, 0.62065) + +[node name="VoxelViewer" type="VoxelViewer" parent="Camera3D"] + +[node name="Robot" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Robot"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) +mesh = SubResource("BoxMesh_oo1c2") + +[node name="VoxelTerrain" type="VoxelTerrain" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0) +generator = SubResource("VoxelGeneratorFlat_r886l") +mesher = SubResource("VoxelMesherBlocky_na0f1") +bounds = AABB(-1040, -32, -1040, 2080, 96, 2080) +material_override = ExtResource("2_nnl6p") diff --git a/scenes/main.tscn b/scenes/main.tscn deleted file mode 100644 index 9371a3a..0000000 --- a/scenes/main.tscn +++ /dev/null @@ -1,143 +0,0 @@ -[gd_scene load_steps=12 format=3 uid="uid://7q00x01xdsal"] - -[ext_resource type="VoxelBlockyLibrary" uid="uid://bsue4rd3wdfsl" path="res://BlockLibrary.tres" id="1_0wfyh"] -[ext_resource type="Material" uid="uid://de6s8en5fcyyw" path="res://BlockMaterial.tres" id="1_o5qli"] -[ext_resource type="Script" uid="uid://brnfd6h7eh0n7" path="res://scenes/code_runner.gd" id="1_sugp2"] - -[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_o5qli"] -sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) -ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) - -[sub_resource type="Sky" id="Sky_0wfyh"] -sky_material = SubResource("ProceduralSkyMaterial_o5qli") - -[sub_resource type="Environment" id="Environment_sugp2"] -background_mode = 2 -sky = SubResource("Sky_0wfyh") - -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_o5qli"] -albedo_color = Color(0.313808, 0.455394, 0.721014, 1) - -[sub_resource type="BoxMesh" id="BoxMesh_o5qli"] -material = SubResource("StandardMaterial3D_o5qli") - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_sgp6g"] - -[sub_resource type="VoxelGeneratorNoise2D" id="VoxelGeneratorNoise2D_o5qli"] -channel = 0 -height_start = 0.0 -height_range = 20.0 -noise = SubResource("FastNoiseLite_sgp6g") - -[sub_resource type="VoxelMesherBlocky" id="VoxelMesherBlocky_tefeu"] -library = ExtResource("1_0wfyh") - -[node name="Main" type="Node"] -script = ExtResource("1_sugp2") - -[node name="Timer" type="Timer" parent="."] - -[node name="Control" type="PanelContainer" parent="."] -anchors_preset = 9 -anchor_bottom = 1.0 -offset_right = 314.0 -grow_vertical = 2 - -[node name="VBoxContainer" type="VBoxContainer" parent="Control"] -layout_mode = 2 -theme_override_constants/separation = 10 - -[node name="Label" type="Label" parent="Control/VBoxContainer"] -layout_mode = 2 -text = "Programming" -horizontal_alignment = 1 - -[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer"] -layout_mode = 2 -size_flags_vertical = 3 - -[node name="VBoxContainer" type="VBoxContainer" parent="Control/VBoxContainer/HBoxContainer"] -layout_mode = 2 - -[node name="Label" type="Label" parent="Control/VBoxContainer/HBoxContainer/VBoxContainer"] -layout_mode = 2 -text = " Source Code " - -[node name="Code" type="CodeEdit" parent="Control/VBoxContainer/HBoxContainer/VBoxContainer"] -unique_name_in_owner = true -custom_minimum_size = Vector2(200, 0) -layout_mode = 2 -size_flags_vertical = 3 -text = "Set 1 /2 -Cpy /2 /3 -Add /2 /3 /3 - -" -placeholder_text = "Code here" -symbol_tooltip_on_hover = true -line_length_guidelines = Array[int]([5, 7, 9, 11]) -gutters_draw_executing_lines = true -gutters_draw_line_numbers = true -gutters_zero_pad_line_numbers = true - -[node name="Memory" type="VBoxContainer" parent="Control/VBoxContainer/HBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 - -[node name="HBoxContainer2" type="HBoxContainer" parent="Control/VBoxContainer"] -layout_mode = 2 -theme_override_constants/separation = 10 -alignment = 1 - -[node name="compileButton" type="Button" parent="Control/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = "[C]" - -[node name="StopButton" type="Button" parent="Control/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = "[ ]" - -[node name="PlayButton" type="Button" parent="Control/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = ">" - -[node name="PauseButton" type="Button" parent="Control/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = "||" - -[node name="StepButton" type="Button" parent="Control/VBoxContainer/HBoxContainer2"] -layout_mode = 2 -text = ">|" - -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource("Environment_sugp2") - -[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] -transform = Transform3D(-0.866024, -0.433016, 0.250001, 0, 0.499998, 0.866026, -0.500003, 0.749999, -0.43301, 0, 0, 0) -shadow_enabled = true - -[node name="Robot" type="Node3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, 14, 2.5) - -[node name="MeshInstance3D" type="MeshInstance3D" parent="Robot"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) -mesh = SubResource("BoxMesh_o5qli") - -[node name="Camera3D" type="Camera3D" parent="Robot"] -transform = Transform3D(-0.996038, -0.0493504, 0.0739856, 0, 0.831912, 0.554908, -0.0889344, 0.552709, -0.828616, 0.617269, 2.49481, -3.59337) - -[node name="VoxelViewer" type="VoxelViewer" parent="Robot/Camera3D"] - -[node name="VoxelTerrain" type="VoxelTerrain" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0) -generator = SubResource("VoxelGeneratorNoise2D_o5qli") -mesher = SubResource("VoxelMesherBlocky_tefeu") -bounds = AABB(-1040, -32, -1040, 2080, 96, 2080) -material_override = ExtResource("1_o5qli") - -[connection signal="timeout" from="Timer" to="." method="_tick"] -[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer2/compileButton" to="." method="_on_compile_button_pressed"] -[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer2/StopButton" to="." method="_on_stop_button_pressed"] -[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer2/PlayButton" to="." method="_on_play_button_pressed"] -[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer2/PauseButton" to="." method="_on_pause_button_pressed"] -[connection signal="pressed" from="Control/VBoxContainer/HBoxContainer2/StepButton" to="." method="_on_step_button_pressed"] diff --git a/BlockLibrary.tres b/scenes/word/BlockLibrary.tres similarity index 92% rename from BlockLibrary.tres rename to scenes/word/BlockLibrary.tres index 46bc1ca..1c156e0 100644 --- a/BlockLibrary.tres +++ b/scenes/word/BlockLibrary.tres @@ -1,6 +1,6 @@ [gd_resource type="VoxelBlockyLibrary" load_steps=4 format=3 uid="uid://bsue4rd3wdfsl"] -[ext_resource type="Material" uid="uid://de6s8en5fcyyw" path="res://BlockMaterial.tres" id="1_evy8o"] +[ext_resource type="Material" uid="uid://de6s8en5fcyyw" path="res://scenes/word/BlockMaterial.tres" id="1_evy8o"] [sub_resource type="VoxelBlockyModelEmpty" id="VoxelBlockyModelEmpty_o5qli"] diff --git a/BlockMaterial.tres b/scenes/word/BlockMaterial.tres similarity index 80% rename from BlockMaterial.tres rename to scenes/word/BlockMaterial.tres index e918ed2..aa78859 100644 --- a/BlockMaterial.tres +++ b/scenes/word/BlockMaterial.tres @@ -1,6 +1,6 @@ [gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://de6s8en5fcyyw"] -[ext_resource type="Texture2D" uid="uid://bcctuptks33yd" path="res://blocky_game_atlas.webp" id="1_nmlo6"] +[ext_resource type="Texture2D" uid="uid://bcctuptks33yd" path="res://scenes/word/blocky_game_atlas.webp" id="1_nmlo6"] [resource] albedo_texture = ExtResource("1_nmlo6") diff --git a/blocky_game_atlas.webp b/scenes/word/blocky_game_atlas.webp similarity index 100% rename from blocky_game_atlas.webp rename to scenes/word/blocky_game_atlas.webp diff --git a/blocky_game_atlas.webp.import b/scenes/word/blocky_game_atlas.webp.import similarity index 69% rename from blocky_game_atlas.webp.import rename to scenes/word/blocky_game_atlas.webp.import index d847fe0..27e058b 100644 --- a/blocky_game_atlas.webp.import +++ b/scenes/word/blocky_game_atlas.webp.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://bcctuptks33yd" -path.s3tc="res://.godot/imported/blocky_game_atlas.webp-aa4a7bf0424ced14ddb4e0a3548a39f2.s3tc.ctex" +path.s3tc="res://.godot/imported/blocky_game_atlas.webp-6bd280431e13b10c6f5b7a80949a8f67.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://blocky_game_atlas.webp" -dest_files=["res://.godot/imported/blocky_game_atlas.webp-aa4a7bf0424ced14ddb4e0a3548a39f2.s3tc.ctex"] +source_file="res://scenes/word/blocky_game_atlas.webp" +dest_files=["res://.godot/imported/blocky_game_atlas.webp-6bd280431e13b10c6f5b7a80949a8f67.s3tc.ctex"] [params] diff --git a/scenes/word/voxel_world.tscn b/scenes/word/voxel_world.tscn new file mode 100644 index 0000000..f13132b --- /dev/null +++ b/scenes/word/voxel_world.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=9 format=3 uid="uid://bp6ewa3urgac8"] + +[ext_resource type="VoxelBlockyLibrary" uid="uid://bsue4rd3wdfsl" path="res://scenes/word/BlockLibrary.tres" id="1_yf87h"] +[ext_resource type="Material" uid="uid://de6s8en5fcyyw" path="res://scenes/word/BlockMaterial.tres" id="2_j4yt8"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_gadlc"] +sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) +ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) + +[sub_resource type="Sky" id="Sky_t8uwy"] +sky_material = SubResource("ProceduralSkyMaterial_gadlc") + +[sub_resource type="Environment" id="Environment_5g68j"] +background_mode = 2 +sky = SubResource("Sky_t8uwy") + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_3juxb"] + +[sub_resource type="VoxelGeneratorNoise2D" id="VoxelGeneratorNoise2D_mko3u"] +channel = 0 +height_start = 0.0 +height_range = 20.0 +noise = SubResource("FastNoiseLite_3juxb") + +[sub_resource type="VoxelMesherBlocky" id="VoxelMesherBlocky_3tbtj"] +library = ExtResource("1_yf87h") + +[node name="VoxelWorld" type="Node"] + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_5g68j") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.866024, -0.433016, 0.250001, 0, 0.499998, 0.866026, -0.500003, 0.749999, -0.43301, 0, 0, 0) +shadow_enabled = true + +[node name="Camera3D" type="Camera3D" parent="."] +transform = Transform3D(-0.237189, -0.550881, 0.80017, 0, 0.823674, 0.567063, -0.971464, 0.134501, -0.195367, -10.8207, 13.7772, -16.0504) + +[node name="VoxelViewer" type="VoxelViewer" parent="Camera3D"] + +[node name="VoxelTerrain" type="VoxelTerrain" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0) +generator = SubResource("VoxelGeneratorNoise2D_mko3u") +mesher = SubResource("VoxelMesherBlocky_3tbtj") +bounds = AABB(-1040, -32, -1040, 2080, 96, 2080) +material_override = ExtResource("2_j4yt8")