You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building on the features made in the comptime branch we can design the API to utilize compile time more and enabling these features to be merged in master. Merging comptime branch in master will resolve issue #27
The user will have to define archetypes i.e:
constPlayer=struct {
// Note variable name is not important herehp: Health,
pos: Position,
vel: Velocity,
};
constStaticObject= {
Pos: Position,
};
These archetypes are then stored in a comptime hash map
The API will not allow dynamically adding or removing components from an entity, but changing the entity type will be valid in any direction (or maybe this should be restricted?)
This will like mentioned allow the library to move a lot more over to compile time and hopefully make planned queries mostly compile time based as well and add the functionality for type queries i.e give me all Players
It will also make entity construction very fast since the user will always specify the full component list at creation i.e
world.setEntityType(entity, Player{...});
The text was updated successfully, but these errors were encountered:
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...
Building on the features made in the comptime branch we can design the API to utilize compile time more and enabling these features to be merged in master. Merging comptime branch in master will resolve issue #27
The user will have to define archetypes i.e:
These archetypes are then stored in a comptime hash map
The API will not allow dynamically adding or removing components from an entity, but changing the entity type will be valid in any direction (or maybe this should be restricted?)
This will like mentioned allow the library to move a lot more over to compile time and hopefully make planned queries mostly compile time based as well and add the functionality for type queries i.e
give me all Players
It will also make entity construction very fast since the user will always specify the full component list at creation i.e
The text was updated successfully, but these errors were encountered: