Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup chunk clean system #16

Open
richardbiely opened this issue Oct 28, 2023 · 0 comments
Open

Cleanup chunk clean system #16

richardbiely opened this issue Oct 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@richardbiely
Copy link
Owner

richardbiely commented Oct 28, 2023

When the last entity on chunk is deleted, its lifetime countdown starts. Once the counter reaches zero (currently deduced by one every world::update()) the chunk is added to the removal list.
This list is updated from the Chunk class while the world manages the state. However, all state data is stored in the Chunk (ChunkHeader) that doesn't even need to know.

This might need a cleanup. Lifetime data should probably move to where the lifetime is managed and the way the list is updated should probably also be changed form a hard-coded list to some sort of observer the world can register to.

On the other hand, chunk storage is basically for free because all the information is encoded within the header and is very small.

Nevertheless, evaluate.

@richardbiely richardbiely added the enhancement New feature or request label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant