Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Tilt/Shake commands?

Author
Message
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Nov 2012 02:30
Does AppGameKit have the ability to check if the device was shaken or tilted to the left/back/forward/right?

Cheers.

God help me, Please.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Nov 2012 03:29
Yes, just look in the input section of the documentation. There are numerous ways to do it, getdirectionangle() being one for instance.

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Nov 2012 04:16
How about detecting if the device can use tilt/touch/keyboard/joystick and using specified controls per device. Do how to use windows 8 touch and give the keyboard option at the same time.

Cheers.

God help me, Please.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 13th Nov 2012 05:17
Quote: "Do how to use windows 8 touch and give the keyboard option at the same time."

I think AppGameKit is still catching up to Windows 8. I haven't personally used W8 yet and I'm waiting for TGC to finalise v108x so I can't comment on how the beta performs on windows 8. I have heard touch is functional, not sure about tilting and shaking. However, Lee has shown some very promising progress in regards to AppGameKit running on windows 8. In his blogs, he demonstrates most of the features you've just asked about. At one point he made use of shakes but decided it wasn't exactly a good idea with ultrabooks.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Nov 2012 08:59
There is an extra download with Beta 3 for the sensor commands. It has all of the above for Windows 7 and 8 only - you sacrifice backwards compatibility with previous versions.

I have not found a way to detect whether the hardware is touch compatible. Touch commands work, not sure how you decide which way to go in your code. I have made my own routine for detecting swipes etc so that one routine works with all.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Nov 2012 10:53
The extra download is for T1 only though, there is no T2 support for sensors on windows
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Nov 2012 15:30
Quote: "T2 support for sensors on windows"

This applies only to v108<x>.

Tier 2 works for v1076 and there are templates available for the platforms currently supported in v1076 at this site and page.

I have Windows 7 and a touch screen and the basic touch commands work okay in v1076.

I haven't tried Windows 8 (and won't for quite a while), so I don't know how well v1076 works with Windows 8.

Cheers,
Ancient Lady
AGK Community Tester
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Nov 2012 19:11
Touch commands do not work, you have to double tap to create a touch event, which is just emulating a mouse click, which is no good. single tap does not work unless you do it manually and create a lot of code.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Nov 2012 22:20
Quote: "I have made my own routine for detecting swipes etc so that one routine works with all."


What do you use, and how do you know it works windows 8.

Quote: "Touch commands do not work, you have to double tap to create a touch event, which is just emulating a mouse click, which is no good. single tap does not work unless you do it manually and create a lot of code."


People who submitted to the Intel AppUp had to make sure touchscreen worked somehow to even be considered so I'm not sure about your post.

Cheers.

God help me, Please.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Nov 2012 22:40
Quote: "What do you use, and how do you know it works windows 8. "


I use the method shown here, with the code posted a little further down.

I have it running on the Ultrabook and Windows 8 in desktop mode.

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 13th Nov 2012 23:08 Edited at: 13th Nov 2012 23:09
Oh so you do it the way as in you have it set to move the mouse where you touch and if the mouse is on a button it registers. Did you have to use the beta to do that? Also, did your code automatically hide the mouse if the screen was touched? Does it know when to hide the mouse and show the mouse? If so how?

Cheers.

God help me, Please.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Nov 2012 11:51
The getPointerReleased() is the only method available to you without the touch commands, nothing else registers.

When getPointerReleased() is triggered, AppGameKit has already moved the mouse position for you. You don't need to adjust it.

I have a menu command where the user can state whether they are in Mouse or Touch mode. I'm sure you could be smarter by analysing the first few activities and working out if the pointer is jumping from place to place too fast to be a mouse. Once you are sure, you could hide the mouse icon.

BUT the problem you have here is that until you've decided, only swipes work and not clicks. My buttons react to the mouse wandering over them (they expand by 10%). So I have a predicament where the buttons may not react to a mouse hover if I try to be more intelligent about it.

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 14th Nov 2012 14:22
Oh I see, thanks for the help. I'll try to add this to my code and let you all know how it goes.

Cheers.

God help me, Please.

Login to post a reply

Server time is: 2024-11-24 01:31:25
Your offset time is: 2024-11-24 01:31:25