Live data from Hacker News

HTML5 XBOX Controller in Firefox Nightly

weblog.bocoup.com

1–10 of 12 posts

Re: HTML5 XBOX Controller in Firefox Nightly

#4
1) It's a general joystick api, not just xbox.

2) You can't actually use an xbox controller with a computer (and hence with firefox) anyway without a USB cable. You could use a 360 controller, but not the first Xbox.

Re: HTML5 XBOX Controller in Firefox Nightly

#5
The explanation of the analog stick axes needs clarification: "For example, the XBox wired controller has 4 axes (top to bottom, left to right, and two diagonals.)" What's a diagonal axis, if not a linear combination of the vertical and horizontal axes?

At minimum, for an Xbox-style controller, you should be seeing a vertical and horizontal axis for each of the two analog sticks, and an axis for each of the two analog triggers. From an original Xbox controller, you should also have six analog buttons (though they are usually treated as standard binary buttons).

Other than that, this looks pretty cool. Perhaps in a few years, we'll see stuff like this combined with WebGL to make an open-source, cross-platform gaming environment that goes way beyond the current crop of 2d Flash games.

Re: HTML5 XBOX Controller in Firefox Nightly

#6
post #4

1) It's a general joystick api, not just xbox. 2) You can't actually use an xbox controller with a computer (and hence with firefox) anyway without a USB cable. You could use a 360 controller, but not the first Xbox.

Xbox 1 controllers are just USB. You only need an adapter. Microsoft made them for a while for Final Fantasy. If you just cut the end off a controller and a usb cable, the wires inside are even properly color-coded.

Re: HTML5 XBOX Controller in Firefox Nightly

#7
post #4

1) It's a general joystick api, not just xbox. 2) You can't actually use an xbox controller with a computer (and hence with firefox) anyway without a USB cable. You could use a 360 controller, but not the first Xbox.

Xbox 1 controllers are just USB. You only need an adapter. Microsoft made them for a while for Final Fantasy. If you just cut the end off a controller and a usb cable, the wires inside are even properly color-coded.

I'm fairly sure you need a separate driver for controllers from the original xbox (http://www.redcl0ud.com/xbcd.html)

USB xbox 360 controllers don't need any installation last I checked.

Re: HTML5 XBOX Controller in Firefox Nightly

#8

Earlier quoted context omitted.

Xbox 1 controllers are just USB. You only need an adapter. Microsoft made them for a while for Final Fantasy. If you just cut the end off a controller and a usb cable, the wires inside are even properly color-coded.

I'm fairly sure you need a separate driver for controllers from the original xbox ( http://www.redcl0ud.com/xbcd.html ) USB xbox 360 controllers don't need any installation last I checked.

A quick Google reveals drivers for Windows, as well as drivers for Linux and Mac OS X. I feel it's safe to say that drivers are needed for either.

Re: HTML5 XBOX Controller in Firefox Nightly

#9
post #5

The explanation of the analog stick axes needs clarification: "For example, the XBox wired controller has 4 axes (top to bottom, left to right, and two diagonals.)" What's a diagonal axis, if not a linear combination of the vertical and horizontal axes? At minimum, for an Xbox-style controller, you should be seeing a vertical and horizontal axis for each of the two analog sticks, and an axis for each of the two analo…

Agree, the quoted sentence made absolutely no sense to me either. I wonder if it's a misunderstanding on the part of the article author(s), or if it's communicated that way by Mozilla, too.

I had a look at https://wiki.mozilla.org/JoystickAPI and it simply says "unsigned long axis: axis number being moved", without examplifying for a known device. Didn't continue digging to the actual implementation.

Re: HTML5 XBOX Controller in Firefox Nightly

#10
post #5

The explanation of the analog stick axes needs clarification: "For example, the XBox wired controller has 4 axes (top to bottom, left to right, and two diagonals.)" What's a diagonal axis, if not a linear combination of the vertical and horizontal axes? At minimum, for an Xbox-style controller, you should be seeing a vertical and horizontal axis for each of the two analog sticks, and an axis for each of the two analo…

Even sillier, I'm pretty sure it has 5 axes.

Left Stick X and Y, Right Stick X and Y, And another Axis used for the 2 triggers.

Yeah, I know how silly that sounds for the triggers, but that's how it works.

Post reply on HN