User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: ** Ouya Control Widget / Ouya Controller Tester! **

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ** Ouya Control Widget / Ouya Controller Tester! **

    Hi everyone! I made a widget for my apps that I can import into any MFA to make detecting and using Ouya controllers much easier! All events and values are held in the Ouya Control object, and all you need to do is copy the object and an Ouya Extension into your frame to use it You can also build this MFA and run it on your Ouya to test your controllers' inputs!

    Download here: OuyaControl1.5.mfa


    Features:
    - Each button press and directional press/joystick direction is stored as a value. When the button's value = 1, the button has been pressed. When the value > 1, the button is being held, and is increased each frame (so if the value = 60, at 60 fps the button has been held for 1 second). When the user lets up on a button, this value is reset to 0.

    - Both the Left and Right Joystick's inputs are saved as both an Angle (0-360) and a Distance from center (0.0-1.0). No more converting from the joystick's X,Y values!

    - Optionally, you can emulate the Left Joystick's inputs as a DPad! All you have to do is set the Ouya Control object's UseJoyAsDPad value to 1! If you don't want the DPad and LJoystick to conflict, remember to set UseJoyAsDPad to 0.


    Tips:
    - If you have an event happen when the user presses a button, and you're not tracking how long buttons are held, you should set that button's value to -1 when you run your event, so that the "time held" is not being tracked any more. It will reset to 0 when the button is let go of:
    Code:
    If OButton("Ouya Control") = (1)
    then
    Set OButton("Ouya Control") to (-1)
    *Run action*
    - MinJoyAxis and MinLongPress are additions to this widget which I use for joystick input Dead Zone detection, and for setting a default value for a "long press" command for when the user holds a button for a certain amount of time.

    - Use the app to test your joysticks for deadzones and your buttons for defects! *please note the issues below!*

    - Edit my code within the Behavior of the Ouya Control object!

    - Delete or disable the code for any buttons you are not using to possibly increase your fps! I personally put them into a disabled group within the Behavior code, so that I don't lose any of my code accidentally



    Issues:
    - When holding R2, L2, U, or Y, they will release prematurely, and go into an activate/deactivate/activate/deactivate infinite loop for some reason. I'm not sure why
    - The System button doesn't seem to work at all... also not sure why
    - There is currently no way to detect how far the L2 and R2 buttons are being pressed. This is useful for racing games, etc, please add this functionality!
    - XBox 360 controller (paired wirelessly via XBox PC usb cord) does not seem to detect L2 and R2 button presses at all!
    - PS3 Controller doesn't like to detect both L1 and L2, or R1 and R2 at the same time. Odd!

    Please share your issues, and confirm my listed issues if you are also experiencing them!!

    Download here: OuyaControl1.5.mfa

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Koji_Kabuto's Avatar
    Join Date
    Jul 2006
    Location
    Venezuela
    Posts
    2,851
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Excellent contribution and love to see clickers community be so aware of the OUYA, I say that although it is not the definitive console is that it will not be the only and allows us to be prepared for the future.

    Why you asked Anders in a POST that check the Gamepad support in iOS 7 and implement it at once, because I'm sure that Apple at any time surprises us with a console, is your Apple TV or something new. That is imminent!

    OUYA paved the way!

  3. #3
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Dec 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You, my friend, are awesome. Thank you for this!

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Javira's Avatar
    Join Date
    Mar 2012
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome, thanks for sharing.

    When making the widget, did you figure out how to get stick input for more than one joypad? To me it looks like to control object i broken, but I'm prob. just clueless.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm planning on expanding this for multiple controllers, stay tuned :-)

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Javira's Avatar
    Join Date
    Mar 2012
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let me know if you are succesfull in returning a value from one of the sticks on a different controller.
    We are several that can't figure it out.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update 7/8:
    I fixed my issues with U,Y,R2, and L2... it was a dumb coding error :P I'll re-upload the source soon.

    You are all correct, the LeftStickXForPlayer expression is broken. It asks for two inputs, but does not accept any types of inputs (integer, string...) in any configuration. If you delete the commas, it will accept the expression but crash the app when testing on Ouya. LeftStickXForPlayer( "OUYA object", , ) should actually be formatted as: LeftStickXForPlayer( "OUYA object", X ) where X is an integer (player number).

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    New update: fixes some coding issues; fixes Y, U, L2, and R2 early release issues; adds my experiments with multiplayer in Frame 2 (multiplayer doesn't work correctly with the Ouya's joysticks yet...)

    Download here: OuyaControl1.7.mfa

    (if someone wants to edit my first post to replace the old download with this one, that would be awesome!)

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Matriax's Avatar
    Join Date
    Dec 2012
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Bipolar_Games View Post
    New update: fixes some coding issues; fixes Y, U, L2, and R2 early release issues; adds my experiments with multiplayer in Frame 2 (multiplayer doesn't work correctly with the Ouya's joysticks yet...)

    Download here: OuyaControl1.7.mfa

    (if someone wants to edit my first post to replace the old download with this one, that would be awesome!)
    Hi, i'm using your example in my game on i use the left stick to move the player and i'm trying to use the right stick as mouse.

    I see the distance in your example is variable depending in the expresion: "X( "Center" )+(value( "CounterJoyRX" )*1.3)" and the same for Y. Actually for my game resolution works perfect using 1.3 for X and 0.8 for Y. With this i can go to every pixel in the screen.

    But i have a problem and thats is that the pointer not moves pixel-by-pixel and seems little difficult to move. Where i can change it?

    The game resolution of my game is 256x144.

    And great work on it!

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can I take a look at your code? I'll see what I can do

    (you can e-mail it to me if you like, bipolardesign AT gmail)

Page 1 of 2 1 2 LastLast

Similar Threads

  1. OUYA controller - Buttons
    By Sparckman in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 29th September 2014, 02:40 AM
  2. Ouya controller Y axis reversed - how to over come this?
    By method72 in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 11th November 2013, 03:26 PM
  3. OUYA keyboard to controller after update Build 257.27
    By Sparckman in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 3rd September 2013, 11:37 PM
  4. OUYA controller events not working as they should?
    By Diablohead in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 29th June 2013, 09:49 PM
  5. Quick question about ouya and controller support
    By Diablohead in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 9th June 2013, 02:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •