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 / [SOLVED] Android - How To Get Two Separate Finger Presses Simultaneously?

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 19th Nov 2019 20:32
Hi,

We are starting our next AppGameKit Classic game called: "Mortal Pongbat™".
Game will be made for HTML5 Internet browsers and Android mobile devices.

The game is a two player simultaneous "Pong" inspired game.
On HTML5, the input would be keyboard and mouse.

On Android, we need multi-touch, which we have never done before.
Can someone post a code example of getting two separate finger touches simultaneously?

Game will be played in portrait mode.
Player one will be the bottom and player two will be the top.

Any easy way to do the above?
Let us know, thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Nov 2019 20:44
Multi touch. Not sure if it works with HTML5
The attached comms app shows communication between two devices over a LAN.
I'm not sure what you would need to do over a WAN or even if it works with HTML

Attachments

Login to view attachments
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 20th Nov 2019 02:04
Hi,

Just need mutli-touch (2 separate fingers) on Android.

Read through the link, but am confused.
Can someone show a small code example of getting two simultaneous screen taps on Android?
(one finger would be at bottom of screen and the other finger would be at the top of the screen)

Thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com

Attachments

Login to view attachments
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 20th Nov 2019 08:15 Edited at: 20th Nov 2019 08:17
This post has been marked by the post author as the answer.
Documentation example works.
https://www.appgamekit.com/documentation/Reference/Input-Raw/GetRawFirstTouchEvent.htm

Test:
http://freddycrabs.ru/html5/index.html

https://www.instagram.com/qugurun/
AliceSim1
5
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 20th Nov 2019 17:02
Good question and solution! : D
Very useful on touch platforms: smartphones / tablets
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 20th Nov 2019 19:39
Good stuff Qugurun
Thanks for the response!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 21st Nov 2019 15:51
Hi,

Tried the code, it works - many thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com

Login to post a reply

Server time is: 2024-04-20 01:08:26
Your offset time is: 2024-04-20 01:08:26