Comments (3)
each archetype should implement an interface
we can then have an array of these interfaces and then we can make some operations O(1) i.e hasComponent
and getComponent
etc...
The std.mem.Allocator is a good place to start for dynamic dispatch: https://github.com/ziglang/zig/blob/master/lib/std/mem/Allocator.zig
from ecez.
The restriction of only allowing predefined archetypes can be removed by using the interface idea
Queries can be processed on compile time using comptime and itnerfaces can be used to do partial type erasure needed to combine different archetypes!
from ecez.
Resolved by PR #30
from ecez.
Related Issues (20)
- GroupComponents function: Allow registering multiple components in a single tuple/array HOT 2
- Simplify shared state API HOT 1
- support loading file with subset of component types HOT 1
- support saving a subset of components HOT 1
- Component storage is not aligned
- getComponentPtr
- getComponents
- Individual component allocators
- Clean up repetitive switch cases in meta.zig HOT 1
- support multiple storages per scheduler
- Using functions directly in a scheduler trigger a zig compiler TODO
- createEntity with tuple trigger issue in zig compiler
- Entity Prototype
- remove comptime var workaround
- storage edit queue to queue edits during dispatch HOT 1
- zig-gamedev deps should be fetched through zon HOT 1
- only allow pointers as shared state (heap only) HOT 1
- EventArgument error: reified structs must have no decls HOT 1
- Replace zjobs with std.Thread.Pool HOT 1
- Allow multiple EventArguments for a single Event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecez.