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.
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.
Lua-gestures: effortless recognition of trained single-stroke gestures
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
I like it! Can you attach a .love file?
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
Nice, this seems really useful!
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
link to the original code for reference:
https://depts.washington.edu/acelab/pro ... index.html
https://depts.washington.edu/acelab/pro ... index.html
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
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.
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.
Last edited by josip on Sun Jun 27, 2021 8:30 am, edited 1 time in total.
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
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."
"If each mistake being made is a new one, then progress is being made."
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
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
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
Re: Lua-gestures: effortless recognition of trained single-stroke gestures
* 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
* 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
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests