Re: [w3c/gamepad] Should spec a buffering/refresh interval model of gamepad data? (#22)

Let me just explain what I believe to know about the problem without answering your questions.

In chromium, as far as I understand, if you process gamepad data in a requestAnimationFrame loop, you will be able to catch any button presses that are clearly distinguishable from jitter. We poll gampads from the OS at 60Hz and we produce a snapshot of the actual state - as provided by the OS, which might already include some buffering and/or delay -  which is returned in getGamepads(). The actual timing difference between the poll and the time when requestAnimationFrame fires is arbitrary, but in general if a button was pressed after the last rAF fire and it was hold for at least around 16ms you will see it in the next rAF via getGamepads(). Now as far as I know, the thing about humans pressing buttons is that in practice you always hold it for at least 16ms, thus the theoretical issue with button presses quicker than that is not relevant. Of course all these thinking assumes that our polling is happening at 60Hz no matter what and the same about firing rAF which might always be th
 e case (but we should be close to that for quality gaming experience anyway).

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?

Irrespective of whether we miss events in practice, the spec should be explicit about the model - such as whether getGamepad() is returning a live object or a snapshot. In case the snapshot model is chosen, it probably should have some text about the frequency of polling and about exactly how and when can you observe the physical gamepad events. So, the problem is definitely not solved, however I would say that it's important to avoid solving theoretical issues instead of the real ones, so first we should clarify whether the phenomenon of missing events is a real problem with the current spec.



---
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/22#issuecomment-217078428

Received on Thursday, 5 May 2016 05:22:11 UTC