14 Commits

Author SHA1 Message Date
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
107f29c5d3 Removed old profiler 2020-08-29 23:20:51 +01:00
Marc Gilleron
23ce65d789 Show terrain in editor, with option to turn it off. A scripted stream will turn it off by default. 2020-08-14 20:33:09 +01:00
Marc Gilleron
b95f47b018 Fix missing return value 2020-07-28 20:32:03 +01:00
Marc Gilleron
d96db0d329 Fix node config warning with file streams by using channels from the fallback stream 2020-07-26 18:42:17 +01:00
Marc Gilleron
1a08cd31d6 Use a macro to print debug stuff only in verbose mode 2020-07-08 20:48:52 +01:00
Marc Gilleron
8879d9b2e7 Moved all generators under their own base class and folder 2020-01-26 22:34:26 +00:00
Marc Gilleron
f14b374931 Made block size and a few other params modifiable (not so easy, though) 2019-08-24 01:44:27 +01:00
Marc Gilleron
dc73977a1a Changed profiler to be more like a stack-based one, also made it super light (CPU-wise) 2019-08-18 23:13:12 +01:00
Marc Gilleron
457ebf626d Added stat for time spent opening files 2019-08-18 16:10:40 +01:00
Marc Gilleron
3a64209b27 Added LZ4 compression to saved blocks. Makes them fit in single sectors much more often, increasing performance 2019-08-17 18:15:16 +01:00
Marc Gilleron
01b1ee0170 Added first working version of region save format, still WIP 2019-08-14 20:34:06 +01:00
Marc Gilleron
82502d3397 Simple file-per-block saving WIP. Compiles but didn't test. 2019-05-28 00:40:09 +01:00