diff --git a/.gitmodules b/.gitmodules index 85a31a5..f23cca6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,3 +6,7 @@ path = dialogic url = https://github.com/coppolaemilio/dialogic branch = main +[submodule "src/modules/voxel"] + path = src/modules/voxel + url = https://github.com/Zylann/godot_voxel + branch = godot3.x diff --git a/Makefile b/Makefile index 2402de4..0e0bc5a 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ all: godot-editor-main godot-editor-main: cd src/godot; \ - scons platform=x11 target=release_debug tools=yes custom_modules=../modules -j6; \ - scons platform=x11 target=release tools=no custom_modules=../modules -j6; \ - scons platform=x11 target=release_debug tools=no custom_modules=../modules -j6; + scons platform=x11 target=release_debug tools=yes custom_modules=../modules -j6 +# scons platform=x11 target=release tools=no custom_modules=../modules -j6; \ +# scons platform=x11 target=release_debug tools=no custom_modules=../modules -j6; # cd src/godot; \ # scons platform=x11 target=debug tools=yes custom_modules=../modules -j6 - cd src/godot; \ - scons platform=x11 target=release tools=no custom_modules=../modules -j6; +# cd src/godot; \ +# scons platform=x11 target=release tools=no custom_modules=../modules -j6; # scons platform=server target=release_debug tools=yes custom_modules=../modules -j6 # scons platform=windows target=release tools=yes custom_modules=../modules -j6 # scons platform=javascript target=release tools=yes custom_modules=../modules -j6 diff --git a/dialogic b/dialogic new file mode 160000 index 0000000..c0542ca --- /dev/null +++ b/dialogic @@ -0,0 +1 @@ +Subproject commit c0542caeaed106b2c69e91e4f07d04de77e1bec7 diff --git a/godot/map.tscn b/godot/map.tscn new file mode 100644 index 0000000..c6f2682 --- /dev/null +++ b/godot/map.tscn @@ -0,0 +1,9 @@ +[gd_scene format=2] + +[node name="map" type="Node2D"] + +[node name="road1" type="Line2D" parent="."] +points = PoolVector2Array( -100, -100, 100, -100 ) + +[node name="road2" type="Line2D" parent="."] +points = PoolVector2Array( -100, 100, 100, 100 ) diff --git a/godot/project.godot b/godot/project.godot new file mode 100644 index 0000000..dd3a606 --- /dev/null +++ b/godot/project.godot @@ -0,0 +1,10 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + diff --git a/godot/terrain/main_data.tscn b/godot/terrain/main_data.tscn new file mode 100644 index 0000000..625a1da --- /dev/null +++ b/godot/terrain/main_data.tscn @@ -0,0 +1,65 @@ +[gd_scene load_steps=6 format=2] + +[sub_resource type="VoxelStreamSQLite" id=1] + +[sub_resource type="OpenSimplexNoise" id=8] +lacunarity = 3.0 + +[sub_resource type="VoxelGeneratorGraph" id=9] +graph_data = { +"connections": [ [ 10, 0, 8, 1 ], [ 8, 0, 4, 0 ], [ 7, 0, 10, 1 ], [ 6, 0, 10, 0 ], [ 3, 0, 6, 1 ], [ 2, 0, 8, 0 ], [ 1, 0, 6, 0 ] ], +"nodes": { +"1": { +"gui_position": Vector2( 440, 50 ), +"type": "InputX" +}, +"10": { +"gui_position": Vector2( 860, 240 ), +"type": "Multiply" +}, +"2": { +"gui_position": Vector2( 440, 150 ), +"type": "InputY" +}, +"3": { +"gui_position": Vector2( 440, 250 ), +"type": "InputZ" +}, +"4": { +"gui_position": Vector2( 1160, 120 ), +"type": "OutputSDF" +}, +"6": { +"gui_position": Vector2( 700, 220 ), +"noise": SubResource( 8 ), +"type": "Noise2D" +}, +"7": { +"gui_position": Vector2( 540, 360 ), +"type": "Constant", +"value": 64.0 +}, +"8": { +"gui_position": Vector2( 1020, 140 ), +"type": "Subtract" +} +} +} + +[sub_resource type="VoxelMesherTransvoxel" id=4] +texturing_mode = 1 +mesh_optimization_enabled = true + +[sub_resource type="SpatialMaterial" id=7] + +[node name="main_data" type="Spatial"] + +[node name="VoxelLodTerrain" type="VoxelLodTerrain" parent="."] +stream = SubResource( 1 ) +generator = SubResource( 9 ) +mesher = SubResource( 4 ) +material = SubResource( 7 ) +full_load_mode_enabled = true + +[node name="DirectionalLight" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 300, 0 ) diff --git a/src/godot b/src/godot new file mode 160000 index 0000000..33b80bd --- /dev/null +++ b/src/godot @@ -0,0 +1 @@ +Subproject commit 33b80bd933d615d7bc2ca4a1dcb92e6dcbe7d30c diff --git a/src/modules/voxel b/src/modules/voxel new file mode 160000 index 0000000..e690497 --- /dev/null +++ b/src/modules/voxel @@ -0,0 +1 @@ +Subproject commit e690497838f7ae7b0bf71ce497bbbdc80eb2a747