You are not logged in.
Pages: 1
I have a Xbox 360 gamepad, which has a little sloppy left stick. This is not a problem in other games at all, because usually games have a default deadzone for analoge sticks. But Goatattack doesn't has any deadzone. It also does not respect the deadzone I've set with jscal.
It would be great if you could add a default deadzone, or an option to set your own.
Offline
hi thor77
hmm, as you can see below, i added a fixed deadzone of 3200 in all four directions. you find this code snippet in shared/src/SubsystemSDL.cpp at line 561. as i know, SDL acts between -32768 and +32767.
case SDL_JOYAXISMOTION:
{
input.param1 = joyaxis;
if (event.jaxis.axis == 0) {
/* horizontal */
if (event.jaxis.value < -3200) {
input.param1 |= InputData::InputJoyDirectionLeft;
input.param1 &= ~InputData::InputJoyDirectionRight;
} else if (event.jaxis.value > 3200) {
input.param1 |= InputData::InputJoyDirectionRight;
input.param1 &= ~InputData::InputJoyDirectionLeft;
} else {
input.param1 &= ~(InputData::InputJoyDirectionLeft | InputData::InputJoyDirectionRight);
}
}
if (event.jaxis.axis == 1) {
/* vertical */
if (event.jaxis.value < -3200) {
input.param1 |= InputData::InputJoyDirectionUp;
input.param1 &= ~InputData::InputJoyDirectionDown;
} else if (event.jaxis.value > 3200) {
input.param1 |= InputData::InputJoyDirectionDown;
input.param1 &= ~InputData::InputJoyDirectionUp;
} else {
input.param1 &= ~(InputData::InputJoyDirectionUp | InputData::InputJoyDirectionDown);
}
}
joyaxis = input.param1;
input.data_type = InputData::InputDataTypeJoyMotion;
break;
}
i don't have any xbox 360 controllers here, but it would be interesting to know, how this controller's sensitivity reacts.
if you're able to compile Goat Atack yourself, add some "debug output" code lines after the /* horizontal */ and /* vertical */ remarks:
/* horizontal */
stream << "h: " << event.jaxis.value << std::endl;
and
/* vertical */
stream << "v: " << event.jaxis.value << std::endl;
Offline
Yes, 3200 was too low for my left stick. I have the 360 gamepad for a long time and the left stick has suffered a lot in all the years
The debug output showed that the stick very often was over 3200 when I let it go:
h: -3680
h: -3793
h: -3680
h: -3793
But I've seen that you added the ability to change that in 0.4.1, thank you very much! Now I can play the game with my gamepad, without running to the left all the time
Offline
Pages: 1