Learning Basics: Player States and Limiting Inputs
- dcoleman97
- Jun 16, 2021
- 1 min read
For one of my first tests outside of structured tutorial work, I wanted to try and replicate the mechanics and feel of a fighting game, using inputs inspired by Street Fighter 4 and Guilty Gear. To do this, I used variables that set the player in different states, such as idle, attacking, and dashing, to dictate what they can and cannot input, with these variables toggling as inputs are registered and toggling back as the animations complete. Building on this, I included an attack cancel function that reads if the player is in the attacking state, and allows them to reset themselves to an idle stance if they have the required meter. And lastly, to test input windows, I included an attack that cancels into itself when the button press is timed correctly.
In the video, I show of all these mechanics, and how the player cannot move or attack when recovering from a previous dash or attack, unless using the cancel.
Comentários