Wasn't there some guy here whose posts were removed?
Status Effects (Buffs Debuffs) in an ECS Architecture
Can someone please explain to me what the problem is with having a multidictionary that maps things to indexes of components in an array, instead of having a normal dictionary which maps each thing to an index of a component in an array?
On 10/11/2017 at 11:07 PM, Tristan Richter said:Can someone please explain to me what the problem is with having a multidictionary that maps things to indexes of components in an array, instead of having a normal dictionary which maps each thing to an index of a component in an array?
A set of indices instead of a single index would imply a significantly greater complexity, e.g. because values have a variable size, with performance ranging between slightly worse and much worse.
But all suggestions so far simply don't need this kind of multidictionary (linking an entity to the set of its buffs) because they are about navigating the association only in the opposite direction (from a buff to the entity it affects), which is simpler, "more ECS", more flexible, etc.
Omae Wa Mou Shindeiru