mpizenberg / elm-videoball

Minimalist elm implementation of the game videoball (not affiliated to official game)
https://mpizenberg.github.io/elm-videoball/
Mozilla Public License 2.0
4 stars 1 forks source link

Player control #2

Closed mpizenberg closed 6 years ago

mpizenberg commented 6 years ago
mpizenberg commented 6 years ago

Moving of player 1 with keyboard handled in b4f2bea3bb and 0cee9fb8

mpizenberg commented 6 years ago

Player 1 shooting on spacebar in bb0b8646

Soreine commented 6 years ago

Gamepad support will probably become mandatory for local play. Because of keyboard ghosting, it's not conceivable to have more than 2 people using one keyboard at a time.

“Ghosting” is the problem that some keyboard keys don’t work when multiple keys are pressed simultaneously.

I have never used gamepads in JS, but hey... https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API

mpizenberg commented 6 years ago

For gamepad in elm: https://github.com/xarvh/elm-gamepad

mpizenberg commented 6 years ago

It mostly works but there are still two issues: