xboxlove - Xbox360 Controller module

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: xboxlove - Xbox360 Controller module

Post 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 :)
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: xboxlove - Xbox360 Controller module

Post 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.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: xboxlove - Xbox360 Controller module

Post by raidho36 »

josefnpat wrote:Try installing this; http://www.xbox.com/en-US/LIVE/PC/DownloadClient
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.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: xboxlove - Xbox360 Controller module

Post by Jasoco »

Walz. wrote:Thanks you !

I think ball are for this kind of controllers :
Image

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.)
User avatar
Walz.
Prole
Posts: 13
Joined: Mon May 06, 2013 2:42 pm

Re: xboxlove - Xbox360 Controller module

Post 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.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: xboxlove - Xbox360 Controller module

Post 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™
User avatar
NightKawata
Party member
Posts: 294
Joined: Tue Jan 01, 2013 9:18 pm
Location: Cyberspace, Room 6502
Contact:

Re: xboxlove - Xbox360 Controller module

Post 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.
"I view Python for game usage about the same as going fishing with a stick of dynamite. It will do the job but it's big, noisy, you'll probably get soaking wet and you've still got to get the damn fish out of the water." -taylor
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: xboxlove - Xbox360 Controller module

Post 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.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: xboxlove - Xbox360 Controller module

Post 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?
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: xboxlove - Xbox360 Controller module

Post 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. :)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 41 guests