Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Apple iPhone/iPad/iPod

Gestures library

iOS Development and xCode questions

Gestures library

Postby Greg » 20 Jan 2009, 13:30

I realize there is a focus on cross-platform development with ShiVa, but there are some areas that are iPhone specific that are going to have to be addressed.

The first is obviously the keyboard. The one with iBall3d is OK, but proper keyboard implementation is a must - and I've read that you're working on it which is great.

The second is gestures. Directional swiping is easy enough to figure out, but it would be wonderfully handy to have a simple set of calls to find out if the user drew a semi-circle in a particular direction, or completed an L shape. I suppose my question is, is this something you have considered or do you feel it is not as important as other things to implement?

Thank you in advance for your response.
Greg
Fresh Boarder
Fresh Boarder
 
Posts: 9
Location: USA

Re:Gestures library

Postby berdal84 » 20 Jan 2009, 13:42

Sorry to answer before a Shiva's developper.
I think, simple gesture like circle, L, are not realy complex to recognise:

I've read a pdf document one day that explain how to do that:
Imagine each gesture is made by drawing lines betwween each new position handled by the onSequenceChange handler: like in this picture: Image
My Games : https://play.google.com/store/apps/developer?id=B%C3%A9renger%20DALLE-CORT&hl=fr
User avatar
berdal84
Platinum Boarder
Platinum Boarder
 
Posts: 671

Re:Gestures library

Postby berdal84 » 20 Jan 2009, 13:48

What you just have to do to regconise the gesture is:

- Get the Start vector ( the red one )

- Get all angle between each vector ( angle v0-v1, angle v1-v2, etc...)

- Ignore low angle values with an threshold angle ( ex: 5° )

- Compare the values ( start vector, and angles ) with each gesture in your gesture database ( ex: the tested gesture match 50% with "I" and 90% with "L")

- Get the gesture witch best correspond (best %) to the tested gesture



There is two other ways to recognise gestures :

1- imagine your gesture sensitive zone is splitted in 3x3 (9 boxes)
You can analyse the gesture to kwnow in whitch part is the first and the last point of the gesture.

2- imagine your gesture sensitive zone is splitted in 20x20 ( 400 boxes)
For each gesture point, fill the boxes with values ( 0 to 9):
Like that: 0 -> the point is very far of the box
5 -> the point is near of the box
9 -> the point is in the box
The compare whole box values with a database, and get a % of match again.


Finaly, to have the best matching system, use the 3 algorythms on the same tested gesture. And compare the % for each of them.
My Games : https://play.google.com/store/apps/developer?id=B%C3%A9renger%20DALLE-CORT&hl=fr
User avatar
berdal84
Platinum Boarder
Platinum Boarder
 
Posts: 671

Re:Gestures library

Postby Greg » 20 Jan 2009, 13:52

Thank you berdal.

This is the way we figured to do it. I was however curious if a standard was going to be developed.


Cheers.
Greg
Fresh Boarder
Fresh Boarder
 
Posts: 9
Location: USA

Re:Gestures library

Postby berdal84 » 20 Jan 2009, 14:02

I was however curious if a standard was going to be developed.


I'm agree with you :)

But, If not: Why don't we started to develop it (in open source way) ? I'm very interested by that.
My Games : https://play.google.com/store/apps/developer?id=B%C3%A9renger%20DALLE-CORT&hl=fr
User avatar
berdal84
Platinum Boarder
Platinum Boarder
 
Posts: 671

Re:Gestures library

Postby Greg » 20 Jan 2009, 14:05

My thoughts exactly berdal!

We'll definitely be contributing to the wiki, but making a library in this way would be great. My team started off as modders many years ago so we're very community oriented. If you'd like to collaborate on this, feel free to email me at greg@forgestudios.com
Greg
Fresh Boarder
Fresh Boarder
 
Posts: 9
Location: USA

Re:Gestures library

Postby philip » 20 Jan 2009, 18:53

Hello Greg,

to simply answer to your question, yes we are working on a simple gesture API.
but it's not really simple, and it's quite crossplatform.

gesture can be made with mouse cursor, with iphone, wiimote or sixaxis joypad, or all other kind of advanced virtual immersive reality device.

so, for us, it's a cross platform data to manage, and to manage with all the deepth that the gesture need to have.

so, if you are quite hurry, you should try to develop a StoneScript library (open source? :D). we will help you the best we can.
philip
Platinum Boarder
Platinum Boarder
 
Posts: 619

Re:Gestures library

Postby Greg » 20 Jan 2009, 19:16

Thank you very much Philip. Your active development is comforting. I own too many game engine licenses for now-defunct engines that never made it far enough to be useful, so this is refreshing.
Greg
Fresh Boarder
Fresh Boarder
 
Posts: 9
Location: USA

Re: Re:Gestures library

Postby djey » 10 Oct 2011, 08:19

philip wrote:Hello Greg,

to simply answer to your question, yes we are working on a simple gesture API. [...]


Hi,

Any news about such a library ? ;) I was searching for gestures handling (snippets, api) in the forum when I found this hopeful topic.

Best,
djey
Senior Boarder
Senior Boarder
 
Posts: 74

Re: Gestures library

Postby djey » 06 Feb 2012, 12:09

hi,

Just to "up" this topic... Any news about this gesture lib?

Best,

J.
djey
Senior Boarder
Senior Boarder
 
Posts: 74


Return to Apple iPhone/iPad/iPod

cron