Marc Gilleron
e958739759
Fix some narrowing conversions
2022-02-13 16:19:54 +00:00
Marc Gilleron
b3faec2bef
Removed voxel_block_request.h, use specialized structs
2022-02-12 23:37:02 +00:00
Marc Gilleron
f1c59d452a
Removed more Vector<T> usages.
...
Remaining uses are necessary to communicate with Godot APIs.
2022-02-06 22:26:30 +00:00
Marc Gilleron
392f2d94bf
Don't assign unused fields
2022-02-06 13:48:34 +00:00
Marc Gilleron
320cc7422c
Rename tasks:
...
- As verbs for the task they do
- Suffixed with Task instead of Request,
to avoid confusion with network stuff
2022-02-06 13:45:51 +00:00
Marc Gilleron
ff6bd7b82d
Fix GCC initializer list reorder warnings
2022-02-05 17:32:36 +00:00
Marc Gilleron
5aeb6a69e7
Fix shadowing declaration
2022-02-05 17:22:25 +00:00
Marc Gilleron
c6199563c8
Split data request
2022-02-02 23:12:59 +00:00
Marc Gilleron
b7e56c6bec
Moved other tasks out of VoxelServer
2022-02-02 21:03:09 +00:00
Marc Gilleron
0ad7be9281
Moved BlockMeshRequest out of VoxelServer
2022-02-02 01:11:28 +00:00
Marc Gilleron
14fc940491
Moved StructDB to utils
2022-01-31 21:33:12 +00:00
Marc Gilleron
d1250ef0ad
Added support functions to help setting up basic multiplayer with VoxelTerrain
.
...
These might change in the future. Will have to test that later,
when Godot 4 gets more stable.
2022-01-31 21:23:39 +00:00
Marc Gilleron
f838adf26a
Renamed emerge/imerge_block => load_voxel_block/save_voxel_block
2022-01-16 04:21:02 +00:00
Marc Gilleron
9c6118806f
Namespaced remaining stuff
2022-01-09 22:46:26 +00:00
Marc Gilleron
b67ca3d903
Namespaced every registered class
2022-01-09 22:16:44 +00:00
Marc Gilleron
774adfca3c
VoxelServer no longer inherits Object.
...
The Godot-facing singleton is now a different class in gd:: namespace.
Moved the updater to its own file.
2022-01-09 04:53:33 +00:00
Marc Gilleron
e53dcf7c84
Re-namespaced VoxelConstants
2022-01-09 03:06:58 +00:00
Marc Gilleron
9c653b8a9f
Namespaced FixedArray
2022-01-09 02:53:21 +00:00
Marc Gilleron
38baeae2d9
Namespaced VoxelBufferInternal
2022-01-08 22:49:59 +00:00
Marc Gilleron
64415a3c86
Configure clang-format to put a newline after template declarations
2022-01-04 22:15:57 +00:00
Marc Gilleron
0c290082ff
Namespaced StructDB
2022-01-04 21:44:06 +00:00
Marc Gilleron
5ece3b840e
Namespace VoxelMemoryPool
2022-01-03 23:20:38 +00:00
Marc Gilleron
e20684ce69
Namespaced math funcs
2022-01-03 23:14:18 +00:00
Marc Gilleron
30feecaa46
Don't crash if mesh requests are created without mesher (need to fix this in VoxelLodTerrain)
2021-12-31 19:02:46 +00:00
Marc Gilleron
66fb239d80
Renamed VoxelFileLocker => FileLocker and namespaced
2021-12-29 19:22:59 +00:00
Marc Gilleron
0be0fb19b0
Moved task stuff to utilities
2021-12-29 19:08:23 +00:00
Marc Gilleron
39d949f345
AsyncDependencyTracker does not depend on VoxelServer
2021-12-29 18:54:45 +00:00
Marc Gilleron
12caefe577
Renamed VoxelThreadPool => ThreadedTaskRunner and namespace it
2021-12-29 18:25:47 +00:00
Marc Gilleron
8bf7a3695f
Mark profiler frame inside frame_post_draw
signal
2021-12-29 17:31:31 +00:00
Marc Gilleron
4d2fe30661
Use Time singleton
2021-12-29 17:06:24 +00:00
Marc Gilleron
b96b27084c
VoxelThreadPool does not depend on VoxelBuffer
2021-12-29 15:15:33 +00:00
Marc Gilleron
0f67513a29
Move TimeSpreadTaskRunner to its own file and namespace
2021-12-29 15:12:28 +00:00
Marc Gilleron
541af4a4ad
Spread out mesh destruction in attempt to workaround slow Vulkan buffer deallocation
2021-12-28 18:19:41 +00:00
Marc Gilleron
922f361cb0
Made it compile in Godot 4
...
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00
Marc Gilleron
380e295d94
Merge branch 'master' into full_load_mode
...
# Conflicts:
# meshers/transvoxel/transvoxel.h
# server/voxel_server.cpp
# terrain/voxel_lod_terrain.cpp
2021-12-11 22:59:24 +00:00
Scott Wadden
6625db2d70
Fixed clang build
2021-11-03 00:17:20 -03:00
Marc Gilleron
ca7ac42cde
Merge branch 'master' into full_load_mode
...
# Conflicts:
# edition/voxel_tool_lod_terrain.cpp
# generators/graph/voxel_generator_graph.cpp
# terrain/voxel_lod_terrain.cpp
2021-10-31 16:17:27 +00:00
Marc Gilleron
6441d1b864
Deprecate Vector3i(Vector3) constructor, make conversions explicit
...
Some conversions were wrong/unintented.
This is also in prevision of using Godot 4 Vector3i,
which default behavior differs from this module.
2021-10-31 16:01:47 +00:00
Marc Gilleron
6cd143d392
Enable collisions by default on VoxelViewer
2021-10-15 22:51:53 +01:00
Marc Gilleron
a226111818
Run edits after preloads without a sync point on the main thread
...
- Still room for improvement, more parallelism is possible
- Started moving the data into its own structure
- Added locks to secure access to the data map (not truly used yet)
- Tasks with a tracker can schedule next ones when they complete
- Data loading responses also come with a callback, no buffer anymore
- Use new data grid to cache map access
2021-10-13 20:28:20 +01:00
Marc Gilleron
c5b0ac43fb
Semi-async do_sphere() implementation. May change though.
...
It is a lot better than the fully synchronous do_sphere(),
but it would be a lot better if we could move everything async
2021-10-04 19:20:36 +01:00
Marc Gilleron
e04091f3cb
Added full load mode to VoxelLodTerrain
...
With this mode enabled, editing anywhere becomes possible.
All edited blocks are loaded at once when the stream is assigned.
The generator is used on the fly to fill the gaps, instead of being
pre-emptively cached only nearby the viewer to allow editing.
Editing is still on the main thread, so this can cause stalls if
the generator is complex. There is also no controlled limit on how
much data gets loaded, so if edited data is larger than RAM, it will
not be playable. The feature is already quite usable, but more work
may be done for wider viability.
2021-10-03 01:48:07 +01:00
Marc Gilleron
c6b2275738
Fix some stats and add VoxelMemoryPool info
2021-10-02 18:31:48 +01:00
Marc Gilleron
30db0c5193
Split VoxelBuffer in two, script-facing wrapper and internal.
...
The internal is the main use within the voxel engine,
and does not inherit Reference.
2021-09-26 04:14:50 +01:00
Marc Gilleron
e4cb16e2a4
Comments
2021-09-25 16:27:53 +01:00
Marc Gilleron
6faf5b29f3
Allow to configure main thread time limit
2021-09-25 02:13:03 +01:00
Marc Gilleron
3197eaba35
Move main thread tasks into one runner in VoxelServer
...
So the timing budget is better respected even if there are multiple
voxel nodes in the scene
2021-09-25 00:02:41 +01:00
Marc Gilleron
18e0a23d46
Fix task count when a stream is used
2021-09-24 02:06:00 +01:00
Marc Gilleron
94bb985704
Automatic thread count computation and project settings
2021-09-21 21:50:06 +01:00
Marc Gilleron
176f46440f
Merge meshing and generation thread pools, expecting better usage of available threads
2021-09-21 19:32:29 +01:00