cch5ng / frontend-nanodegree-arcade-game

Arcade game written in JavaScript, using HTML Canvas
http://cch5ng.github.io/frontend-nanodegree-arcade-game/
0 stars 0 forks source link

v1: add ability to navigate on mobile device #7

Open cch5ng opened 9 years ago

cch5ng commented 9 years ago

currently the game can only be played on desktop b/c nav controls are using arrow keys. add additional keyboard listeners for the following keys:

reference: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.key

cch5ng commented 9 years ago

not sure if event key value needs to be: event.key (firefox) vs event.keyCode vs other ... http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes

cch5ng commented 9 years ago

fixed keyup event listener so it's working on chrome and firefox. but when I run it on android phone, the keyboard does not come up by default. might have to add handling for touch event on phones but this seems very unchallenging from the user experience for a game. http://www.ibm.com/developerworks/library/wa-games/

cch5ng commented 9 years ago

think this logic needs to be touch navigation and may just implement it for practice. however, I don't think style of game is very challenging via touch navigation.