Taking the relational archetype ideas from flecs and port them to Go.
What's different from alternatives like Arche
- Pros
- Generates custom API based on config file, your API is bespoke to your application and making more like a DSL.
- Uses sparse sets with groups allowing perfect SOA data layout.
- Initial benchmarks show its faster to add and remove components and event query.
- Handles relationships with any number of components.
- Has seperate API generated for tags vs components.
- Has custom API for components with only a single field to optimize out function calls.
- Cons
- Code generation is required. But as soon as you generics I think you are tied to recompiling your code anyway.
- Have to write a config file. 1
It uses Go's generics however there are no good way to make clean API with the current interface constraints. For example having a slice of different SparseSet[T]
has to be done with any
, whereas with code gen we can be more explicit.
This is a work in progress, and the API is subject to change.
1 Actively working on a Web based real-time config generator built into the generator.