[freespace2] Joystick Sensitivity

Geller Sandor wildy at petra.hos.u-szeged.hu
Wed Nov 23 05:10:04 EST 2005


On Wed, 23 Nov 2005, James Le Cuirot wrote:

> Hello again. Decided I'd actually have a go at playing the game today.
> I rarely get around to that! I'm on a laptop so I don't really have a
> keypad but I do have a USB gamepad with 10 buttons so I tried using
> that. Trouble is it seems too sensitive. Aiming at a ship is very
> difficult, even when it's still and aiming at a subsystem is
> practically impossible unless you're right in front of it. There is a
> joystick sensitivity option but it didn't seem to make any difference.
> Does it only work on analogue joysticks? And what does the deadzone
> option do? That didn't seem to make any difference either.

[ I looked after the joystick code maybe a year ago, so I hope I remember 
correctly ]

Analogue joysticks report values between 0 and 255 for every axis, where 
127 is the center position. Deadzone means that the chosen value (0-9)
multiplied by 10 gives the dead range of the joystick in percents, eg. if 
you set the sensitivity to 5, then values between 64 and 192 are 
considered as the joystick were in the center position, and values between 
0-63 and 192-255 are scaled as 64 or 192 were the center position. It is 
useful if the joystick reports different values in the center position, 
not only 127.

Sensitivity is used as some kind of an accelerator. The turning of the 
ship isn't linear - the ship turns very slowly if the joystick is near the 
center position, so you can target very precisely, while the ship turns 
very fast, when the joystick is far from the center.

   Geller Sandor <wildy at petra.hos.u-szeged.hu>



More information about the freespace2 mailing list