[PATCH] protocol: Add gaming input protocol

Jingkui Wang jkwang at google.com
Mon Jan 23 05:03:54 UTC 2017

Hi Mayeul,

Thanks for your input!
> games usually have a defined set of actions, in different contexts
> (take for example a game where the player can be in a menu, driving a
> boat or flying a plane; those are the contexts or "action sets").

I agree that if there is a standard (or at least well known) set of actions, it
will make things much easier, but I am afraid we are far from that.

> There are multiple advantages to this approach:
>  - The same game can support a lot of different controllers
> "natively", which has always been a problem in the past,
>  - Configuration tools can be perfectly adapted to some gamepad, and
> present it in an interactive way to the user, instead of some
> half-backed in-app binding utility,
>  - The user can remap every control as he sees fit, with some room for
> more complex trigger systems (ie, two key presses, on-screen displays,
> etc),
>  - In-game tooltips are always displayed for the right controller type,
>  - Controller-agnostic force feedback could be integrated into the
> API, though this would probably be more difficult.
> As for the disadvantages:
>  - Less control on input from the developer (there could be some way
> of manually querying the ray controller data, but the use case is
> small),
>  - More complex handshake procedure, when the game has to export its
> "actions" and "action sets",
>  - More complex libraries required outside of the game (this is
> probably the biggest drawback)*,
>  - Passing around bitmaps could be expensive, depending on the
> protocol, but it shouldn't be that frequent of a need. Plus, there is
> opportunity for caching.

You made some excellent points. In my opinion, the protocol should expose
capabilities instead of limiting the flexibility of the client. It
will be absolutely
wonderful if we have some shared library to define standard actions of games
and unify the gamepad configuration and gameplay experience. But my question
is, should it happen in the compositor?

Jingkui Wang

More information about the wayland-devel mailing list