Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hardware Tycoon

Design and sell hardware to outdo the competition in this free tycoon! · By hi

Mobile touch not detected on web version

A topic by stringent created Jan 22, 2022 Views: 391 Replies: 4
Viewing posts 1 to 2
(1 edit)

Hi there,

I am just wishing to let you know that the version on the Itch.io page does not register touches on mobile devices. Could there be any fix to it?

Thanks.

Hi, touch controls used to work at some point but I believe that an itch.io update broke them.
I tried to bring touch support back, but it noticeably degraded the experience with the mouse. That's why according to the FAQ:

If I decide to make a mobile version, I'd like to make it good with a brand-new UI fit for mobile devices and such.
(2 edits)

A solution to prevent degredation that would be to enable touch controls when touch is being used. Otherwise you can just keep it turned off. Another way to detect mobile devices is to look at the browser useragent and look for Android or IOS in navigator.userAgent.platform on the start-up of the game and enable touch and disable the mouse functionality.

You could also use Worker Threads and SharedArrayBuffers but that could take time to add.
Thanks.

Hi,

Unfortunately, to my knowledge, in Construct 2 (the game tool I'm using) that would mean duplicating every single input event and running a check every time the user does something. The worst part would be the maintenance given how many more updates are planned. That's why if I decide to make a mobile version I'll make it with a proper UI and UX.

Oh, I see. I use raw javascript so I can see where the confusion occurred on my side.

Many thanks.