benreid24 / BLIB

Small organized collection of common code I have accumulated over the years that has amassed into a proper 2d game engine
1 stars 0 forks source link

Defer ECS entity & component destruction #203

Open benreid24 opened 2 months ago

benreid24 commented 2 months ago

Mark entities and components for destruction at a pre-defined point in the engine frame. This is a pre-req for a fully parallel renderer. Also consider replacing use of recursive_mutex as the main motivation was to allow cascading entity deletions based on events.

Also consider adding an entity flag to signal an entity will have no relationships, simplifying destruction of most entities.