W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: [gamepad] Haptic Feedback/Controller Vibration

From: Florian Bösch <pyalot@gmail.com>
Date: Thu, 3 Apr 2014 22:29:37 +0200
Message-ID: <CAOK8ODitw6P2Tm4Uq8QzXQ3G8Mud8UoFc1DA0vdGkbtvk9d4Jg@mail.gmail.com>
To: Ted Mielczarek <ted@mozilla.com>
Cc: "Patrick H. Lauke" <redux@splintered.co.uk>, Webapps WG <public-webapps@w3.org>
On Thu, Apr 3, 2014 at 8:07 PM, Ted Mielczarek <ted@mozilla.com> wrote:

>  Note: DirectInput has been deprecated in favor of XInput, a much simpler
> API that maps directly to the Xbox 360 controller:
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/ee417001%28v=vs.85%29.aspx
>

XInput is kinda useless for a wide variety of controllers.



> Trying to design an API that's everything to everyone is extremely hard
> and likely to produce unsatisfactory results. We chose to focus on the most
> useful subset of things that are common to all controllers. I believe the
> API we've spec'ed is useful in spite of not covering everything that exists
> in the world. I am not opposed to the idea of extending it to cover other
> common features of game controllers, but I do think we'll stick to concepts
> that are widely accepted (like vibration) and not bleeding-edge things
> supported by a single device (touchpads, colored LED). If these things gain
> traction then it makes sense to discuss spec'ing them. Otherwise you run
> the risk of spec'ing something that has only one hardware example, thus
> making the API hard to generalize to other devices that introduce similar
> (but not identical) features in the future.
>

I don't think you need to design an API that's everything to everyone. I
don't even think you need to be specific in the usecase, at all. The
concept of offering lists of axes and lists of buttons is, and should
remain to be, fairly generic and useful. It *today* support Joysticks, 3D
mice, the microsoft strategic commander, etc.

You can add rumble support in the same way that you enumerate other
capabilities. A device might have one or two rumbles, so you offer a list
of rumblers. In the future you could add a list of feedback servos, a list
of touchpads, a list of screens and so on.

Device class specificity in an API isn't a terribly good idea on the
support level. You can always prop up more specific APIs on top of the
underlying API. But if you fuck up the underlying API you make it hard for
the ecosystem to sort out convenient specific solutions.
Received on Thursday, 3 April 2014 20:30:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:23 UTC