Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Controller Support #22

Closed
Percipient24 opened this issue Jun 5, 2016 · 6 comments
Closed

Better Controller Support #22

Percipient24 opened this issue Jun 5, 2016 · 6 comments

Comments

@Percipient24
Copy link
Member

Currently the game is supposed to work with OUYA, Xbox 360, and PS3 controllers, along with the keyboard.

Keyboard support looks like this:

Right side: Enter to select, Backspace to back out. ; joins/leaves character select. Arrow keys move. Quote punches. Enter jumps (while moving).

Left side: 1 to select. Tab to back out. Q joins/leaves character select. wasd moves. Tab punches. 1 jumps (while moving).

P pauses while in-game.


It should support any controller.
It should allow controller configuration (ie, press buttons to set buttons).

@Percipient24
Copy link
Member Author

@ahollenbach - What type of controller were you using (that didn't work)?

@ahollenbach
Copy link

I actually cracked out the Ouya controller for this one 😜

On Sun, Jun 5, 2016, 10:32 PM Joe Pietruch [email protected] wrote:

@ahollenbach https://github.com/ahollenbach - What type of controller
were you using (that didn't work)?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#22 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABl5uyOAx5e-cDM3R4pfLik5ZzazEIjnks5qI4bRgaJpZM4IueLv
.

@Percipient24
Copy link
Member Author

Interesting. We had issues with the OUYA controller on Mac - the touchpad would cause the mouse to move towards a corner forever, which made using the machine at all difficult. Maybe they released updated drivers recently?

I've got plenty of those, so I'll give it a go later tonight and see what's up.

@Percipient24
Copy link
Member Author

I didn't forget about you, @ahollenbach!

Ugh, what a mess this is! :-P

Apparently on OSX 10.11 one isn't allowed to install unsigned drivers. Of course there are work-arounds, and I got some of the way there before hitting a brick wall.

First, I found this forum post ( http://ouyaforum.com/showthread.php?3185-Ouya-controller-input-on-computer-macosx ), and tried the drivers there. It didn't work. Even the suggested command:

sudo kextload /System/Library/Extensions/OUYAGameController.kext

Gave an error along the lines of:

/System/Library/Extensions/OUYAGameController.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).

Troubleshooting that error lead me to this conversation ( pje/WavTap#60 ), which suggested the following steps:

  1. Restart Mac and hold Cmd + R while booting.
  2. Use the menu bar to open Utilities > Terminal
  3. Run the command csrutil disable
  4. Reboot the system and run the sudo kextload... command from above.
  5. Profit.

That worked - now the game at least recognizes an OUYA Controller is attached. Problem is, while the buttons work just fine, the thumbstick and trigger axis values are all kinds of strange. I think it's because libGDX expects its axis values to come in as floats, while that driver is reporting them on a range from 0x0000 to 0xFFFF where 0x8000 is the center.

I naively tried to take the 'float' I got, send it to binary, and tried to reconstruct the 0x0000-0xFFFF from there, but even that seems broken/wrong.

I'm going to write an email to the driver creator, and see what it would take to change axis from int-reporting to float-reporting - or if he has any other suggestions.

Unless there's further progress, I recommend not using OUYA controllers on the Mac. :-/

@ahollenbach
Copy link

Thanks for the update! I'll see if I can get another controller up and working.

Percipient24 added a commit that referenced this issue Jun 25, 2016
Closes #22!
With the help of https://github.com/ChainGangChase/ouyacontrollerosx
Many thanks to Edmund Kapusniak
@Percipient24
Copy link
Member Author

It works!

The creator of the OSX driver responded to my email with a new version of the driver (which I've forked into ChainGangChase to keep a snapshot).
https://github.com/ChainGangChase/ouyacontrollerosx

With that installed and #42 going, the OUYA Controller will work on OSX 10.11!

Thank you @edmundmk!
Thank you @ahollenbach!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants