Hadouken! - Combat Prototype v0.3.0: Special Moves
In the latest update I've implemented a system that I'm quite proud about: Special Moves.
The idea is that the player will be able to cast special types of moves and actions by combining simple actions. With that we are now able to cast Hadoukens!
How it works?
The system works in such a way that we can define a set of special moves using the SpecialMoves resources, then we define in the ActionBuffer which actions shall be buffered, for instance we don't want ui_* actions to enter in the chain, this will create a chain of actions that the player performed, cleared after some time of inactivity. This ActionBuffer then notifies the ActionChainSolver about the current action chain, which then treats the chain to remove indexing characters, so that punch_1 and punch_2 are understand as the same punch action, allowing for the use of this system in multiplayer games where punch_1 is defined for the Player 1 and punch_2 is defined for Player 2, but in the SpecialMoves you can simply use "punch", for example.
The ActionChainSolver tries to figure out if the current chain contains any of the special moves defined in the SpecialMoves resource currently attached to it, meaning that you can create a range of different SpecialMoves, for example if you want to have different characters with different special moves, or maybe different weapons that each has a different set of special moves.
When the ActionChainSolver solves the puzzle, figuring out a special move matching the current action chain, it then screams the name of the special move (i.e. emits a signal containing the name of the key in the SpecialMoves that the value is contained in the current action chain), and here the system closes itself.
We can then use this piece of data in another class to tell what should happen if a given special move was executed. In my case I called that class SpecialMoveCast, because it takes the data emitted by the ActionChainSolver and cast a skill based on that.
All this work and much more is being backed by my beloved patrons, so if you want me to create more of this and make it available for everyone to use, consider becoming my patron, check out the goals to see what I am planning to do with your support. The rewards are passing through a redesign tho!
Consider downloading the current Combat Prototype demo, test it and let me know what do you think about it, also try to put this system to test in your own games and let's see how it behaves outside the boundaries of Kitchen Tales!
That's it, thanks for reading, keep developing and until the next time!
Get Kitchen Tales
Leave a comment
Log in with itch.io to leave a comment.