🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Status Effects (Buffs Debuffs) in an ECS Architecture

Started by
12 comments, last by LorenzoGatti 6 years, 8 months ago
Advertisement

Wasn't there some guy here whose posts were removed?

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

This topic is closed to new replies.

Advertisement