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

feat(engine): Entity id versioning #11

Open
0ffz opened this issue Jan 26, 2021 · 0 comments
Open

feat(engine): Entity id versioning #11

0ffz opened this issue Jan 26, 2021 · 0 comments

Comments

@0ffz
Copy link
Member

0ffz commented Jan 26, 2021

Entities can come and go quickly for plugins like Looty, where references to itemstacks are very unstable.

We may wish for one entity to reference another, and be sure that this reference corresponds to only that entity. Currently, if the reference entity gets removed, another will take its index (ID).

One solution to this is to reserve some bits of an entity ID to be tied to the version. There is a great page on this in the ECS back and forth blog: https://skypjack.github.io/2019-05-06-ecs-baf-part-3/. The implicit list idea is also pretty good, though performance wise really doesn't matter to us right now.

I'd like to essentially implement the exact system outlined in that blog, though how the syntax will look for end users needs to be decided.

We should also start thinking about how we'll be storing permanent entity references. Do we want to use UUIDs? What do we do when a reference is in unloaded chunks? There are enough questions there that I think it should be its own issue for later.

@0ffz 0ffz changed the title Entity id versioning feat(engine): Entity id versioning May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant