Gesture Recognition!!!!!!

Talk about making games.

What do you think?

Couldn't be better!
1
20%
Very good
3
60%
Good
1
20%
Average
0
No votes
Bad
0
No votes
Very bad
0
No votes
Couldn't be worse!
0
No votes
 
Total votes : 5

Gesture Recognition!!!!!!

Postby Joshua Worth » Mon Apr 17, 2006 6:44 am

I have created a gesture recognition program that only requires ONE object! The pacman in the middleis the object that does the recognition. The objects in the lower left hand corner are just debugging. The gesture gets put into a string called "gesture". In the string, u means up, d means down, l means left and r means right(the initials of the directions). Usually you have to do somthing, for example, like this
Code: Select all
if (strcmp(gesture, "udlrd") == 0){
    ExitGame();
                          }

to see if the gesture is Up, down, left, right, then down, and thaen close the game if it if true.

Get it here: http://www.worth.id.au/~joshua/gesturerec.zip

:wink: :) :D ENJOY :D :) :wink:
Stay sweet
User avatar
Joshua Worth
 
Posts: 515
Joined: Tue Jul 19, 2005 12:00 am
Location: Stralia
Score: 5 Give a positive score

Postby DilloDude » Tue Apr 18, 2006 4:42 am

Pretty cool! The next step would be to recognize diagonals, and have it draw on a canvas the shape you draw so it looks like it recognizes the shape rather than a series of directions.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Tue Apr 18, 2006 5:05 am

Diagonals are pretty trick; maybe it would be easier to use a slightly different script for them.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Joshua Worth » Wed Apr 19, 2006 8:09 am

Divide it by 8 instead of 4
Stay sweet
User avatar
Joshua Worth
 
Posts: 515
Joined: Tue Jul 19, 2005 12:00 am
Location: Stralia
Score: 5 Give a positive score

Postby DilloDude » Wed Apr 19, 2006 9:25 am

I did try that, but I think it might be better to find out if it is in a certain range of angles.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest