Input and games.

Todd Showalter todd at electronjump.com
Fri May 3 10:35:38 PDT 2013


On Fri, May 3, 2013 at 12:06 PM, Daniel Stone <daniel at fooishbar.org> wrote:

> I think with 6DoF-type devices, we really shouldn't try to do anything
> clever with them, and pretty much just pass evdev input through.  The
> only reason we created wl_pointer and wl_keyboard as they are is that
> the compositor needs to interpret and intercept them, and clients
> would all be doing more or less the same interpretation too.  For
> complex devices where it's of no benefit to have the compositor
> rewrite the events, I think we just shouldn't even try.
>
> If the gamepad proposal was any more complex than it is now, I'd lean
> towards just shuttling the raw data to clients rather than having our
> own protocol.  But the proposal I've seen is pretty nice and it
> definitely helps our gaming story (which is really quite poor now), so
> that helps.
>
> The one thing I think it's missing so far is physical controller gyro
> measurements, e.g. for new PS3/PS4 controllers and the Wiimote.

    In my experience, the accelerometers on these devices are all over
the map in terms of precision and accuracy; if you have a MotionPlus
and a Nunchuck controller plugged into your Wiimote, IIRC you have
three different 3-axis accelerometers active, each with a different
resolution.  The weakest is in the nunchuck, the wiimote one is
better, and the motion plus one is better still.

    Between manufacturers, I'm not even sure if the accelerometer
coordinate system is the same *handed*, let alone what the reference
orientation is.

    In my experience, the 3vec coming out of the accelerometer is
pretty close to normal, at least in the cases I've seen.  Not always,
obviously; if the player is swinging the thing around, it may be
wildly out of normal, but if you put the thing on the table and leave
it, then (ignoring the wicked instability the accelerometers seem to
have) it gives you something approaching a unit vector.  Which means
(once again) that the 24.8 fixed format really isn't suitable,

    It also starts to lead to questions about things like the Move
controller, the Kinect, the Leap Motion, the sensors in the Oculus
Rift and that crazy thing from razer that dumps a torrent of quats at
you.  Unless (as you say) you're going to get into self-describing
protocols, the axe has to come down somewhere.

    So, tackling accelerometers as a protocol is a bit of an
interesting balancing act, much harder (or at least, with more
potentially annoying decisions about tradeoffs) than the gamepad one.

                                      Todd.

--
 Todd Showalter, President,
 Electron Jump Games, Inc.


More information about the wayland-devel mailing list