These are the components I'm using in Dose Response so far. This is my first time using this pattern and the first time I'm writing a real game so it's been a learning experience and I'm probably doing a lot of things wrong. But hey, that's why I started this in the first place -- to figure out how this component stuff works in an actual game (rather than just reading about the PositionComponent and VelocityComponent for the hundredth time).
This is Rust, so apart from normal structs (records) you can have structs with no fields (that I use to declare a property -- Background
meaning "is a background tile", Solid
means "is a solid entity that you can bump into but cannot occupy the same space", etc.).
Then you have enums
which are again like C enums except type-checked and they can contain structs, too. So the AttackType
component can either be Kill
(i.e. the attack instantly kills the target) or for example Stun{duration: int}
which means the target will be stunned for n-turns where n is the `d