Commit Graph

125 Commits (c746031eba7c03f901c3909b85cde58fe4e0e2ce)

Author SHA1 Message Date
Marc Gilleron ba5c0bcb17 Use common default 2021-03-12 23:38:37 +00:00
Marc Gilleron 76ec90fe34 Moved constants and tables under a folder 2021-02-21 23:58:00 +00:00
Marc Gilleron f1e2ea9ad4 Update to latest Godot's threading primitives 2021-02-19 01:30:22 +00:00
Marc Gilleron d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron 26eebd3c66 Fix warnings 2021-02-16 22:03:03 +00:00
Marc Gilleron 7250e5a18c Fix warning 2021-02-16 21:44:01 +00:00
Marc Gilleron 0f1d112a4d Fix missing header 2021-02-16 21:30:34 +00:00
Marc Gilleron 6ec45792ed Fix SQLite database connection not cached correctly.
The file path returned by sqlite is different from the property we used to
open it, so instead we have to remember that path.
2021-02-09 00:34:57 +00:00
Marc Gilleron e184b68b7c Fix compressed data header not written correctly 2021-02-07 23:31:42 +00:00
Marc Gilleron b65b0b8045 Implemented saving and loading of modified instances in SQLite 2021-02-07 17:22:50 +00:00
Marc Gilleron b66b9a01a9 Removed VoxelStreamFile 2021-02-01 22:25:25 +00:00
Marc Gilleron 4353939eb4 Move region stuff to a folder 2021-01-31 16:51:42 +00:00
Marc Gilleron 7d0a4f3e78 Fix signedness warnings 2021-01-31 16:42:06 +00:00
Marc Gilleron 3c092771e9 Missing include 2021-01-31 16:32:03 +00:00
Marc Gilleron fe49e70243 Fix property hint 2021-01-31 16:23:59 +00:00
Marc Gilleron a0e7a3229c Added compression header to make it reusable for other formats and more future proof 2021-01-31 15:47:36 +00:00
Marc Gilleron 0526c4e860 Fix cache not getting flushed correctly, causing saves to take too long 2021-01-31 15:26:15 +00:00
Marc Gilleron db7fc640c1 Increased cache size, SQLite saving is slower than loading 2021-01-30 01:39:15 +00:00
Marc Gilleron c6b169b978 Upgraded block serialized format, added some error handling 2021-01-30 01:36:37 +00:00
Marc Gilleron 158715922d Fix retrieving from cache
It should have made a copy and the input should have been populated
instead of being replaced (because it wouldn't hold the ref)
2021-01-30 01:33:55 +00:00
Marc Gilleron 834f7fe090 Fix serialized blocks unable to save when using channel depth greater than 8 bits 2021-01-28 22:03:58 +00:00
Marc Gilleron 01e5e18922 Implemented VoxelStreamSQLite 2021-01-28 22:02:49 +00:00
Marc Gilleron 4ef4da180c Saving generator output is no longer enabled by default. Now only changes may be saved. 2021-01-21 19:40:26 +00:00
Marc Gilleron 0713016d9c Fix missing result in emerge_block() 2021-01-21 19:39:57 +00:00
Marc Gilleron 493dbf26dd Fix use of enum returns instead of boolean 2021-01-18 19:42:28 +00:00
Marc Gilleron 46d1b78724 Added region file debug checks 2021-01-17 22:22:42 +00:00
Marc Gilleron a90e520416 Formatting 2021-01-17 17:23:49 +00:00
Marc Gilleron 4ec60074bb Refactor generators and streams
- VoxelGenerator no longer inherit VoxelStream
- VoxelStream is now more focused on files
- Nodes have separate stream and generator properties
- Generators use 2 dedicated threads instead of sharing a single one with streams
- TODO Image.lock() is problematic for multithreading
- TODO Voxel graph can cause RWLock contention if edited while it runs
- TODO Saving generator output no longer works, need to put it back
2021-01-17 17:18:05 +00:00
Marc Gilleron 89750a20f8 Made file streams thread-safe (but still won't be used in more than one thread)
- Added a global file locker so threads can synchronize when accessing files
- Added mutexes to serialize access to file streams (i.e to call in series)
- VoxelStream API now expects implementations to be thread-safe
- Did some logic/data separation in RegionFile in case we need an
  in-memory implementation, however I might just use SQLite in the
  future instead
2021-01-16 13:34:45 +00:00
Marc Gilleron 03f2900f6a Fix error when a region file gets created, it was wrongly trying to migrate because the version wasn't set 2020-12-18 21:20:00 +00:00
Marc Gilleron 89abb37e0f consts 2020-12-18 20:52:09 +00:00
Marc Gilleron 10d6e5bd8a Script-based generators and streams have their own class, should fix C# API 2020-10-31 22:11:25 +00:00
Marc Gilleron c6572142eb Typo 2020-10-25 16:56:04 +00:00
Marc Gilleron e31147b434 Fix one more GCC warning 2020-09-20 17:05:20 +01:00
Marc Gilleron a462803929 Fix more GCC warnings 2020-09-20 16:33:00 +01:00
Marc Gilleron 39d56b2c17 Fix GCC warnings 2020-09-20 16:13:53 +01:00
Marc Gilleron b10b647133 Separate region file logic so it can be used independently and add features to it.
This increases its version number to 3. Older files using version 2
are migrated to version 3 when a write operation is performed.
2020-09-19 21:50:23 +01:00
Marc Gilleron 6c80da0425 Moved VoxelBuffer and VoxelMemoryPool under storage/ directory 2020-09-14 19:33:02 +01:00
Marc Gilleron 168cd90295 Unused variable 2020-09-13 02:59:12 +01:00
Marc Gilleron 644ec60003 Fix missing return 2020-09-13 02:47:26 +01:00
Marc Gilleron 7064f6e471 Color palette support in .vox loader and Cubes mesher 2020-09-13 02:17:11 +01:00
Marc Gilleron e1b9a25db7 Added utility class to load MagicaVoxel .vox files 2020-09-12 21:10:05 +01:00
Marc Gilleron 9ccf16419d Merge branch 'master' into threading_refactor
# Conflicts:
#	streams/voxel_block_serializer.cpp
#	voxel_buffer.h
2020-09-08 21:40:59 +01:00
Marc Gilleron e8d0800511 Unused code 2020-09-08 00:49:37 +01:00
Marc Gilleron 7405692f68 Unused code 2020-09-07 23:53:38 +01:00
Marc Gilleron 0922b92ace Fix some GCC warnings and Clang error 2020-09-07 23:26:04 +01:00
Marc Gilleron d81ffb95f4 Detect usage of Tracy, add some profiler scopes 2020-08-30 04:00:01 +01:00
Marc Gilleron 107f29c5d3 Removed old profiler 2020-08-29 23:20:51 +01:00
Marc Gilleron 56c2a0856a Initial integration on VoxelTerrain with static camera, fixed a bunch of things 2020-08-25 23:00:38 +01:00
Marc Gilleron 1fe50b01d6 Added VoxelServer. Compiles, but isn't used anywhere yet 2020-08-24 01:49:23 +01:00