Arch icon indicating copy to clipboard operation
Arch copied to clipboard

Chunk-Components

Open genaray opened this issue 2 years ago • 1 comments

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();
...

genaray avatar Nov 06 '23 18:11 genaray

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

xentripetal avatar Apr 30 '24 03:04 xentripetal