Right now it works with love.joystick but that is just temporary for testing.Nixola wrote:Didn't he add a new module, instead of replacing love.joystick?
Xinput for Love (Real Xbox controller support) BETA
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Charles Randall
- Prole
- Posts: 34
- Joined: Wed May 09, 2012 2:52 pm
Re: Xinput for Love (Real Xbox controller support) ALPHA
Re: Xinput for Love (Real Xbox controller support) ALPHA
I would love to test it but unfortunately (or fortunately if you look at it in other ways) I don't use Windows.
I checked the SDL site a year ago or so, and there was an api for haptics, though I think it was a planned feature. When it finally gets revised we will hopefully have this feature. Until then I hope your module serves us well
I checked the SDL site a year ago or so, and there was an api for haptics, though I think it was a planned feature. When it finally gets revised we will hopefully have this feature. Until then I hope your module serves us well
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- Charles Randall
- Prole
- Posts: 34
- Joined: Wed May 09, 2012 2:52 pm
Re: Xinput for Love (Real Xbox controller support) ALPHA
Ah. Yeah, my hands are kind of tied since Xinput is windows only. If there were mac libs, I could conceivably do a version for that too, since I have a macbook pro, but I wouldn't be able to test/dev Linux.Lafolie wrote:I would love to test it but unfortunately (or fortunately if you look at it in other ways) I don't use Windows.
But a quick google shows there is a driver for Mac which enables the 360 controller to work. If that's true and it's built to allow the triggers to work as independent axes, then using the standard love.joystick should be perfectly acceptable for that.
- Charles Randall
- Prole
- Posts: 34
- Joined: Wed May 09, 2012 2:52 pm
Re: Xinput for Love (Real Xbox controller support) ALPHA
So just for a bit of background, one of the big reasons why I'm so gung-ho about xbox controllers is that it provides a standard interface that is known. When people use random controllers, the onus is on the gamer to configure his buttons. In Love that's extra painful because it means that people have to implement their own controller remapping, which a lot of people won't bother doing. So maybe you get a gamer who grabs your game and he just uses whatever random joystick he has, and then his buttons are strange and he has a poor experience. Or even worse, your game doesn't support remapping, and he simply chooses not to play instead.
Unacceptable.
With the XInput libs, you are guaranteed a level of consistency, with a controller that is fairly common, on the platform that is the most common. It's a boon that shouldn't be ignored. And if you are gaming on a different platform, well, if I keep API compatibility, then it's just a simple swap-in and other platforms can still play, with the caveats that previously existed *anyway*.
Even if you are developing on other platforms, given the multiplatform nature of Love2d, it makes sense to think about your most common gamer scenario.
Unacceptable.
With the XInput libs, you are guaranteed a level of consistency, with a controller that is fairly common, on the platform that is the most common. It's a boon that shouldn't be ignored. And if you are gaming on a different platform, well, if I keep API compatibility, then it's just a simple swap-in and other platforms can still play, with the caveats that previously existed *anyway*.
Even if you are developing on other platforms, given the multiplatform nature of Love2d, it makes sense to think about your most common gamer scenario.
- Charles Randall
- Prole
- Posts: 34
- Joined: Wed May 09, 2012 2:52 pm
Re: Xinput for Love (Real Xbox controller support) ALPHA
Oh, and as a side project to this, I'm working on a lua library that will smooth out some of those issues, such as supporting controller remapping via config file, button naming, etc, so that you can have a relatively controller-independent game implementation, and use it so that you can make sure to provide the most consistent experience possible to your players.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Xinput for Love (Real Xbox controller support) ALPHA
Stop double-posting (or triple-posting), please.
Re: Xinput for Love (Real Xbox controller support) ALPHA
This is the de facto xbox controller driver for mac. I've been using it for years.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- Charles Randall
- Prole
- Posts: 34
- Joined: Wed May 09, 2012 2:52 pm
Re: Xinput for Love (Real Xbox controller support) ALPHA
I gave that a whirl. It does recognize the triggers independently, but the rest of its functionality is super strange. Don't know if that's SDL's fault or not, but it will be something I'll look into.
I've been pointed out to how to make a dll that can be included in the game, so that's the route I'll take for the windows version. Will try and get it done for next weekend, but I'll be rather busy so it might not make it that quickly.
Ideally for the mac version what I'll do is explore that driver and see if there's a way I can know that I'm using a device from that driver, and if so, make my xinput libs work identical to how they'd work on windows, via whatever kind of remapping is necessary. Then at least I'll have mac and PC covered.
After that, if someone wants to work with me to get a linux version working, that would be ideal. Since I'm developing everything on github anyway, if someone wants to join in I can easily give them repo access.
I've been pointed out to how to make a dll that can be included in the game, so that's the route I'll take for the windows version. Will try and get it done for next weekend, but I'll be rather busy so it might not make it that quickly.
Ideally for the mac version what I'll do is explore that driver and see if there's a way I can know that I'm using a device from that driver, and if so, make my xinput libs work identical to how they'd work on windows, via whatever kind of remapping is necessary. Then at least I'll have mac and PC covered.
After that, if someone wants to work with me to get a linux version working, that would be ideal. Since I'm developing everything on github anyway, if someone wants to join in I can easily give them repo access.
- Charles Randall
- Prole
- Posts: 34
- Joined: Wed May 09, 2012 2:52 pm
Re: Xinput for Love (Real Xbox controller support) BETA
Hey all, beta version is now available as a standalone DLL module.
Repo: https://github.com/mrcharles/XInputLUA
Update test app: https://github.com/mrcharles/love2d-x360-test
If you can't build XInputLUA yourself, you can grab the DLL from the test app.
This is a beta release, I'm sure there are issues. Primarily is that I have yet to test it with non-360 controllers.
Anyone willing to try it out, please post in this thread and let me know if any issues. Thanks!
Repo: https://github.com/mrcharles/XInputLUA
Update test app: https://github.com/mrcharles/love2d-x360-test
If you can't build XInputLUA yourself, you can grab the DLL from the test app.
This is a beta release, I'm sure there are issues. Primarily is that I have yet to test it with non-360 controllers.
Anyone willing to try it out, please post in this thread and let me know if any issues. Thanks!
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Xinput for Love (Real Xbox controller support) ALPHA
I'll try this out as soon as I can! It's been kind of a pain trying to make gamepad controllers work nicely with my game.
It's worth noting that the driver's button mappings are different (and currently unconfigurable) compared to the native Windows driver mappings.Lafolie wrote:This is the de facto xbox controller driver for mac. I've been using it for years.
Who is online
Users browsing this forum: Bing [Bot] and 0 guests