There are some games where you need to make special movement with your mouse (spell casting or any other action).

Something like this enter image description here

So basically, how can I compare mouse movement to my pattern (let's say defined by series of points (x, y). I assume there's no need to track the position every frame, there must be an interval.

But in terms of technique, how can I do it?

  • \$\begingroup\$ I've seen it in an android game called Elementalist. I'm curious about it too. play.google.com/store/apps/… \$\endgroup\$
    – Henjin
    Sep 17 '17 at 14:02
  • 4
    \$\begingroup\$ Did you try googling mouse gesture recognition to get an overview of some of the existing techniques first? Is there a particular technique you've found in your research thus far that you need help implementing? \$\endgroup\$
    – DMGregory
    Sep 17 '17 at 14:56
  • \$\begingroup\$ If you're using Unity 3D this asset might help you. But if you're not, It will give you some insight.assetstore.unity3d.com/en/#!/content/65249 \$\endgroup\$
    – Henjin
    Sep 18 '17 at 3:52
  • \$\begingroup\$ @DMGregory ugh, I didn't know the name of it. Thanks! \$\endgroup\$ Sep 18 '17 at 4:25

I think the best way to solve this is by using a neural network that has been trained extensively on a lot of data. Draw your own shapes, make your friends draw them etc. It would then be able to guess which one the user tries to draw even if it's not perfect.

More info on how to model a neural network to recognize hand drawn shapes can be found here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .