Jump to content
  • Advertisement
Sign in to follow this  
BeanNeophyte

Mouse gestures with SDL

This topic is 4772 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

Advertisement
Good work, BeanNeophyte. I remember trying to implement mouse gestures ages ago, and I never even thought of doing it this way. The result was a horribly slow thing that usually took about 30 seconds to get something simple done.

You could also modify it a little so that it uses a binary 'or'ing based upon the direction (for example, left=1, right=2, up=4, down=8), that way you can overwrite parts using different directions to make the gestures a little more complex.

For those of you that can't read that article (myself included): if you've ever wondered how the mouse gestures in games like Black and White were done, they're probably similar to this.

Share this post


Link to post
Share on other sites
Thanks alot Gorax :)

Quote:
Original post by Gorax
You could also modify it a little so that it uses a binary 'or'ing based upon the direction (for example, left=1, right=2, up=4, down=8), that way you can overwrite parts using different directions to make the gestures a little more complex.


That also came to my mind when I wrote the article. I will write a more advanced one including things like that and maybe some sort of learning-module to adjust the error-tolerance for the user. I will probably translate it into English too, but be warned, my English is not the best :)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!