Open bsergent opened 6 years ago
Combat still works as intended while both entities are aligned to the major grid, but the addition of sub-grid movement in 183f4b836c2a82945d9585411a830b435ee759f9 leads to a lot of buggy behavior when they are not aligned.
To fix this, I'd like to actually rework the combat system again. I really like the directional attacking and blocking, but the player is very limited on how they can attack due to the system. Namely, there is very little movement and variation to attacks which is not very satisfying. Players can also just continuously run away without every being hit. The sub-grid really helped to make the combat feel more responsive, but I'd like to add actions such as rolling, charging, back-stepping, spin attacks, etc. depending on the player's equipment. Here are the controls I'm currently thinking about:
Control | Action | Damage | Movement |
---|---|---|---|
MOUSE_LEFT |
Stab | Light to single tile | None |
MOUSE_RIGHT |
Slash | Medium to three tiles adjacent (45 deg to either side) | None |
WASD + SHIFT + MOUSE_LEFT |
Charge | Medium to three tiles in front | Three tiles forward |
Hold MOUSE_LEFT |
Charge | Heavy to three tiles in front | Three tiles forward |
Hold MOUSE_RIGHT |
Spin | Medium to all tiles directly adjacent | None |
SPACE |
Back-step | None | One tile back |
WASD + SPACE |
Roll | None | Two tiles in designated direction |
Responsive MOUSE_RIGHT |
Parry | Heavy to parried entity | None |
WASD |
Walk | None | One tile in designated direction |
WASD + SHIFT |
Sprint | None | One tile in designated direction (quickly) |
SHIFT |
Guard | Reduced | None |
Also need to think about warmup, acting, and cooldown times as well as stamina cost. In addition, the Controller class is going to need a lot of work to be able to detect all these possibilities. It could be implemented entirely in game code, but I think events for things such as releasing a held key should be built in.
I'll probably have similar combat systems for any other games I make, so might as well put it in the framework. This will be coupled to the inventory, item usage, and action systems.