$1 Unistroke Gesture Recognizer

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

$1 Unistroke Gesture Recognizer

Postby makism » Thu Aug 25, 2011 7:03 pm

Hello,

I needed some basic gestures for a game i am planning and i decided to implement (for fun mostly :D) a very common and fast algorithm called "$1 Unistroke Recognizer" on InputProcessor :-)
I thought it would be nice if someone found it useful so here it is.

Here is how it (obviously) works:
- Create a gesture and store it to a JSON file.
- Register the gesture to the Recognizer.
- When enough points are gathered and touchUp() is called, the recognizer will report a matching gesture.

For the time being, two sample gestures are available:
- triangle and
- chi
I will make a simple html-javascript to make it easy to produce Gestures in JSON format.

Begin by studying src/com/madroid/input/GestureRecognizerInputProcessor.java

There's a todo list for some features, optimizations & future plans.
Soon i will provide a complete Android example application.
Any comments and feedback welcomed.

Oh! The license is Apache 2.0...
makism
 
Posts: 4
Joined: Mon Aug 01, 2011 12:12 pm

Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest