Wednesday, 12 September 2012

Android SDL 2 gesture tester app

I've written and uploaded a simple free app to the play store, which allows someone to create a selection of gestures, and then to draw and see how well they get matched (or indeed, if the right ones even get matched).

In an ideal world, I'd be able to use this to author things like the Google maps pinch to scale in and out, or swipes to go from one page to the next.  Unfortunately, while simple letter shapes like N, Z, C, W and more match perfectly fine, the functional gestures like pinch to scale and swipe to switch get confused and don't seem to reliably distinguish between the direction of the actual gesture.

Hopefully I'll get feedback from the mailing list, and it'll be something I am doing wrong.  Otherwise there's a load more work in my future to use the Android Java-level gestures.

EDIT (19/06/2013): Published source code of latest released version.

Sunday, 9 September 2012

Android, libtcod & gesture support

I've the beginnings of a gesture experimentation prototype running on Android within the libtcod sample program.  Currently it just allows the authoring of a gesture, but it's fairly straightforward from there to have the user author several gestures, then draw something and see which gesture SDL detects that it should be.

The SDL 2.0 gesture support works wonderfully.  But unfortunately a little too wonderfully, even unknown gestures are matched and the aspect that would distinguish a bad match, seems to be broken.  Currently every matched gesture has an error of -2.0.  Something I apparently have to debug myself, using printf-based debugging as proper debugging does not work at the C level.

More to come..