139 Commits

Author SHA1 Message Date
Marc Gilleron
9a74362aca Added vox scene importer. No options at the moments. 2021-07-31 18:48:47 +01:00
Marc Gilleron
059f490669 Renamed udiv => floordiv 2021-07-31 15:15:43 +01:00
Marc Gilleron
2c3b7fae5a Error more explicitely in case trying to serialize an empty block 2021-07-25 20:38:15 +01:00
Marc Gilleron
466bc41ab8 Comments 2021-07-25 20:37:47 +01:00
Marc Gilleron
149eb2a873 Added test for instance data serialization 2021-07-18 19:42:42 +01:00
Marc Gilleron
da8dc36590 Return all channels supported with region files and SQLite
This fixes a node configuration warning,
because before these were always returning no channels at all.
2021-06-14 18:51:19 +01:00
Marc Gilleron
84e00ccbaf Another size_t conversion 2021-06-13 17:15:11 +01:00
Marc Gilleron
6374c9831c Convert size_t to comply with Variant conversion problem on some compilers 2021-06-13 17:03:45 +01:00
Marc Gilleron
73af17e65f Avoid using size_t to comply with Variant conversion ambiguity that occurs on some compilers 2021-06-12 17:13:46 +01:00
Marc Gilleron
1ee5bcb80d Renamed Rect3i -> Box3i 2021-05-31 17:12:04 +01:00
Marc Gilleron
411be94559 Renamed ArraySlice -> Span 2021-05-31 16:48:49 +01:00
Marc Gilleron
310386bde8 Merge branch 'master' into block_size_decoupling 2021-04-11 01:09:51 +01:00
Marc Gilleron
313e592dcb Notes about big-endian 2021-04-10 17:38:07 +01:00
Marc Gilleron
758e3bd227 Allow to use block size 32 for mesh blocks while using 16 for data blocks
Still hardcoded but a config should be added
2021-04-03 20:39:37 +01:00
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