Bug Tracker – Bug 1269

SDL2 joystick input can't SR45, and other things

Last modified: 2019-02-17 20:14:14 CST
Bug 1269 - SDL2 joystick input can't SR45, and other things
Summary: SDL2 joystick input can't SR45, and other things
Status: NEW
Alias: None
Product: Odamex
Classification: Unclassified
Component: Client (show other bugs)
Version: 0.8.x
Hardware: All Linux
: P5 normal
Assignee: Odamex Bug Reporter
URL:
Depends on:
Blocks:
 
Reported: 2019-02-17 20:14 CST by Ant P.
Modified: 2019-02-17 20:14 CST (History)
1 user (show)

See Also:

Attachments

scale joystick values to allow full range of movement (811 bytes, patch)
2019-02-17 20:14 CST, Ant P.
Details | Diff
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Ant P. 2019-02-17 20:14:14 CST
Created attachment 569 [details]
scale joystick values to allow full range of movement

I've got a PS4 joypad here, and decided to mess around with it in Odamex. It's kinda hard to play well with it; I know I shouldn't expect it to be on part with M+K but it feels pretty bad even compared to console shooters.

There's about a 3× ratio between the smallest and largest possible input that'll register on the freelook/turn axis. It's both hard to aim precisely at something and to turn/pitch quickly at default sensitivity, and setting it to either extreme only makes one of the two far worse.

More importantly, having run+strafe on one joystick makes straferunning at normal speeds impossible. Both axes max out at their respective speed caps (50/40), leading to oval movement and a diagonal speed cap a lot lower than normal (try the BFG jump on brit11 map01 - it's nearly impossible).

I'm not sure whether this is the right fix, but changing the strafe axis to scale by forwardmove instead of sidemove makes things much more consistent and playable. Both axes probably should be scaled a bit extra to account for most joysticks being confined to a circle - I used 1/cos(pi/4). Strafing is a bit twitchy with this but it doesn't seem like a big loss. Thoughts?