3
\$\begingroup\$

I'm using the XInput API to support gamepads. As XInput is not event-driven, but requires polling, my question is, what is the recommended polling rate (ms) for gamepads or specific, the XBOX 360 controller?

\$\endgroup\$
3
\$\begingroup\$

The rule of thumb that I'm aware of is that total input-response latency should be under 150ms in order to appear 'instantaneous' to the user. If your game design is fast-paced or emphasizes timing (e.g. fighting games), you should revise that figure downward.

To obtain your minimum polling rate, subtract any other latency sources (physics updates, rendering, etc.) from your target input latency.

Example: let's say you're targeting max input latency of 100ms, and designing for a minimum framerate of 20Hz. It can take up to 50ms to display effects after detecting events, so you need to poll every 50ms to ensure that the effects of an action are displayed within 100ms.

As a mostly irrelevant side-note: USB 2.0 controllers poll devices at a maximum of 8kHz, so it is utterly pointless to have a polling period smaller than 0.125ms.

\$\endgroup\$
  • 1
    \$\begingroup\$ Isn't the relevant question here whether or not the user can press and release a button in under 50ms? It seems very likely they can, in which case you'd miss a button press. \$\endgroup\$ – Ryan Cavanaugh Nov 9 '16 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.