Mouse gestures with SDL
Again a tutorial from me www.gamelib.de/artikel/gesten.html
This time I translated the comments on the sourcecode into English :)
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.
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.
Thanks alot Gorax :)
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 :)
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 :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement