HTML5 Touchscreen error

Hi everyone,

I have a question about HTML5 games/applications. I create educational tools to show in classes on digital boards, where most of these boards have a touchscreen. In the last updates of GMS2, I found out that the mouse click events are not recognized by the digital boards.

A fellow developer told me (who does not work with GMS2) that the touch event appears to be registered, so the mouse_x and mouse_y are recognized, but the actual clicking event is not transferred to GameMaker. The problem should be similar to this article: https://stackoverflow.com/questions...-touchevents-in-javascript-on-android-devices Since this article’s solution was successfully applied by another (non-GMS) developer, I tried it as well but I have no clue how to implement it because GameMaker generates the Javascript code itself.

To summarise, my HTML5 games can register mouse clicks on mobile phones, computers, laptops, iMacs, etc. but fail to register touch events by large digital touchscreens (55 – 65 inch) in school classes. I want to stress that the mouse is working (because the location of the mouse can be retrieved using mouse_x and mouse_y) but the clicking is not. Is anyone familiar with this issue or can point me into the right direction? I’ve asked a few fellow developers but until now, I haven’t found a solution.

Best,
Dennis
 

rIKmAN

Member
Hi everyone,

I have a question about HTML5 games/applications. I create educational tools to show in classes on digital boards, where most of these boards have a touchscreen. In the last updates of GMS2, I found out that the mouse click events are not recognized by the digital boards.

A fellow developer told me (who does not work with GMS2) that the touch event appears to be registered, so the mouse_x and mouse_y are recognized, but the actual clicking event is not transferred to GameMaker. The problem should be similar to this article: https://stackoverflow.com/questions...-touchevents-in-javascript-on-android-devices Since this article’s solution was successfully applied by another (non-GMS) developer, I tried it as well but I have no clue how to implement it because GameMaker generates the Javascript code itself.

To summarise, my HTML5 games can register mouse clicks on mobile phones, computers, laptops, iMacs, etc. but fail to register touch events by large digital touchscreens (55 – 65 inch) in school classes. I want to stress that the mouse is working (because the location of the mouse can be retrieved using mouse_x and mouse_y) but the clicking is not. Is anyone familiar with this issue or can point me into the right direction? I’ve asked a few fellow developers but until now, I haven’t found a solution.

Best,
Dennis
What functions are you using to try and detect the clicks / touches?

Have you tried the device_mouse_* functions rather than just the regular mouse_check_* functions?
 
Hi rlKmAN,

I tried both functions. Same result... I hope someone could help me. But first of all i used te work with the mouse_click functions.

Greets,
Dennis
 

rIKmAN

Member
Any idea?
Sorry, I didn't get a notification as you didn't quote me or @ me in your reply.

If you say it worked in previous versions then it has to be an internal change of some sort so the only suggestion I'd have is to rollback to that working version and file a ticket with YYG stating the version numbers and behaviour change and seeing what they say.
 
Sorry, I didn't get a notification as you didn't quote me or @ me in your reply.

If you say it worked in previous versions then it has to be an internal change of some sort so the only suggestion I'd have is to rollback to that working version and file a ticket with YYG stating the version numbers and behaviour change and seeing what they say.
Thanks for your advice. But also old tools (didn't update with newest game maker) don't work anymore. Like the canvas game maker is making doesn't recognize de touch at al... haven't changed anything.

Greets, Dennis
 

rIKmAN

Member
Thanks for your advice. But also old tools (didn't update with newest game maker) don't work anymore. Like the canvas game maker is making doesn't recognize de touch at al... haven't changed anything.
If the old versions used to work and you haven't changed anything then I'm not sure what the issue it if they no longer work.

Maybe installing newer versions updated some component / libraries, Windows Update automatically updating drivers or something similar?
 
Hi everyone,

I'm back, still trying to fix this problem. On an windows 10 device the touch events (left pressed, device pressed enz.) doesn't work. However, MouseEnter events seem to register when I touch the screen. I have to use a physical mouse to LeftPressed events to register.


Is there an solution for this problem, because I have a lot of smartboard tools on my website, and nothing is working anymore.

Greets,
Dennis
 

moonbug12

Member
i have the same issue, with windows 10 touchscreen, currently no single touch available only seems to work on the second click in a double click.
 
Top