Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad and keyboard support #15

Open
makenai opened this issue Feb 9, 2015 · 1 comment
Open

Gamepad and keyboard support #15

makenai opened this issue Feb 9, 2015 · 1 comment

Comments

@makenai
Copy link
Owner

makenai commented Feb 9, 2015

The virtual joystick is cool, but gamepad / keyboard support would be better for battles. Note there is a gamepad API spec. The virtual joystick and buttons should give visual feedback that the buttons are being pressed, since connectivity with a single piece of hardware is fun enough to debug.

https://developer.mozilla.org/en-US/docs/Web/Guide/API/Gamepad

@monteslu
Copy link

monteslu commented Feb 9, 2015

+1

I did something similar for Nodeblu: https://chrome.google.com/webstore/detail/nodeblu/aanmmiaepnlibdlobmbhmfemjioahilm?hl=en-US

Gamepad API is slightly different than other browser inputs in that its not automatically evented. You need to setup a loop that checks state and possibly emit your own events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants