Fighting Game and input buffering
Posted
by
Pilispring
on Game Development
See other posts from Game Development
or by Pilispring
Published on 2012-11-13T10:52:44Z
Indexed on
2012/11/13
17:19 UTC
Read the original article
Hit count: 454
In fighting game, there is an important thing called input buffering. When your character is doing an action, you can input the next action that will activate as soon as possible (the buffer is 5-10 frames).
Is anyone had already done it or knows the most efficient way to do this?
I thought of things like that:
Enum list moves (a list of all my moves)
if (moves = fireball)
{
if (Mycharacterisidle)
{
Do the fireball
}
else if (MycharacterisMoving)
{
if (lastspriteisnotfinished)
{
InputBuffer++;
}
else if(spriteisfinished && InputBuffer < 5)
{
Do the fireball
}
}
}
Any better ideas? Thx.
© Game Development or respective owner