Right now realmz’s touchscreen detection has some flaws mainly @Wasd cannot access the game since it does not recognize his iPad as a touchscreen device.
That’s why I propose this new boolean check:
var touch = window.matchMedia("(pointer: coarse)").matches; // true or false
This is used in the swordbattle.io source:
This script has been used in prod ever since launch and we never had any issues with it, @futurepear you may want to consider using something like this (detects if there is a “coarse” pointer meaning touchscreen).
Thanks!