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

Using a game controller #26

Open
nclm opened this issue May 22, 2019 · 4 comments
Open

Using a game controller #26

nclm opened this issue May 22, 2019 · 4 comments

Comments

@nclm
Copy link

nclm commented May 22, 2019

Hi,

I would like to use Blockrain using a USB game controller. It will be in some arcade-like environment, in a full screen browser, and using a controller somewhat like this: Arcade Zero Delay Interface Board (but that is not so important as it registers as any generic USB gamepad).

Luckily, there is a Gamepad API in Javascript: Using the Gamepad API /
Implementing controls using the Gamepad API
.

How could we make it work with Blockrain? Any directions to go? Any first step or specific file to look at?

Thanks!

@RobertoGonzalez
Copy link
Member

Hi @nclm! You can check out the initial setup, as well as the setupControls method. That's how the keyboard and touch controls are implemented in the game.

@nclm
Copy link
Author

nclm commented May 22, 2019

Thanks Roberto! I will look into that. And if I get it to work, will do a PR for a setupGamepadControls kind of thing :)

@nclm
Copy link
Author

nclm commented Jun 17, 2019

So I ended up using QJoyPad at the system level to map the gamepad to keyboard strokes rather than adding gamepad controls to Blockrain.

But it works! Quick preview of Blockrain running inside a window in Copenhagen with old-school arcade buttons: 😃

tetris

@RobertoGonzalez
Copy link
Member

@nclm That looks amazing! Love the idea and execution 😃

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