• Advertisement
Sign in to follow this  

Fighting games

This topic is 3875 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi again ;). I've been playing mame , "Street fighters" to be exact...and while i was playing , i asked myself "hey,how they do it?" ,"how they track the key presses?". I do understand how a fighting game works , but i just cant figure out HOW they track the key presses. Anyone here willing to explain how they track the keys?

Share this post


Link to post
Share on other sites
Advertisement
You mean like for special move input? Just use an array that is large enough to hold the maximum input sequence. Whenever an 'action button' is pressed, you can just check the button presses in the array to see if it matches any attacks.

I remember Chun Li had a spinning kick attack that was down (2 seconds), up + K. So the users presses one of the kick buttons, and you check for "d(2)UK" in the array, to decide whether to launch a kick attack, or a special move.

Share this post


Link to post
Share on other sites
Thanks , i think i know how to do it ;).

Btw , i'll try to make a 2d beat em up in opengl with 3D worlds as background!! !! ..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement