scottschiller / ArmorAlley

A browser-based interpretation of Armor Alley, a combat strategy game originally released in 1990 for the Macintosh and MS-DOS PCs.
https://armor-alley.net/
Other
91 stars 25 forks source link

Can't move the helicopter #7

Closed JayLevine closed 10 months ago

JayLevine commented 10 months ago

When starting a new game on https://play.armor-alley.net/. The helicopter either stays on the pad, or pops up halfway and I can not move it. I can shoot and other keys, but not move the helo. Works fine on my desktop, but not on my 2.5-year-old Dell XPS 13 (9300) on either Chrome (just updated) or Firefox.

I have a downloaded copy of AA V1.6.20220201 which works fine.

scottschiller commented 10 months ago

Whoops! 😅 Thanks for the report - I think I know what's going on, here.

AA V2.0 is a huge upgrade from V1.x under the hood, including revamped mouse and touch input handling. The game was previously not very playable on mobile or tablets; it's much better these days, but I had to refactor a lot of input handlers between mouse and touch events.

I'm going to guess there are no JS errors in your console, and this is about the fact your Dell XPS 13 has a touch-capable screen as well as a regular keyboard and mouse input.

I used a rather naïve approach to "detect" touch support, which I suspect is the root cause. Someone pointed this out a while back, who may have also had a laptop with a touch-capable screen. I made a note, and then I forgot about it. Whoops. 😅

When you have a few, can you try loading up https://play.armor-alley.net/?dev=1 on that Dell XPS 13 and let me know if things work as expected? You should get the desktop UI version of the game (no visible touch controls like on mobile,) and keyboard and mouse input should work as expected.

Next test: if your touchscreen is enabled, ideally you should be able to touch and move the helicopter around the screen as well.

On mobile devices which I presume (currently) are "touch-first", the game shows touch controls on either side of the screen. AA - mobile touch controls UI

JayLevine commented 10 months ago

Hi,

Yes, my XPS 13 has a touch screen. The link with dev=1 works as expected, mouse controls! And the regular play. link allows touch controls.

Thanks, Jay

scottschiller commented 10 months ago

Excellent, thank you for confirming - and, thank you for playing my AA remake! I'll push a set of changes for this shortly.