Closed Macil closed 1 year ago
@ericwa? (cortroller stuff was your baby..)
I made one last touch to this PR: I've tweaked the final commit which changed joy_exponent (3 to 2) so that it also changes the defaults for joy_sensitivity_yaw (300 to 240) and joy_sensitivity_pitch (150 to 130). These values give max turning speeds that are the same as Kex's defaults, and decreasing these values helps to compensate for the decrease in joy_exponent (which causes mid-range inputs to be scaled up). This config is the one I use all the time in QS/vkQuake.
I didn't originally intend to have much opinionated defaults-changing stuff in this PR, but the joy_exponent_move change (3 to 2) seemed natural to pair with the movement range fixes, the joy_exponent change (3 to 2) seemed natural to pair with that, and after testing out various settings it feels best to me that this change to the sensitivity would be paired with the change to joy_exponent. The final commit isn't exactly a bugfix but I hope it fits well in a PR that's about tuning things to feel better.
This patch is in. Thank you.
Thanks, these seem good to me. I'll add the new cvars to the controller section of the documentation.
Agreed, regarding the +1/+1 move inputs, it makes more sense to prioritize intuitive controls / matching what other games do, rather than emulating keyboard input as I was doing initially.
I've been playing a lot of both Quakespasm(/vkQuake) and the Kex port with a controller. Compared to Kex, I've noticed that fine movement control seems harder, and the always-run setting and the run key barely impact your speed when the joystick is held all the way. I decided to investigate the joystick handling code, and I fixed a few smoking gun issues that were holding things back.
The above two issues were partly caused by the IN_ApplyMoveEasing function. The function had this comment:
There's two things wrong with this: 1) forward/back/left/right going to 1.41 means that the walking speed will be too high, and the running speed will be clipped creating a large outer deadzone. 2) There's no need to scale things up to make diagonals output (+/-1,+/-1) instead of (+/-0.707,+/-0.707), because the latter already has magnitude 1 and anything with a magnitude higher than that will get scaled down.
(I picked 2% because 1% and 2% are values I've seen recommended, I wanted to copy the value from a modern popular fast-paced FPS with polished controller support, and 2% is the default value in Apex Legends which happens to have an unusually detailed controller settings menu I was able to learn from.)
(I felt the Kex port's joystick response curve was pretty good, so I studied its config, took videos to measure the time it takes to move a given distance or turn around at various joystick values, and charted the results against different Quakespasm joy_exponent settings: moving, turning. I still don't fully understand Kex's response curves, but it's clear to me that joy_exponent{,_move}=2 is much closer to what it does than joy_exponent{,_move}=3.)