Open demoth opened 2 years ago
Actively working on it, merged a preview for animation and states (merged at 6bd10334d758da9b691f327356cd2206a3b34bee)
At first, let's refactor to a readable solution in code, then we can think of a non-code way for animation description
Move the enormous descriptions of the animation from the source code (for example in
M_Soldier.java
) into a resource file. For examplejson
?Upd. 2024: After reviewing of what is done and what is still achievable, it makes sense now to settle on what is already implemented in the scope of the animation rework and if necessary improve later.
The biggest understanding now is that the decision making solution (which was previously tied to the animation and monster logic) can be done outside of the initial scope of this task (moved to Rework monster decision code #109).
New approach: Animation is controlled with the state machine. Each state is an animation sequence which can either loop or transition to another state. The transition rules govern which transitions are allowed. The character can interact with the game world (or with itself) via events, which are emitted in certain frames (for example sounds and firing projectiles). An excerpt from the new animation definition: