Skip to content

Conversation

@lazd
Copy link
Contributor

@lazd lazd commented Dec 10, 2020

Changes

  • Add support for joy_expo cvar with default value of 2 that makes joystick input non-linear. This enables both precise and fast movements, even at higher sensitivity levels.
  • Adds a "customize joystick" sub-menu that provides sliders for changing the sensitivity and expo applied to joystick inputs.
  • Allows setting mouse sensitivity to 0 in UI to work around a RetroPie bug where controller input was showing up as both joystick and mouse events

More on expo

This article does a good job of explaining how this works.

image
Left: a linear yaw response. Right: an exponential yaw response.

Effectively, with this change, small movements make for fine aiming, big movements make for fast movement.

Notes

Tested on RetroPie and it works great, the game is much more playable and I'm able to aim more accurately. I found I like the following settings:

set joy_expo "3.700000"
set joy_forwardsensitivity "1"
set joy_pitchsensitivity "0.550000"
set joy_sidesensitivity "1"
set joy_yawsensitivity "0.750000"

Additionally, adjusting the deadzones makes things much more accurate:

set joy_axis_leftx_threshold "0.025"
set joy_axis_lefty_threshold "0.025"
set joy_axis_rightx_threshold "0.025"
set joy_axis_righty_threshold "0.025"

lazd added 3 commits December 10, 2020 17:24
Expo makes gamepad stick input non-linear such that small
movements on the stick are less pronounced. This enables
both precise and fast movements, even at higher sensitivity levels.

Expo is applied to all axes equally.
This adds a "customize joystick" sub-menu that provides sliders for
changing the sensitivity and expo applied to joystick inputs.
On RetroPie, it seems that the joystick input is mixed up with mouse
input, causing both joystick and mouse code to run in response to stick
input. this makes the game impossible to play with a gamepad.

Setting sensitivity to 0 solves this problem, this change just makes it
possible in the UI
@lazd
Copy link
Contributor Author

lazd commented Dec 10, 2020

@0lvin I didn't add UI for joy_upsensitivity as I wasn't sure exactly what it did since it's unused. I can easily add another slider, just say the word.

Additionally, I'm not sure how joy_haptic_magnitude works, so I didn't add UI for that either. Let me know the min, max, and step and I can add a slider for that too.

I also did not add UI for adjusting deadzones, but I would advocate that they are decreased by default at least to 0.10 or even 0.05.

@0lvin
Copy link
Contributor

0lvin commented Dec 10, 2020

@lazd joy_upsensitivity is used at sdl.c#L714 for calculate joystick_up that will be used for upmoveat sdl.c#L943. Have I missed something?

About haptic - this option is showed only for joysticks with haptic feedback. Look to menu.c#L1400 and sdl.c#L1119

@lazd
Copy link
Contributor Author

lazd commented Dec 10, 2020

@0lvin thanks for the reply, I installed the latest RetroPie on my Pi4 and I now have haptic support. I will move that slider until the customize joystick submenu.

Ok, I see what you mean about upmove, I will add a slider for it as well. Thanks!

@Yamagi
Copy link
Member

Yamagi commented Dec 12, 2020

Thank you for working on this. Merged.

@Yamagi Yamagi merged commit 20ec2ba into yquake2:master Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants