4
\$\begingroup\$

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.

\$\endgroup\$
6
  • \$\begingroup\$ Running on Windows? \$\endgroup\$
    – Kylotan
    Jun 16, 2011 at 10:17
  • \$\begingroup\$ Not enough blood :) \$\endgroup\$ Jun 16, 2011 at 11:24
  • \$\begingroup\$ Have you tried something like Xpadder? \$\endgroup\$
    – mpnk121
    Jun 16, 2011 at 12:09
  • 1
    \$\begingroup\$ The standard library for using 360 controllers on Windows is XInput - toymaker.info/Games/html/xinput.html however it only supports 4 controllers... \$\endgroup\$
    – Adam
    Jun 18, 2011 at 1:18
  • \$\begingroup\$ It should run on all major platforms (Linux, OSX, Windows) and browsers (Chrome, Firefox, IE8+) \$\endgroup\$ Jun 19, 2011 at 23:59

2 Answers 2

2
\$\begingroup\$

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!

\$\endgroup\$
3
  • \$\begingroup\$ 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.) \$\endgroup\$ Jun 16, 2011 at 17:47
  • \$\begingroup\$ 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. \$\endgroup\$ Jun 17, 2011 at 0:08
  • \$\begingroup\$ Also, the receiver only handles up to 4 controllers... \$\endgroup\$ Jun 25, 2011 at 10:30
1
\$\begingroup\$

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).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .