- From: Christopher Rodriguez <notifications@github.com>
- Date: Thu, 18 Jun 2020 14:36:24 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/issues/4/646318159@github.com>
I'd like to quote what I wrote in #15 since it sums up my thoughts on an event based model: >Has there been any more movement on this? I also think it'd be welcoming to have an event-driven model, but only as an inclusion alongside the polling model as well. > >The following question was asked in #22: >> With that in mind, I guess my question to you is: do you know any practical examples where lost gamepad events are actually a real problem? > >Lost gamepad events can be a real problem when the intended use is for accurate input visualization. A lost frame of data can be reasonable in terms of displaying said data, but an inconsistency between axis values or when two or more buttons were pressed simultaneously is not. > >The suggested approach to #4 to remedy such a scenario (the API providing an event subscription strategy for multiple axes/buttons/etc) doesn't account for this kind of scenario because it could create a disconnect between axes and button represented at a fixed point in time due to the asynchronicity. > >We could then propose something like `onGamepadChange` that would subscribe to the entire gamepad, but something like that would feel like a bastardization of the polling strategy, and would that really be better than polling from the start? > >It's why I'm not against the inclusion of events, but the removal of polling wouldn't allow for the kind of scenarios I'm depicting. For something like adding gamepads as a form of navigational input for a webpage, events would be the perfect approach since it'd be idiomatic in comparison to other event-driven practices and wouldn't necessarily encounter the kind of issues I mentioned above. > >This also isn't a theoretical application either. I run and manage [gamepadviewer.com](gamepadviewer.com), which does exactly what it says, and the amount of usage is not insignificant, either. According to the [`getGamepads()` feature data](https://www.chromestatus.com/metrics/feature/timeline/popularity/1916), the site ranks at least 34th in the list, so everything I've posited isn't hyperbole. Since there hasn't been any discussion on this in a while, it'd be nice to get some talk going again as there doesn't seem to be a consensus so far. -- 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/4#issuecomment-646318159
Received on Thursday, 18 June 2020 21:36:37 UTC