Chunk-Components
genaray opened this issue · 1 comments
genaray commented
Background
Sometimes it makes sense to attach additional data to a chunk. Whether it is flags, entire components or additional arrays to naturally expand the possibilities. Chunk components would therefore make a lot of sense.
Solution
We could simply give each chunk an additional array in which these components could be stored. Just like with the entity component arrays. This would require an additional API to access them. The current one would probably not need to be changed or touched. It would be an extension.
chunk.AddChunkComponent(...);
chunk.GetChunkComponent();
chunk.HasChunkComponent();
...
xentripetal commented
This would likely permit #190 by allowing addition and change watermarks to be stored alongside chunks and letting queries filter out types with watermarks older than their last run watermark