April 29th, 2014
If you missed it, I wrote an article on the Gamepad API over at hacks.mozilla.org. It has information on how to use it as a developer as well as some code samples. Go check it out if you’re interested in using this API!
If you’re not a developer, but you have a gamepad laying around, I have a couple of games you can play:
- Combat is an homage to Atari 2600 Combat that I wrote. It gets pretty fun if you have multiple gamepads laying around and you can play against your friends. (There’s also keyboard controls if you don’t have a gamepad, and a computer-controlled tank to play against if you don’t have friends.)
- Boxes Wot Shoot is a really slick game written by Scott Graham, the co-editor of the Gamepad API spec. It requires a gamepad with dual analog sticks to play, but it’s super fun.
These games work great in the release versions of both Firefox and Chrome, which is pretty awesome to see. Even more awesome is that Microsoft seems to be working on an implementation, listing the Gamepad API as “in progress” on their IE progress tracker. Perhaps you’ll be able to play these web games on your Xbox One in the future.
A quick note on gamepad support: it varies from platform to platform. Most USB gamepads will work on any platform. The notable counter-examples are the DualShock 3 (the PlayStation 3 controller) and the Xbox One controller. You can get third-party drivers to make them work, but it’s a little shaky. Your best bet is likely to be the Xbox 360 controller (unless you’re on a Mac), the DualShock 4 (PlayStation 4 controller), or a cheap off-brand USB controller (they can be had for $15 in many places).