Sign in to follow this  
lodoss118

Game Input - Fighting game

Recommended Posts

Hi i am trying to make a input similar to the one found in fighting games what i done is basically wrapped every button, diagonal presses into a buffer, and this buffer is comapred to a predefined combo buffer, this is what i done for every press, must be every one press, the combo is being compared to the previous input, if it is correct, it performs the combo, i am having problem with this technqiue if i use the below method, if i try doing diagonal presses i.e UP_LEFT, it hardly registers, at the moment i am using one timer for performing the move i.e how long u have.

if(m_ReadType == BUFFERED)
		{
			if(presses == 1)
			{
				if(moveBuffer == CurrentMoveQueue())
				{
					m_MoveStatus++;

					if(m_MoveStatus == GetMoveSize())
					{
						wprintf("\n\nName:%s -     COMBO\n\n", GetMoveName().c_str());
						m_MoveRegistered=true;
						m_MoveStatus=0;
						m_MoveTime[0]=0;
						m_Timer=false;
					}
				}
				else
					m_MoveStatus=0;
			}
		}


it seems the only way to register diagonal presses like UP_LEFT is to get rid of the pressed function and also the else m_MoveStatus=0; otherwise it won't register.

Share this post


Link to post
Share on other sites
I think the reason noone has answered your post is because they can't really make sense of it. You might try asking your question again in a simpler way.

Share this post


Link to post
Share on other sites
Theoretically, This is what you are saying:

You want your fighting game to have button press combos.
You want to know how to detect when the player has pressed the correct combo.

Is that what you want to do? I have some suggestions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this