Add lifetime component to entities by default #14
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
larssonmartin1998/atlas#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is just an idea for now.
But since were doing batched updates of all operations, meaning we delay destructions of entities, a system could run with an entitty that is queued for destruction and run updates on it expecting behavioral changes and even pass events using that entity.
This is my first idea to stop this behavior without introducing cache breaking or ideology breaking flow.
Have a default Lifetime Component added to ALL entities that contains state such as
QueuedForDestructionwhich the systems can query for and check. It would then also be used internally with the event system and destroy functionality etc. More states could be added as needed in the future.This goes very well with the native workflows of the ECS.