-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This is currently just a place for me to write down some notes before I forget. Any feedback is appreciated!
Currently, animations are set for each player based on certain actions: for example, using a weapon will trigger an attack animation, pressing space will trigger a jump animation, etc. However, the current implementation of this functionality relies on setting the player's AnimState upon receiving an Event, meaning that if, for example, the player presses WASD while in the "jumping" animation, then the model will begin walking, despite still being airborne. Another symptom of this is that animations such as "attacking" or "drinking a potion" will loop indefinitely until another input is received.
The approach I will attempt to implement is to maintain a sort of state machine for the character's current actions, and only transition between animations under valid conditions. Not only will this remedy the issues described above, but it will also make it easier to play transitional animations and smoothen the overall graphics of the game. The state machine will accept different events and actions and output the correct animation to be played at any given time.