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 / Multitouch?

Author
Message
Impetus73
8
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 22nd Oct 2011 11:50
How do I detect and handle multitouch? Is it even possible?

Say, I want a game where the device is laying on a table, and two players are sitting on the opposite sides of the device screen, each controlling a pad. How can player 1 move his pad on the screen, even if player 2 is pressing on his side of the screen?

As it is now, only one touch event can be tracked...

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Mobiius
Valued Member
17
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd Oct 2011 12:13
When I used an HP TouchSmart multitouch machine, AppGameKit reported that multitouch was not supported, when it was. Perhaps it's the same issue?

My signature is NOT a moderator plaything! Stop changing it!
Hodgey
10
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 22nd Oct 2011 12:18
You might need to use platform specific commands like GetRawTouchCount().

Paul Johnston
TGC Developer
17
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Oct 2011 04:37 Edited at: 23rd Oct 2011 04:59
The Windows platform does not currently support touch screens, hopefully we can get that into a future update.

Here's some code that demonstrates how you can use the multitouch commands

LeeBamber
TGC Lead Developer
20
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 23rd Oct 2011 05:53
Thanks Paul, I am uploading a video of this working onto You Tube so check that out in a few hours. You'll find it hosted on our TGC you tube page but I will also tweet it when it's finished uploading. As I stress in the video, multi touch is a very cool thing but be warned that any app that uses the raw commands throws away the guarantee that your app can run fully on EVERY device. Many devices including most desktops cannot perform any kind of multi-touch operation so your app may not work fully on those systems. If you DO want to use multi-touch, I suggest adding it as an extra mode of play. There is a command in AppGameKit which can detect for the presence of multi-touch. Have fun!

I drink tea, and in my spare time I write software.
Impetus73
8
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 23rd Oct 2011 15:10 Edited at: 23rd Oct 2011 15:10
Brilliant Paul! I'll play more with your code later, when I'm done with my WIP

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.

Login to post a reply

Server time is: 2020-04-05 13:51:09
Your offset time is: 2020-04-05 13:51:09