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

Request for Ouya controller support #220

Closed
TPeter07 opened this issue May 9, 2013 · 24 comments
Closed

Request for Ouya controller support #220

TPeter07 opened this issue May 9, 2013 · 24 comments
Assignees
Labels
Milestone

Comments

@TPeter07
Copy link

TPeter07 commented May 9, 2013

Hey guys,

This is Tim. You guys helped me a while ago with getting my game working on Android. Because we're so interested in the Android platform, we'd like to request support for Ouya controllers in melon if this is possible. Ouya comes out in June I believe. We're obviously not trying to ask for it by release or anything like that. However, we'd definitely like to get our Melon made game onto Ouya ASAP :). Thanks in advance!

@obiot
Copy link
Member

obiot commented May 9, 2013

Hi Tim,

That would be great, and furthermore I think I read somewhere (maybe on the ouya website documentation) that classical keyboard event can be used for the controller (although analog control for sure require more love), but it could be quite easy for the classic (digital) controller events.

now the only small problem so far is that we don't have yet an Ouya, so we can so far only blindly add support for it :)

by the way, any link to the android market for you game ? Having a full game reference is still nice to see and ease as well to promote melonJS !

@mluyties
Copy link

Hi Olivier,

That would be fantastic if the controller support works that way... will
make implementation much simpler for us.

As for a game on the market, we aren't to that stage yet. We are pushing to
get a demo ready for the Ouya launch. Our current release date for the full
game is targeted for August 31st. Once we are ready though, we will
definitely let you guys know so that you can add it to the melon website =)

Thanks,
Mike

@obiot
Copy link
Member

obiot commented Jul 23, 2013

@TPeter07 @mluyties

Hi Guys,

We still don’t have any Ouya here, so no that much progress to share on our side, but as the given deadline is approaching I was wondering if you actually succeed to get your game running on the console ?

Thanks for the feedback !

@gregoriobenatti
Copy link

melonJS works fine with some gamepad? For example xbox wired controller?
I see in anyplace that the OUYA works with xbox gamepad, maybe it is the
same...

The ideia is export the game for native console app or use gamepad on
browser game?

Gregório Benatti
http://www.gregoriobenatti.com
http://about.me/gregoriobenatti

On Tue, Jul 23, 2013 at 6:27 AM, Olivier Biot notifications@github.comwrote:

@TPeter07 https://github.com/TPeter07 @mluytieshttps://github.com/mluyties

Hi Guys,

We still don’t have any Ouya here, so no that much progress to share on
our side, but as the given deadline is approaching I was wondering if you
actually succeed to get your game running on the console ?

Thanks for the feedback !


Reply to this email directly or view it on GitHubhttps://github.com//issues/220#issuecomment-21402721
.

@mluyties
Copy link

Hey, thanks for the follow up!

Unfortunately, we are still waiting on cocoonJS to support the Ouya
platform, so we haven't made any progress at all =/ They have a blog post
somewhere that they have been working with the Ouya team on implementation,
but we have not yet seen anything.
If anyone else has attempted to port their game to Ouya using a different
way, please let me know =)

@obiot
Copy link
Member

obiot commented Jul 24, 2013

@gregoriobenatti
sure it can once used together with the gamepad API. We don't have (yet) an official plugin for it, but a few people did the exercise (check there : #34)

@mluyties
sure, what about your game itself, anything to show (as last time you were talking as well about the android market) :P :P :P

@gregoriobenatti
Copy link

Really nice! I will see a little closer when I back to work on my
graduation paper.

Gregório Benatti
http://www.gregoriobenatti.com
http://about.me/gregoriobenatti

On Tue, Jul 23, 2013 at 10:46 PM, Olivier Biot notifications@github.comwrote:

@gregoriobenatti https://github.com/gregoriobenatti
sure it can once used together with the gamepad API. We don't have (yet)
an official plugin for it, but a few people did the exercise (check there :
#34 #34)

@mluyties https://github.com/mluyties
sure, what about your game itself, anything to show (as last time you were
talking as well about the android market) :P :P :P


Reply to this email directly or view it on GitHubhttps://github.com//issues/220#issuecomment-21458765
.

@mluyties
Copy link

@olivier
I'm looking to put out the demo of my game in the next few days and am just
trying to solve the firefox refresh issue (thread here:
https://groups.google.com/forum/?hl=en#!topic/melonjs/sU6d-zLlvp4). Since
this takes down my entire server when it happens, which is also hosting my
rental website (www.rentermonsters.com), I can't release the game as is.

I'd love your feedback on the game! You can see it here:
http://www.rentermonsters.com/games/RiseoftheMonsters.php

@obiot
Copy link
Member

obiot commented Jul 25, 2013

@mluyties
Hi, i'm just reading this after reading your message in the forum, and it seems that finally everything is fine :)
I must say, i'm happy it's somehow fixed itself, because I was also puzzled about the possible causes...

will definitely have a look at your game !
cheers,
Oliver

@ghost ghost assigned parasyte Aug 3, 2013
@parasyte
Copy link
Collaborator

parasyte commented Aug 3, 2013

I received my Ouya today, so I'll take this ticket and see how far I can get tonight.

I'm thinking we need a new "me.input.GamePad" class that can be extended for specific kinds of controllers, like Ouya, Xbox 360, PS3, etc. These will mostly be very light wrappers around the GamePad API (#34).

@obiot
Copy link
Member

obiot commented Aug 3, 2013

lucky you ! :P

my gut feeling was that either :

  • it could work out of the box through some specific key code

OR

  • it could work using the gamepad api

damn i need an Ouya too !

@parasyte
Copy link
Collaborator

parasyte commented Aug 3, 2013

In my search tonight, I just found this: https://bitbucket.org/ludei/cocoon_cocoonjsextensions/src/85af16c2acaf081df134487f720dd94f6e5459da/CocoonJS_OUYA.js?at=master

It looks like just the thing we need! No telling how to actually use it, but it appears CocoonJS is actively working on Ouya support. I do not know which CocoonJS version has the Ouya support, possibly not available in any released build. I've sent an email to Ludei for confirmation.

I have also just recorded the complete button mapping for the controller as reported by Chrome. It's kind of unusable, though, because the controller takes over mouse and some keyboard input. Pressing the A button activates Exposé, and the O and U buttons activate the mouse button. My cursor stays stuck in the corners of the screen while using the controller, and just generally interacting in a truly annoying way.

Also, the analog readouts are bogus, especially L2.

The touch pad (in theory) works exactly like a normal track pad/mouse. But with the cursor stuck in the corners of the screen, it's pretty much useless.

Ouya controller mapping for GamePad API

buttons[0]  : O
buttons[1]  : U
buttons[2]  : Y
buttons[3]  : A
buttons[4]  : L1
buttons[5]  : R1
buttons[6]  : L3
buttons[7]  : R3
buttons[8]  : D-pad Up
buttons[9]  : D-pad Down
buttons[10] : D-pad Left
buttons[11] : D-pad Right
buttons[12] : L2 Digital
buttons[13] : R2 Digital
axes[0]     : LS X  (1 .. -1; 0x0001 - 0xFFFF)
axes[1]     : LS Y  (1 .. -1; 0x0001 - 0xFFFF)
axes[2]     : L2    (1? .. -1; 0x???? - 0xFFFF)
axes[3]     : RS X  (1 .. -1; 0x0001 - 0xFFFF)
axes[4]     : RS Y  (1 .. -1; 0x0001 - 0xFFFF)
axes[5]     : R2    (1 .. -1; 0x0001 - 0xFFFF)

@obiot
Copy link
Member

obiot commented Aug 5, 2013

did a bit some research on my side, and should be definitely achievable through ticket #34 ! did you get any feedback from the cocoonJS guys on when it might be available ?

Also, did you sniffed the user agent for the ouya ? you might try implementing some trick like if ouya then map the o/u/y/a keys, else map up/down/left/right

else, what was your idea for a potential me.gamepad api ? personally what I would like to have is a "bindButtonTokey" function that would optionnally allow to trigger a key event when a button is pushed.

@mluyties
Copy link

I just heard back from Ludei and they said "we want to release Ouya support
within the next 2 months".

On Sun, Aug 4, 2013 at 10:18 PM, Olivier Biot notifications@github.comwrote:

did a bit some research on my side, and should be definitely achievable
through ticket #34 #34 ! did
you get any feedback from the cocoonJS guys on when it might be available ?

Also, did you sniffed the user agent for the ouya ? you might try
implementing some trick like if ouya then map the o/u/y/a keys, else map
up/down/left/right

else, what was your idea for a potential me.gamepad api ? personally what
I would like to have is a "bindButtonTokey" function that would optionnally
allow to trigger a key event when a button is pushed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/220#issuecomment-22087570
.

Sincerely,
Mike Luyties, CEO of RenterMonsters.com
www.rentermonsters.com
http://www.rentermonsters.com

@parasyte
Copy link
Collaborator

Awesome news! I'll be hacking on this as soon as it is available. :)

@obiot
Copy link
Member

obiot commented Sep 12, 2013

Same here, I got myself an ouya too earlier this week :)

@parasyte
Copy link
Collaborator

HTML5 Gamepad API support for Ouya is available now in CocoonJS starting with v1.4.4. It's time to make this happen!

FYI, this forum poster claims that the glitchy behaviour on OSX can be solved with an empty driver: http://ouyaforum.com/showthread.php?3185-Ouya-controller-input-on-computer-macosx&p=78432&viewfull=1#post78432

Also note that the user describes the same craziness with the L2 trigger. This means we'll need to normalize this trigger in melonJS itself, at least on OSX.

And one more link, gamepad API documentation for CocoonJS: http://wiki.ludei.com/cocoonjs:extensions:gamepad

@mluyties
Copy link

mluyties commented Feb 6, 2014

Hey guys, any idea on when we will see this implementation? I'd love to get my game on to the Ouya =)

@obiot
Copy link
Member

obiot commented Feb 7, 2014

someone posted the plugin he made (in the game pad ticket #34) for another framework and It should be quite easy to port it to melonJS, just need someone motivated that knows melonJS a little and with 1 day of free time to do it :p

@obiot obiot modified the milestones: 1.0.0, Future Feb 7, 2014
@agmcleod
Copy link
Collaborator

agmcleod commented Feb 7, 2014

Hmm, i wouldnt mind poking at the gamepad api, or checking out said plugin. Problem is I don't think I have a controller I can test with. I have a 360 wireless, no cable :(

@obiot
Copy link
Member

obiot commented Mar 4, 2014

@parasyte so did you finally managed to get it working ? 1.0.0 ?

@parasyte
Copy link
Collaborator

parasyte commented Mar 4, 2014

This should actually work now with latest CocoonJS on mobile, and on OSX with the empty driver (see post above; we should add that to the wiki) ... Standard HTML5 gamepad API will work with Ouya controller from there.

@obiot
Copy link
Member

obiot commented Mar 4, 2014

@parasyte yes sorry I was actually referring to the plugin (#34) you were talking about a couple of weeks ago ?

@obiot
Copy link
Member

obiot commented Mar 4, 2014

but it was indeed added in the version 1.4.4 of cocoonJS :
http://blog.ludei.com/html5-gamepad-api-support-in-cocoonjs-android-ouya-nvidia-shield/

so yes, we can close this one and only keep ticket #34

@obiot obiot closed this as completed Mar 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants