For example, the player may want to be able to aim precisely in a top down shooter. However, if the player is using a junky controller that has axis-independent deadzones, they will not be able to aim just a few degrees off of top, bottom, left, or right due to deadzones. Is it a good idea to jump through hoops to sense this limitation and compensate for it? Are there any best practices for that?

Here is an example of what I mean by axis independent deadzones:

enter image description here

The red area represents the deadzone. The horizontal red area would give y=0, and the vertical red area would give x = 0.

I imagine that I could find these deadzones if I ask the user to calibrate their gamepad and do a sweep along the perimeter of the joystick. Then I could compensate for them by squashing all values between 0 and (1 or -1) into that grey quadrant. That said, I can see some issues arising with the player performing the calibration sloppily or too quickly, or otherwise sensing the deadzones inaccurately.

Is this a bad idea? Should the player just get a better controller?

  • 2
    \$\begingroup\$ Usually deadzones are implemented in software. I haven't seen a gamepad that physically reports zero over a wide band in the center. Instead, the engine or game code takes the unreliable values close to zero and clamps them down to zero. That gives us the opportunity to apply the deadzone two-dimensionally, rather than per-axis, to solve the kind of problem you describe. Can you cite a specific gamepad model you've found in the wild that has built-in deadzones like this? I can't say I've ever seen a game implement this kind of calibration so I wouldn't expect such pads to be in common use. \$\endgroup\$ – DMGregory Sep 30 '20 at 15:07
  • 1
    \$\begingroup\$ Also, I'd caution against basing decisions for your game on an Internet opinion poll of whether something is "a good idea". As we've seen, the Internet can't even come to a reasonable consensus as to whether drinking bleach is a good idea. 😉 A better option, always, is to test your idea. Implement a version. See how it feels on various controllers. Get friends to try two versions without telling them which is which. See what they like the feel of, or measure their aiming success each way. That will get you real evidence you can use to make an informed decision, not just Internet hearsay. \$\endgroup\$ – DMGregory Sep 30 '20 at 15:20
  • \$\begingroup\$ @DMGregory I am getting this "zero over a wide band" effect with the Logitech F310 on XInput mode using the joystick. \$\endgroup\$ – marcAKAmarc Sep 30 '20 at 15:30
  • \$\begingroup\$ Which OS? xpad on Linux uses input_set_abs_params on each axis and passes 128 for the "flat" parameter which could cause axis-independent deadzones like you describe. "flat: values that are within this value will be discarded by joydev interface and reported as 0 instead." github.com/torvalds/linux/blob/master/include/uapi/linux/… \$\endgroup\$ – nondebug Sep 30 '20 at 20:35
  • \$\begingroup\$ @nondebug I have seen this issue on Windows 10. There is plenty of evidence of people complaining about this controller's deadspace issues. However, I'm not trying to debug this issue for myself, but rather discuss if it is common for developers handle unwanted deadspace in controllers themselves. \$\endgroup\$ – marcAKAmarc Sep 30 '20 at 23:06

Your Answer

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

Browse other questions tagged or ask your own question.