Take the 2-minute tour ×

I'm creating a six player HTML 5 game designed to be played locally (Red Ice).

I've previous set up handling 7 Wiimotes using something along the lines of Joy2Key to map each input for each player to a separate keyboard key, but Wiimotes are pretty hard on the hands for these types of games and not very ergonomic so I thought I'd try and get Xbox controller support.

I don't believe that any simple key mapping solution will work due to the nature of the directional stick.

My inclination is that this will require a browser plugin and if so I'd prefer to write the plugin for Google Chrome.

How do I create a Chrome browser plugin to handle multiple Xbox controllers or is there some other way?

Please do not answer this question saying it can't be done, because it absolutely can.

EDIT: I don't believe any keymapping/mouse simulating solution will work unless it can reliably distinguish six axis of inputs, one per player.

share|improve this question
Running on Windows? –  Kylotan Jun 16 '11 at 10:17
Not enough blood :) –  Jonathan Connell Jun 16 '11 at 11:24
Have you tried something like Xpadder? –  mpnk121 Jun 16 '11 at 12:09
The standard library for using 360 controllers on Windows is XInput - toymaker.info/Games/html/xinput.html however it only supports 4 controllers... –  Adam Jun 18 '11 at 1:18
It should run on all major platforms (Linux, OSX, Windows) and browsers (Chrome, Firefox, IE8+) –  Daniel X Moore Jun 19 '11 at 23:59
show 1 more comment

2 Answers

Assuming your controllers are wireless, the first thing you'll need is the Xbox 360 Wireless Gaming Receiver. It's a $20 USB device that lets you use your Xbox 360 controllers as input devices.

Once all that's set up it's a matter of syncing the controllers with the dongle and binding the buttons and sticks of each controller to different keypresses.

Good luck!

share|improve this answer
Is there such a thing as binding to a virtual keypress? (In a hypothetical extreme situation where all of the keyboard is already being used for another player's controls.) –  Anko Jun 16 '11 at 17:47
These seem to be very close, but I still need the final step of giving JavaScript access to the actual axis input. Due to having six players I don't believe that I can just map the axes to the mouse coordinates. –  Daniel X Moore Jun 17 '11 at 0:08
Also, the receiver only handles up to 4 controllers... –  Oskar Duveborn Jun 25 '11 at 10:30
add comment
up vote 0 down vote accepted

I've created Boomstick, an NPAPI and ActiveX plugin that grants JavaScript an API to access native Joysticks and Gamepads. Assuming that 2 XBox 360 Wireless Gaming Receivers can each handle 4 controllers, Boomstick will grant HTML5 access to the 8 controllers. This works on all major platforms (Windows, Mac, and Linux) and browsers (Chrome, Firefox, IE).

share|improve this answer
add comment

Your Answer


