Mystic-Forge / Assemblage

0 stars 1 forks source link

Proper biome initialization/generation queue #6

Open Coffee-Maker opened 2 years ago

Coffee-Maker commented 2 years ago

The current system for chunk initialization uses channels, which works fine but it does not account for the priority of updates. For example. an existing chunk being modified should be a higher priority than a chunk that was enqueued for its first generation.

The solution to this is not all that obvious, but a potential fix is to take the existing channel contents, check their priorities, and choose the one of highest priority, and then put all other chunks back into the channel for another thread to handle.