• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Tap won't work on Windows Touch platforms.

C

ctooner

Guest
I was never able to figure how to get a single tap to work on Windows touch platforms with GameMaker 1 - "left pressed" always required a double tap. I had high hopes when version 2 implemented the gestures functions. I have the same problem - if Tap is used, and the windows platform is generated, it requires a double tap. In addition, if Tap is used instead of "left pressed", performance is terrible when using the mouse - almost has to stop and think before acting. I must be doing something wrong and would very much appreciate assistance.
 
P

Pudsy

Guest
I haven't tried this myself in GMS2 yet, but I'd be interested to hear how this pans out...

I'm aware there are some Windows games (not of GMS origin) where this same issue is (or was) present (requiring a double-tap in order to register a left-click on Windows touch devices).
Some of those games were since patched to fix the issue, presumably as ownership of Windows-based tablets etc. increased.

Maybe there's some "gotcha" or weirdness in the relevant API/somewhere that's causing the same issue to crop up, potentially with various engines (or native code), not just GMS.
Something with the way you need to handle a "touch" event vs. a "click".

I remember "FTL" had(still has?) this issue, and here's a similar discussion, mentioning both "Darkest Dungeon" & "Banished" as having the issue some time ago...
https://www.reddit.com/r/gamemaker/comments/4ilvlo/touchscreen_issue_single_click_single_touch/
...I'm sure there are plenty more.

I remember spending some fiddling with Windows touch settings, eg. turning off "hold to right click" and similar, but no joy there.

Anyway, given that it's been fixed in some of those other non-GMS games, it should hopefully be something that's fixable here too.

The "terrible performance" thing sounds more serious... possibly related though?

EDIT: Actually, I'm now remembering more clearly... the specific issue with those other games was that, when you perform the 2nd "tap", the game would then register as if you had "clicked" at the point on the screen where you made the 1st "tap". As if API/game had only registered a "mouse button pressed" event on the 1st tap, and was waiting for a "mouse button released" which came from the 2nd tap, but then took the screen coord from the 1st event. Does that sound like how it works in GMS2?
 

rwkay

GameMaker Staff
GameMaker Dev.
Currently we do not support touch events on Windows desktop platform, though that is coming in the future. We do emulate taps through mouse events, but I know that Windows handles the touch -> mouse event conversion in a bit of a crazy way (that I am sure made sense to the designers and works for many legacy apps, but is not always intuitive). We do handle the touch events correctly for UWP applications though

We have fixed an issue with the Tap event where it would not deliver the tap event until the timeout for a double tap had passed (we now deliver the event immediately but with an incrementing tap_count value for each event that happens before the timeout has expired, so you can now get triple and quadruple clicks), this will be in the next public release.

Russell
 
P

Pudsy

Guest
That's good to hear Russell. The tap_count thing sounds like a decent way to cater to various requirements (instant response, but can adapt/change behaviour if more taps are received soon after).

Hopefully once we get proper touch event support, that will sort out the issues @ctooner is having.
 
C

ctooner

Guest
Currently we do not support touch events on Windows desktop platform, though that is coming in the future. We do emulate taps through mouse events, but I know that Windows handles the touch -> mouse event conversion in a bit of a crazy way (that I am sure made sense to the designers and works for many legacy apps, but is not always intuitive). We do handle the touch events correctly for UWP applications though

We have fixed an issue with the Tap event where it would not deliver the tap event until the timeout for a double tap had passed (we now deliver the event immediately but with an incrementing tap_count value for each event that happens before the timeout has expired, so you can now get triple and quadruple clicks), this will be in the next public release.

Russell
Thank you Russell - I anxiously await the fix. The tap event problem was exactly as you describe - seemed to be waiting to see if there was a second click. I do have an app where I draw a sprite to GUI and look for mouse clicks that seems to respond to the first tap...other buttons in a different room in the same app though do not... Thanks for your response.
 
Any word on this? It's not reasonable that Windows 10 tablets/touchscreens are not properly supported at this point in time.
 

rwkay

GameMaker Staff
GameMaker Dev.
It is on our roadmap... no word on when it will be implemented though.

Russell
 

offalynne

Member
pardon thread necro but since this shows up in search results, as of runtime 2.2.2.326 touchpad taps still don't read as clicks under windows target.

they can be caught by counting `mouse_check_button_pressed(mb_left)` and `mouse_check_button_released(mb_left)` each frame; a tap has occurred when upon release, releases exceed presses. on registering a tap, reset the counters.
 

Japster

Member
@offalynne ... no no, necro is good mate...

...been banging my head against a brick wall wondering why touch-screen double-tap etc are so hit and miss, so gonna try this! - much appreciated....
 
Top