Page 3 of 5
Re: xboxlove - Xbox360 Controller module
Posted: Wed Jul 31, 2013 12:45 pm
by josefnpat
raidho36 wrote:josefnpat, this script is great, actually. I'm gonna borrow axis and buttons mapping from it to use by default for XBox360 mode in my lib.
EDIT: I tried to run the whole thing and, sadly, it doesn't work. It is, in fact, throws an error while throwing an error. Tried all configurations to no avail, goes with the same error, saying that .dll is corrupted or something, while LÖVE throws an error about invalid UTF-8.
Try installing this;
http://www.xbox.com/en-US/LIVE/PC/DownloadClient
If that still does not help, would you mind submitting a full bug report here:
https://github.com/josefnpat/dong/issues/new
I'm using the dong lib in an upcoming game :)
Re: xboxlove - Xbox360 Controller module
Posted: Wed Jul 31, 2013 2:01 pm
by bartbes
Walz. wrote:
I don't know either, why we can't use both triggers on windows...
Because microsoft intentionally crippled the legacy api.
Re: xboxlove - Xbox360 Controller module
Posted: Wed Jul 31, 2013 2:54 pm
by raidho36
It failed installation at the very final step with some obscure numerical error code with no description, I'm not bothering over searching for options to resolve. It's a fact that XBox360 controller works fine in all games I have that support it, so there's something wrong with the DLLs, provided upon hooking up Windows throws a system error with internationalized error message.
Re: xboxlove - Xbox360 Controller module
Posted: Thu Aug 01, 2013 1:18 am
by Jasoco
Walz. wrote:Thanks you !
I think ball are for this kind of controllers :
I don't know either, why we can't use both triggers on windows...
I thinks, I gonna add the home button (even if it will be unusable on windows) and stay with one value for the triggers (sadly...).
Edit : Now it's should work but i can't test it.
The Home button work on mac but doesn't on windows and the triggers should work the same way on windows and OSX.
Works great on OS X. Except for the Back and Start buttons being switched. Windows is fine though. Shame about the Home button not being recognized.
I wish you'd optionally make the two triggers return their separate values on OS X. Maybe via a flag we'd have to set manually.
Fortunately most features wouldn't really be used in most Löve games. Still it's great to have options. (The mixed up buttons on OS X caused me some confusion a few weeks ago when I installed Half-Life 2 onto OS X and the controller wouldn't work right. Now I know why.)
Re: xboxlove - Xbox360 Controller module
Posted: Thu Aug 01, 2013 7:36 pm
by Walz.
I edited the first post.
Start and Back should not be switched now and each triggers have his own value (the global one stay).
So we can choose if OSX users will be able to use both triggers at the same time or not.
Re: xboxlove - Xbox360 Controller module
Posted: Fri Aug 02, 2013 3:04 am
by Jasoco
Pretty darn neato. Very useful. You're amazing.
Could you maybe make a single "xboxlove:init()" function that we could just call easily from the start. I look at the source of your demo.love and I'm not completely sure which code I need and which is just for the app. And I read the methods section and am confused. For now I'll just try and copy what's in the demo, but it's confusing from the start.
I mean it says I just need to use the update function but in your demo you're using other extra code and setting joysticks and deadzones. I just want to plop it into a project and use maybe 2 lines to load and update it. Like what does joystick = 1 mean? Does that mean we can use two or more? How exactly do you go about it? (Not that I have more than one)
Edit: Also, how do I use this on 0.9.0? When I try to run it it says "getNumJoysticks is a nil value". 0.9.0 seems to have changed how Joysticks work. Can one of the 0.9.0 people chime in maybe? I'd loooove to get this working in 9. Maybe we can get this working on both 8 and 9 since 9 is apparently coming soon™*. Should be pretty easy, I just don't know how Joysticks work on 9 let alone 8. So I don't know what to change.
*Valve Time™
Re: xboxlove - Xbox360 Controller module
Posted: Fri Aug 02, 2013 4:57 am
by NightKawata
Not a good idea at all to do that, but hey.
0.9.0 pretty much deprecates the entire joystick API, so have fun!
Plus, 0.9.0 isn't even released yet, so I wouldn't really advocate such a thing. (Especially when the API is about as stable as a chihuahua on crack)
But uh, it's his lib, so who knows.
Re: xboxlove - Xbox360 Controller module
Posted: Fri Aug 02, 2013 5:00 am
by raidho36
I have about 1½ version-specific functions in my controller lib, and I already marked what to replace them with. So no big deal.
Re: xboxlove - Xbox360 Controller module
Posted: Fri Aug 02, 2013 6:00 am
by Jasoco
NightKawata wrote:Not a good idea at all to do that, but hey.
0.9.0 pretty much deprecates the entire joystick API, so have fun!
Plus, 0.9.0 isn't even released yet, so I wouldn't really advocate such a thing. (Especially when the API is about as stable as a chihuahua on crack)
But uh, it's his lib, so who knows.
I'm sure 0.9.0 will have replacements for the current Joystick API that will work just as well. Otherwise it'd be suicide. Can someone from the dev team please chime in here?
Re: xboxlove - Xbox360 Controller module
Posted: Fri Aug 02, 2013 6:11 am
by slime
The new 0.9.0 Joystick API is not finalized yet. The main repository / builds for 0.9.0 don't have any changes related to SDL 2 in yet, so the Joystick API there is not what it is in the SDL 2 branch (although it's still a tiny bit different from the old 0.8.0, mostly some renamed functions for consistency.)
I think you will be happy with the changes and additions though.