Using an XBOX 360 controller - Input now on SDL2

Using an XBOX 360 controller - Input now on SDL2

Postby murderon » 01 Dec 2012, 20:13

Hey there

First off, cool game. I've always loved spline-based track editors, so it's cool to see it attached to a game with some nice car physics and handling.

My issue is that I can't assign the axises of the XBOX 360 controller to the controls. In the bottom right corner of the input screen it shows which axises are being moved and the intensity, so it's definitely detecting the trigger buttons and the joysticks. I click on the button and try to map it to a trigger or a joystick and nothing happens, though. I checked the Wiki a bit and I still couldn't figure this out. What am I missing?

Any help on this matter would be appreciated :)
murderon
 
Posts: 2
Joined: 01 Dec 2012, 19:49

Re: Using an XBOX 360 controller

Postby CryHam » 01 Dec 2012, 20:48

Hmm, looks like a bug. I can't tell much, there were many issues with input. If those are detected than something is faulty in our code to bind them.
We have planned using an other input library, maybe it will help, not sure though. I don't have a controller, only a steering wheel that works. Would have to debug the code that binds.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Using an XBOX 360 controller

Postby murderon » 01 Dec 2012, 21:12

Alright then. Thanks for the speedy reply and good luck with the game.
murderon
 
Posts: 2
Joined: 01 Dec 2012, 19:49

Re: Using an XBOX 360 controller

Postby wowie » 07 May 2013, 07:38

I recently purchased an Xbox360 controller for use with my PC, and decided to give it a spin with this game after downloading 2.0 ...As stated above, it doesn't work. I'll give a bit more detail: buttons work, but analog inputs will not be accepted. The triggers are analog inputs, and for some reason the D-pad is also detected as an analog input. After some research I discovered ( http://en.wikipedia.org/wiki/DirectInput ) that even if the buttons did all work, it would be useless because both of the triggers are assigned to the same axis.

Note that half of the gibberish I'm spouting here is probably wrong because I don't even know what half of this stuff means, but someone with more tech know-how than myself could probably figure it out. Until then, I'm just going to wait until the big control rewrite ( https://code.google.com/p/vdrift-ogre/i ... ail?id=188 ) before I attempt to use my controller with this game again.
I lost the game.
User avatar
wowie
 
Posts: 314
Joined: 15 Mar 2012, 22:22

Re: Using an XBOX 360 controller

Postby Sneer » 27 May 2013, 03:02

Yep, no axis bindings (detection is working). Interesting game though!
Sneer
 
Posts: 4
Joined: 27 May 2013, 02:53

Re: Using an XBOX 360 controller

Postby Sneer » 31 May 2013, 19:45

I've added the xbox controller manually. It's working for 1 direction only (left or right - both does not work here).

<action name="Steering" type="AnalogAxis" UseAbsoluteValues="0" MinValue="-1" MaxValue="1" Sensitivity="1" InverseMul="1" AnalogEmulator="Linear" DecSpeed="5" IncSpeed="5" ReturnEnabled="1" ReturnValue="1" ReturnDecSpeed="5" ReturnIncSpeed="5">
<binding>
<bind role="inc">Controller (XBOX 360 For Windows)_0/Axis 1</bind>
<bind role="dec">Controller (XBOX 360 For Windows)_0/Axis 1</bind>
</binding>
Sneer
 
Posts: 4
Joined: 27 May 2013, 02:53

Re: Using an XBOX 360 controller

Postby CryHam » 08 Jun 2013, 14:26

Ok I'm starting with changing input to SDL.
There is a branch 'sdl_joy', anyone on Linux with a joystick/wheel/controller, and with ability to build from sources please test if it works
https://github.com/stuntrally/stuntrally/tree/sdl_joy
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Using an XBOX 360 controller

Postby CryHam » 29 Jul 2013, 07:38

We have now code on master with rewritten input implementation using SDL2.
Should be free of the input problems.
Testing welcome.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Using an XBOX 360 controller - Input now on SDL2

Postby CryHam » 07 Aug 2013, 13:13

So okay, it is not possible now to bind 1 axis to both throttle and brake.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Using an XBOX 360 controller - Input now on SDL2

Postby CryHam » 11 Aug 2013, 13:16

Just implemented. Now it IS possible, on master. Testing welcome.
As the tooltip of the new checkbox "one axis for throttle and brake" on Input Player tab says:
If your controller has throttle and brake in one axis, check this. Bind axis to throttle, unbind brake. Use Inverse from throttle if needed.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Re: Using an XBOX 360 controller - Input now on SDL2

Postby Wuzzy » 15 Aug 2013, 03:34

I tested it and it works like a charm. :)
User avatar
Wuzzy
 
Posts: 989
Joined: 28 May 2012, 23:13

Re: Using an XBOX 360 controller - Input now on SDL2

Postby CryHam » 15 Aug 2013, 08:41

Cool.
User avatar
CryHam
SR Moderator
 
Posts: 1047
Joined: 25 Nov 2012, 08:40

Who is online

Users browsing this forum: No registered users and 1 guest