imalooney / t3tr0s

30th anniversary tetris in ClojureScript
t3tr0s.com
Other
468 stars 28 forks source link

Gamepad compatibility #31

Open Dudemullet opened 10 years ago

Dudemullet commented 10 years ago

Add ability to play using a gamepad.

shaunlebron commented 10 years ago

hey luis, I reworked how the inputs are being throttled such that it's independent of the OS's key-repeat settings. I can explain this later, but the important bits:

(put! move-down-chan true)  ; => down button pressed
(put! move-down-chan false)  ; => down button released

(put! move-left-chan true) ; => left button pressed
(put! move-left-chan false) ; => left button released

(put! move-right-chan true) ; => right button pressed
(put! move-right-chan false) ; => right button released

commit edc7fb7

Dudemullet commented 10 years ago

I'm on it, thanks for the help.