Number of Joystick Axes

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

Number of Joystick Axes

Post by Matkins »

It appears to me that Love only supports a maximum of 6 axises. numbered from 0-5. Is this true? My joystick has 8 axes, i can see them working in my game controller properties, but love.joystick.getNumAxes(useJoy) returns 6. I really could use all 8 of them :(
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Number of Joystick Axes

Post by rude »

I guess that's an SDL limitation, then. Are some of the shoulder button axes missing?

EDIT: Possibly use SFML for input? It claims: "Can handle mouses [sic] with up to 5 buttons. Can handle two joysticks with up to 7 axes and 32 buttons"
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

Re: Number of Joystick Axes

Post by Matkins »

Whats SDL?
I'm working with wiimotes, and the accelerometers are being treated as axes, so I need as many axes as i can get my hands on.
PPJoy gives me 8 virtual axes, but Love tells me i've only got 6. zero to five, and they're all jumbled up in a crazy order... :?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Number of Joystick Axes

Post by bartbes »

Matkins wrote:Whats SDL?
SDL is a framework. That's probably the best way to call it, it handles a lot of drawing, windowing, etc, and is used in LÖVE together with OpenGL. You might want to take a look at their site, because I don't think I can explain it in a way that people understand.
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

Re: Number of Joystick Axes

Post by Matkins »

Ok, thanks for the links guys, very insightfull.
I've been looking at the SDL joystick functions, and I don't see any mention of there being a limit on axes that can be accessed. I feel doubtfull that the limmit does lie with SDL (does anyone know for sure).
Is it possible that my axes need to be of specific types for them to be recognized? Also, is it possible that a couple of my axes are being treated as if they were a tracking ball? Because trackballs are accessed with a different SDL function.
I'll do some experiments with other, non-virtual, joysticks. But if anyone has a clue what might be going on then I'll appreciate the help. Cheers.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Number of Joystick Axes

Post by bartbes »

You might want to check the joystick with the tools found here: http://love2d.org/forum/viewtopic.php?f=5&t=618 (though the creator reported a limit of ~5 himself as well)
Matkins
Citizen
Posts: 53
Joined: Mon Mar 23, 2009 5:12 pm

Re: Number of Joystick Axes

Post by Matkins »

Thanks bartbes. I've made something similar myself though.
Post Reply

Who is online

Users browsing this forum: veethree and 56 guests