lance-gg / lance

Multiplayer game server based on Node.JS
https://lance-gg.github.io/
Apache License 2.0
1.58k stars 168 forks source link

Arrow Keys not working #87

Closed hedrickbt closed 5 years ago

hedrickbt commented 6 years ago

I have tried playing the spaaace game and I am unable to move the ship using the arrow keys. I have tried with the most recent versions of Chrome and FF.

I am using a Thinkpad T510 laptop.

If I use this site, I am able to see all of my arrow keys are working just fine. http://keycode.info/

Clicking the mouse on the Fire circle at the bottom does fire.

If I download the pong branch and run the server/game from my laptop, the pong game responds to my arrow keys just fine.

namel commented 6 years ago

The fact that you are seeing a circle at the bottom implies that you are looking at spaaace in mobile mode. Maybe your browser is set to mobile mode?

OpherV commented 6 years ago

@hedrickbt Does your laptop have a touchscreen? The game assumes that if you have touch capabilities you're probably running on a mobile device. I'll add a flag in the next version that allows you to force keyboard mode so that you can play it :)

namel commented 6 years ago

@OpherV maybe you want to detect specifically mobile, instead of detecting a touchscreen? I suspect most laptops are touchscreen these days.

OpherV commented 6 years ago

@namel that sounds like a reasonable heuristic. It might not detect all cases but should cover most