How do I draw/read touch gestures?

  • I think a question of something similar has been asked and answered, but mine is different:

    So, say I want the system to perform an action when a circle is drawn on the screen, in the middle. I want to be able to draw a circle on the screen, then, as soon as you stop drawing it, the system would read the canvas and say "well hey that's a circle" and associate that with a certain action.

    Basically, I want to have the system associate different hand-drawn symbols with pre-programmed symbols, and perform an action after the user-friendly symbol is associated with the system's symbol in its memory.

    Can I do this in a practical way, and if so, how would I go about doing this?

  • This is a real tough thing to program and that's probably why you didn't get any responses yet.

    If you are trying to do this as a hobbyist, you would probably be better off trying to control the input by a different system.

    This requires a really good, strong and complex algorithm. It is possible, but the only useful stuff I found when googling for this was by university professors. (e.g. here)

    If this is doable at all, there are probably just a few people in this forum who can help you, most likely R0j0hound.

    I don't want to crush your "dreams", but I think you would make life a lot easier for yourself if you considered a different approach.

  • I made a very rough and quick version of how I would do gestures. feel free to give it a try/look.

    I suggest clicking once before doing anything. This clears the screen.

    browser test

    https://tylermon2.itch.io/gesture-test

    password: construct

    capx

    https://dl.dropboxusercontent.com/u/583 ... 0test.capx

    -----------------------

    Some explanation of that implementation. Basically, I have shapes or gesture symbols created. if the touchpoints follow along the general shape, then a gesture action can be performed.

    If I were to take it a step further I would have the gesture shapes try and resize themselves to see if it can find a better gesture match.

    I would also have the gesture symbol flip and rotate a few times to attempt and find a better match.

    To take the accuracy even further I would place image points on key locations to each gesture and make sure a touch point falls within that area. This would help in accurately determining a gesture.

    Im sure there are also other ways to go about this, but this way is quick and mostly effective.

  • take a look here

  • Aight, thanks for all your responses. Tylermon, thanks a bunch, I'll try your .capx out in a bit. randomly, thanks for the link, and I'll probably check with r0j0 at some point to see if it's able to be made in C2. Laurent, thanks for the link as well, I'll check out the plugin.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Tylermon, just checked out the browser preview, this is really great. I understand what you mean by "touch points", so I'll see if I can build off this. Thanks a lot ^-^

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)