surrsurus / edgequest

Edgequest Season Two
Mozilla Public License 2.0
8 stars 1 forks source link

Discussion: Difference between Creature and Fighter #43

Closed surrsurus closed 6 years ago

surrsurus commented 6 years ago

Creature and Fighter are two structs that are very much tied into one another, however it seems like they overlap in terms of what they do:

It seems like that a Creature should be the struct that should have a name, and/or possibly a Fighter is the struct that should have a scent. As we move forward:

1) How should we best organize Fighters and Creatures? 2) Which one gets stats?

sudo-prime commented 6 years ago

It sounds to me like Creatures and Fighters are two concepts that are on the same level in the hierarchy, but separated during implementation. Maybe it would be better for Creatures to simply merge functionality with Fighters? I think intuitively, all Fighters are Creatures but not necessarily the other way around - so, Creature would simply absorb all Fighter implementation (but only if there are no other Fighter-specific properties). If you ask me, all of the listed properties would make sense as Creature properties. In which case, Fighter would still exist, but would contain implementation that only Fighters would have, not Creatures ("attack style" and "weapon" are two that come to mind).

surrsurus commented 6 years ago

After further discussion we decided that a Creature should hold its state, a Box<AI>, some type of Stats struct, and Fighter should become Actor as that more accurately defines its role in the hierarchy.

Now we need to: