Re: [w3c/gamepad] Terminology of inputs. (#131)

> Something to keep in mind is that currently wheels and flight sticks will appear as multiple controllers due to their control units being interpreted separately. That might be because the HID interface interpreted it as such

I think this is fine as long as the HID interfaces are all part of the same USB device. We can walk the device tree to discover other interfaces exposed by the same physical device.

It's not clear to me whether there are wheel or flight stick controllers where the control units are separate USB or Bluetooth devices. In that case it gets a lot more complex since the browser needs to make decisions about which devices should be associated. Typically there's no UI for gamepad configuration so the browser needs to make those associations without the user's help. If the browser gets it wrong, the user will probably need to manually disconnect and reconnect devices in the correct order to fix it.

> but it makes me wonder if user agents should apply some transformations to consider them a singular gamepad...

I added some transformation logic in Chrome for Switch Joy-Cons. If you connect a matching pair of Joy-Cons, they're automatically combined into a singular "Joy-Con L+R" gamepad. This makes some use cases easier (playing a game with both Joy-Cons held by one player) and others impossible (there's no way to keep the L and R as separate gamepads). I think it works okay for Joy-Cons but I'm not convinced it would work well for other devices.

Transformation is problematic for applications that attempt to identify specific gamepad models. For instance, Dualshock4 has extra buttons beyond those defined in the Standard Gamepad. To access these safely, the application should first verify that the device is a Dualshock4. Usually this is done by checking the Gamepad.id string against known values.

Suppose we want to combine a particular USB wheelbase with a particular USB pedal accessory. Each of these devices might have extra inputs beyond those defined in the Standard Wheel. In order for applications to access those inputs, there needs to be a way for the application to detect which devices make up the transformed gamepad. Should Gamepad.id include hardware information for both the wheelbase and pedal accessory? That doesn't seem right to me. It might be better to keep them as separate Gamepads and allow the application to associate them. If this use case turns out to be common, maybe we should allow for separate "Standard Pedals" and "Standard Wheelbase".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/131#issuecomment-647853556

Received on Tuesday, 23 June 2020 01:34:07 UTC