#Would anyone share his experience on

1 messages · Page 1 of 1 (latest)

boreal tinsel
#

Just trying to learn and understand the way I will make decisions in the future about architecture. So if anyone would like to contribute and give feedback about this, it would be awesome.

dusky edge
#

It's always a balancing act between DRY (Don't Repeat Yourself) and coupling. When you reuse a structure between two systems you're binding them together in a way that could be hard to undo or causes the structure to be a union of data when only a subset is shared.

The same thing happens for functions where two places do "the same thing" but eventually you have a bunch of weird switches because each one is varies it just a little.

In the specific case of your FAttackData, it sounds like a good candidate to share, but not on it's own. If there's some "attack system" that uses that as the input and used by both the fighter and the tower it might be a good idea. But if the fighter and tower are just doing everything on their own, it sounds like you have two different configuration structures.