Hello people! I'm working on a fighting game just for learning purpose.
I'm trying to make a melee combat combo system, just like old Mortal Kombat games.
Been searching around and in generally, it's all about saving the last pressed keys, clear the buffer after some time and check if match any combo. It works well for combos performed after a specific input sequence, scorpion spear as an example:
Back, Back, Low Punch -> do_spear()
The problem is when it comes to more complex combos. I'll use scorpion as an example again. In addition to the special moves (like spear), we also have basic combos that are basically a sequence of attacks that will perform a different animation, for example:
High Punch, High Punch, High Kick, Back + High Kick
The difference here is that we have to press the last key, High Kick, while Back is being hold down or at same time, it doesn't matter. Also if you hold Back since the first or any other key it doesn't break the combo as it would do in "specific input" combos like the spear one.
There are many other "ramifications" so to say, just playing the game to know exactly what I mean. But anyway I hope you guys understand and have some ideas and suggestions to share. Thanks in advance