Running in an OUYA?

Create issue
Issue #74 wontfix
Pablo Ariel Mayobre created an issue

Well there is no current way to know if we are running in an OUYA, it would be great if there was some method to know (defined on installation or whatever) so that I can do:

if OUYA then
    --Correct the "menu" and "escape" key behavior

Comments (12)

  1. Martin Felis repo owner

    Hrm... yes that would be nice. Do you know of any way in Java how to detect whether it is running on an Ouya?

  2. S C

    If you can implement the current version of the ODK, you definitely should be able to detect the OUYA. Also, if that can be sorted out, then you could also detect the other devices compatible with it, such as the Mad Catz M.O.J.O. console and others as they are added.

    As an added bonus, you could also make use of the built in controller support for different kinds of controllers. It also can fetch the correct button image for a particular controller when plugged in, allowing the supported controllers to get the appropriate button shown for them.

  3. Pablo Ariel Mayobre reporter

    I don't want the ODK to be included, if it's something I can do in Lua then I don't want it inside of LÖVE. Mostly because it would mean that I would be forced to include it in any Android game I make even when I don't have any intention of deploying to the OUYA.

    So in this case the minimal implementation is better, the rest can be added by whoever needs it.

    What module would this fit in? system as love.system.vibration()? This would be other ideal case for the phone module (although it might be vague since Android runs in tablets too)

  4. S C

    To each their own, of course. I'd certainly like some help with the ODK for implementing this and other features into my games. Doesn't have to be built in.

  5. Pablo Ariel Mayobre reporter

    Just a few questions:

    • Which features are you interested in?
    • Do you need the whole ODK?
    • Can those features work with other devices?

    If they work in many devices then they may be added to LÖVE. If they are simple they can be added through a lua library. If they are useful then there is possibility of them being added. If you dont need the whole thing then you might be able to strip it down to the minimum

  6. S C

    I am interested in all of the features, in-app purchases included. I would like to have the entire ODK, and besides IAP, because it is to help get the game to work on devices that support the OUYA store through OUYA Everywhere. Currently, that's just M.O.J.O., but two more devices are on the list to be implemented (Nuvola and Wikipad), and there's supposed to be more to come.

    If it works beyond that, I'm not sure.

  7. Pablo Ariel Mayobre reporter

    Yeah sounds good. It would be nice to have some kind of Java > Lua interaction (It would be something like Java > C > Lua but the idea is the same) It would allow someone to easily add Java code to LÖVE android and interact with it in the Lua side. This would allow to add in game purchase, Google Play Games highscores and trophies and better adds and adding the ODK with this would mean no problem (maybe declare the Java functions to interact with Lua).

    Is this possible at all?

    Maybe something like:
        JavaFunction (Java function definition)
    main.lua (inside of LOVE)
        LuaFunction() --Calls JavaFunction
  8. Pablo Ariel Mayobre reporter

    What about type conversions? Since Java arrays are of one type and Lua tables are mixed types? How are this things handled?

    I would love to have this feature added

  9. Log in to comment