   Input system in fighting game
  Hi,I am having problem in implementing the correct way for input system in fighting game.I am following this method http://creators.xna.com/en-US/inputsequencesample (in xna) but changed it to C++.Now, I have managed to detect different moves.But then I still have problems.Let me explain it using codes.initialize list of moves:init(){// Create a list of movem_MoveList = new MoveList();m_MoveList->insert(new Move("Punch", 1, Key::ONE));m_MoveList->insert(new Move("Kick", 1, Key::TWO));m_MoveList->insert(new Move("Jump", 1, Key::UP));... // move moves}update function:update(){// update other objects...// check key input expiresif(keySeq->expires())keySeq->clear(); // clear the existing sequence of input// Get move based on current key sequenceMove move = m_MoveList->detectMove(keySeq);// Play this movecharacter->play(move);}keypresses:joystickPressed(){// detect different key pressed on joystickif(up is pressed)keySeq->insert(Key::UP);// etc..}My problems starts when i have key input that starts with the same sequence.For example, jump -> Key::UP, and i have side step -> Key::UP + Key::UP.Anyone has a suggestion for a better way to implement this?Thanks.   
  Add a delay to when the sequence is completed.egbuffer the Up, then wait X millisecond for another input. If nothing comes along then the sequence is completed.   ;Quote:Original post by Andrew KabakwuAdd a delay to when the sequence is completed.egbuffer the Up, then wait X millisecond for another input. If nothing comes along then the sequence is completed.yes, there is actually delay and i did check if current input sequence expires().;  What he's suggesting you do is allow moves to be processed even after a certain age, and for your character's pose to be stateful.For example, when Key::UP is processed from a standing, resting state, put your character into a "heels lifted" state. That state itself expires after 80 milliseconds or so; if since "heels lifted" was entered the player has pressed Key::UP again, then it transitions into a sidestep motion. If not, then it transitions into a jump motion.   