Lua-gestures: effortless recognition of trained single-stroke gestures

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
josip
Prole
Posts: 21
Joined: Tue Oct 03, 2017 1:55 pm

Lua-gestures: effortless recognition of trained single-stroke gestures

Post by josip »

Hi there. I published this project today:

https://github.com/jmiskovic/lua-gestures

It is a library for training and recognizing single-stroke gestures, based on very efficient "$1 Unistroke Recognizer" algorithm. The library comes with basic set of gestures, and you can dynamically add your own ones.

Image

This could come handy for those games where you conjure magic by drawing runes, or for mobile-based text entry, or for quick mouse/touch shortcuts inside any design tool.

I'm not author of original algorithm or of Lua port. I merely fixed some bugs, adapted the API to fit better with Love and made the simple demo. I hope somebody finds a use for it.
User avatar
darkfrei
Party member
Posts: 1204
Joined: Sat Feb 08, 2020 11:09 pm

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by darkfrei »

I like it! Can you attach a .love file?
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
Gunroar:Cannon()
Party member
Posts: 1143
Joined: Thu Dec 10, 2020 1:57 am

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by Gunroar:Cannon() »

Nice, this seems really useful!
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by monolifed »

link to the original code for reference:
https://depts.washington.edu/acelab/pro ... index.html
josip
Prole
Posts: 21
Joined: Tue Oct 03, 2017 1:55 pm

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by josip »

I've made some more improvements over last days.

Recognizer can now use oriented gestures. This makes it possible to distinguish between larger number of trained gestures, for example '7' and 'L' will be correctly identified.

Another option added to recognizer is ability to work with very thin gestures like 'I' and '-'.

LOVE demo app has now grown into a basic gesture studio. It can browse defined gestures, add new ones and export the collection to console.

The library documentation is improved.

Image
Last edited by josip on Sun Jun 27, 2021 8:30 am, edited 1 time in total.
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by ReFreezed »

Nice! I'm having visions of new game projects.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by togFox »

I can see this being a lot of fun with tablets and mobile devices.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
monolifed
Party member
Posts: 188
Joined: Sat Feb 06, 2016 9:42 pm

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Post by monolifed »

* made it use flat arrays for points
* moved functions around (a lot)
* tried to reduce the creation of new (temp) tables
* noticed a typo in recognize score before return ("/" instead of "-")
* probably some other minor optimizations

https://github.com/monolifed/lua-module ... stures.lua
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests