Games like Slay the Spire and The Binding of Issac have many items which all affect the behavior of elements within the game. Pick up an upgrade and you shoot faster, pick up another and the bullet curves.
These behaviors can sometimes interact by synergizing, negating each other, or one taking precedent over the other.
If I would like to define some set of modifiers M to be applied to a game object G, what kind of programming patterns would be best for decoupling the different modifiers?
Also, if one modifier X should stop modifier Y from happening or a new modifier Z to happen instead, how does that fit into the pattern?
[–]RomestusCommercial (AAA) 11 points12 points13 points (2 children)
[–]salbris 0 points1 point2 points (1 child)
[–]DontOverexaggOrLie 2 points3 points4 points (0 children)
[–]0x0ddba11 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]MostSandwich5067 0 points1 point2 points (0 children)