Archived

This topic is now archived and is closed to further replies.

Codejoy

Getting mouse gestures

Recommended Posts

Hello, I am sure a good number of us have played black and white, and I am asking how ddid they do that?getting the mouse gestures. My guess would be they stored all the mouse x,y coords into some array then perform a series of "unit" tests on those cordinates to determine what gesture was preformed. IE for the circle gesteure, they then draw an imaginary cross to see if if it intersects x many times on the inputed mouse coordinates, if so then it was a circle gesture. Does this sound correct? or did they do it a different way you think? Extremely curious, Shane

Share this post


Link to post
Share on other sites
Short vector mathematics I think. It just pulls around every x-distance travelled, and then looks at the "corner" between that line and the previous line.

[EDIT:]

Okay, that didn't make any sense. Okay, what it does (I think) is store the distance and speed that mouse travels over the screen. Every n-units (depends on distance and speed) it stores the location of the mouse over the map. It then checks what the angle is between the last drawn "line", and the one before that, and then stores that angle as well (or perhaps only if it was positive or negative)

-Maarten Leeuwrik
=================
[Illiad] J.R.R TOLKIEN ACHIEVES 40,000 RPM IN GRAVE

Edited by - ronin_54 on February 21, 2002 12:36:44 PM

Share this post


Link to post
Share on other sites