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
Whenever a new type of relationship component is added to an entity, the entity's archetype changes. This is also mentioned in the wiki. If there are multiple types of relationships, say three, then there may be as many as eight different archetypes generated during the world updating. On the other hand, being added to a relationship should not be considered a 'structural change', literally.
A relationship can be complex, and can be accessed from more than one system. If a relationship is an entity, it could contain as many components as it needs.
A relationship may be related to more than two entities. The current modeling approach allows each relationship to be related to only two entities.
Instead of firstly iterate through entities and then iterate through other entities that related to the former, I think it's more intuitive to directly iterate through all relationships and then process all entities in each relationship.
The text was updated successfully, but these errors were encountered:
XCYRKDSDA
changed the title
How about modeling "relationship" as an entity instead of a component?
How about modeling "relationship" as an entity instead of as a component?
Jun 15, 2023
Interesting idea! :) We could look into this, unfortunately i dont have that much time atm, finishing my bachelor thesis.
Thats true, however it only happens once. The first time a relationship between two entities is established, if a relation changes or grows, it will not cause a new structural change each time.
Thats true, however that would also cause structural changes. The current solution can use anything as relationship data without additional changes.
Its 1 to n actually. One entity can have a relation to many other ones.
Theres actually not such a huge difference, the overhead is the same.
In the current solution, the source entity acts as the "relationship" entity. To see what performs better, a benchmark is required. But i actually assume that the current solution is "faster", since it does not require one additional entity per relation. The cache should also be utilized more due to the fact that the source entity acts as the relation itself. But to verify or refute this, a benchmark is required ^^
The text was updated successfully, but these errors were encountered: