forked from skypjack/entt
-
Notifications
You must be signed in to change notification settings - Fork 0
Patterns
Alan Jefferson edited this page Nov 9, 2019
·
2 revisions
Table of Contents
Also known as "Archetype". A preset combination of components.
https://gitter.im/skypjack/entt?at=5dc71c084adf071a84fe2c28
Todo
- Archetypes: it's not something invented by any recent library/engine/whatever, it's just one of the many ways you can implement a centralized (note, centralized) ECS and it's around since even some decades ago probably, as well as the ECS architecture itself that is here since the seventies or so - there is nothing in EnTT that is somehow close to the archetype model, so I've nothing to add here Ofc, sparse sets based models are around since a lot of time ago, nothing new here as well (though I've never found details on what I've called groups but I'm pretty sure someone invented something similar before and just called it differently)
- Prototype or prefab or archetype (even though in this case it's intended as entity archetype rather than archetype model), it's nothing special: you've an entity, you assign it components and values, than you use it to spawn copies - there exists many variants of how this works then but all boil down to the same concepts This was to continue replying to @alanjfs :) i dunno, the 70s about that seems very suspect, as Pong itself was on 72 Games are not the only complex software out there
- Shadow Registry: again, nothing special, when you want to temporarily remove things from the simulation for any reason, you can use a side registry and stomp everything there, then delete the entities from the main one. Stomp back to reload those entities
- Shared Components: here there are many things to say and all the times I reach the same conclusion: I should close the issue about shared components with an article because thinking to offer a single solution to fit all the cases is good maybe only for marketing but I'm the first one that wouldn't be satisfied from it Briefly: imagine two entities have a component C and you modify it for E1, then E2 sees the same changes However there are plenty of models here that fit many different use cases and depend on many factors: ownership design, ways to escape the shared state (eg CoW is one of them) and so on
EnTT - Fast and Reliable ECS (Entity Component System)
Table of contents
Examples
Blog
- RAII
- Polymorphism
- Shared Components
- Intent System
- Input Handling
- Undo
- Operator Stack
- State
- Resources
- Interpolation
Resources
Extras