Close
Advertise Here
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Controller Help

Hybrid View

  1. #1
    OUYA Developer Steven W. Hunt's Avatar
    Join Date
    Sep 2013
    Location
    Moesko Island, WA
    Posts
    533


    Controller Help

    Well, I've finally got my testbed game running on OUYA. Prior to this, I'd had my 360 controller testing on my PC, using the left stick to move and A to fire. Now on the OUYA, the sticks and buttons don't do squat, and only the D-Pad manuevers. What the diddly-doodly is going on here?
    http://www.ccshgames.com - Updated 1/30/2015
    OUYA games I've had a hand in: Slashers: The Power Battle (voice actor), Battle High 2 (casting/marketing director, voice actor)

  2. #2
    OUYA Developer dra6onfire's Avatar
    Join Date
    Jun 2013
    Location
    San Antonio
    Posts
    910


    Im curious. Is your controller oem? Wireless or usb? Are you using the ouya controller classes to handle input?

    I know that oem xbox 360 controllers connected by the wireless dongle thing works well. I dont know about usb connected ones.
    Nostalgia 2.4.2 is published in Discover

  3. #3
    OUYA Developer Steven W. Hunt's Avatar
    Join Date
    Sep 2013
    Location
    Moesko Island, WA
    Posts
    533


    What I'm trying to use on the OUYA, is just the regular ol' OUYA controller.
    http://www.ccshgames.com - Updated 1/30/2015
    OUYA games I've had a hand in: Slashers: The Power Battle (voice actor), Battle High 2 (casting/marketing director, voice actor)

  4. #4
    OUYA Developer dra6onfire's Avatar
    Join Date
    Jun 2013
    Location
    San Antonio
    Posts
    910


    Right but what did you code for? If you coded based on onKeyPress commands using the integer values for your controller and its not one that maps the same on the ouya, you will have issues. Nostalgia works great with ouya, nyko, moga, ps3, and wireless oem xbox 360 controllers but I have recent reports from one user that usb xbox 360 controllers and non-oem ps3 controllers dont work correctly.

    Oh, also if you set it up to use specifically the first player the ouya occassionally has "sticky" controllers and your ouya controller may not be the first player.
    Last edited by dra6onfire; 02-04-2015 at 02:23 PM.
    Nostalgia 2.4.2 is published in Discover

  5. #5
    OUYA Developer Kaimega's Avatar
    Join Date
    Jun 2013
    Location
    Montreal, Canada
    Posts
    4,146


    Remember, Game Maker on OUYA only works with OUYA controllers. If you have any other controllers paired, you have to unpair ALL controllers, and then pair the OUYA one.

    Don't ask me why..something Yoyogames did
    Last edited by Kaimega; 02-04-2015 at 02:22 PM.
    Racin-Games, creator of Sirenium ~ Forever After ~ .. come check us out here! http://www.racin-games.com
    Forum Page: http://ouyaforum.com/showthread.php?...-Forever-After
    If you want your game/app reviewed, let me know! I'll ReviOUYA. Will also do previews and such as well. http://reviouya.wordpress.com/
    Play like me! http://ouyaforum.com/showthread.php?...imega&p=119559

  6. #6
    OUYA Devotee ajb999's Avatar
    Join Date
    Apr 2014
    Location
    Idaho
    Posts
    216


    What did you use to write your game?
    burdbroscustomarcade.us

  7. #7
    OUYA Developer Kaimega's Avatar
    Join Date
    Jun 2013
    Location
    Montreal, Canada
    Posts
    4,146


    Quote Originally Posted by ajb999 View Post
    What did you use to write your game?
    He is using Game Maker (note the prefix in the title )
    Racin-Games, creator of Sirenium ~ Forever After ~ .. come check us out here! http://www.racin-games.com
    Forum Page: http://ouyaforum.com/showthread.php?...-Forever-After
    If you want your game/app reviewed, let me know! I'll ReviOUYA. Will also do previews and such as well. http://reviouya.wordpress.com/
    Play like me! http://ouyaforum.com/showthread.php?...imega&p=119559

  8. #8
    OUYA Developer Steven W. Hunt's Avatar
    Join Date
    Sep 2013
    Location
    Moesko Island, WA
    Posts
    533


    Quote Originally Posted by dra6onfire View Post
    Right but what did you code for? If you coded based on onKeyPress commands using the integer values for your controller and its not one that maps the same on the ouya, you will have issues. Nostalgia works great with ouya, nyko, moga, ps3, and wireless oem xbox 360 controllers but I have recent reports from one user that usb xbox 360 controllers and non-oem ps3 controllers dont work correctly.

    Oh, also if you set it up to use specifically the first player the ouya occassionally has "sticky" controllers and your ouya controller may not be the first player.
    I've found "part" of the problem; when it was reading my d-pad input, that was vestigial up and down keyboard keys I'd used when initially testing on the PC. It seems GM/OUYA automaps keys to functions on the controller. The only problem is I can't figure out what other keys go with the buttons, let alone how to map it to the left stick...

    This is the sort of code I've been using. Works great with the 360 controller on PC:

    Code:
    if gamepad_axis_value(0,gp_axislv)>0.8
    and then movement code in there.

    Quote Originally Posted by Kaimega View Post
    Remember, Game Maker on OUYA only works with OUYA controllers. If you have any other controllers paired, you have to unpair ALL controllers, and then pair the OUYA one.

    Don't ask me why..something Yoyogames did
    I've never used any controller with my OUYA other than OUYA controllers. I hate having to constantly pair/unpair between systems. I stomach it enough going between my 360 and PC, and that's only because I rarely use my 360 anymore.

    I didn't get a crack at fiddling with it much today and I've been up for almost 48 hours at this point bar a quick nap, so I'm going to try to give it another go after I get some shuteye.

    EDIT: ALRIGHT HERE'S WHAT I GOT
    Went to 2 player mode and all of the stuff I had programmed for player 1 to do, happens with player two :| Wrote up a script to tell me what controllers are attached, and it tells me this, verbatim:

    "No Gamepad Connected
    OUYA Game Controller
    OUYA Game Controller"

    So somehow it's registering no player 1 but instead a player 2 and a player 3?! I've never, ever paired/unpaired any of my OUYA controllers since their initial pairing so I don't understand why that would be.


    I've been trying to get some help over at the GM forums too but so far nothing. Then again it's only been there a few hours, but I digress; the entire linchpin of my stuff's success rides on this.

    So I've been trying to find some code that will allow me to just detect the first controller that is active, instead of forcing in that odd invisible non-controller.

    I've found maybe about 6 or 7 scripts across the net, and none of them seem to function. The one I'm trying right now is courtesy of our own Eldon McGuinness, but he's long since abandoned GM so I've not been able to get anything from him.

    Here's what I'm dealing with:

    In a script called scr_controller

    Code:
    gp_count = gamepad_get_device_count();
     
    controller = 0;
     
    for (count = 0; count <= gp_count; count++)
    {
        if (gamepad_is_connected(count))
        {
            global.gp_connected[controller++] = count;
     
         
            global.gp_count++;
        }
     
    }
     
    if (global.gp_count < 1)
    {
        show_debug_message("No Controllers Connected");
    }
    else
    {
        show_debug_message(string(global.gp_count) + " Controllers Detected");
    }
    obj_controllertest (persistent)

    Create

    Code:
    global.gp_count = 0
     
    alarm[0] = 3;
    Alarm 0

    Code:
    scr_controller();
    Player's character Create Event

    Code:
    PLAYER_ID=0
    Player's character Step Event

    Code:
    if gamepad_button_check(global.gp_connected[PLAYER_ID],gp_face1)
    {if global.fire1=1
    {instance_create(x+32,y+84,firep1)
    global.fire1=0
    }}
    However, I'm getting an error when running this:

    Code:
    FATAL ERROR in
    action number 1
    of Step Event0
    for object obj_p1:
    
    Push :: Execution Error - Variable Get
    -5.gp_connected(100003,0)
    at gml_Object_obj_p1_Step_0
    Last edited by Killswitch; 02-07-2015 at 01:10 AM.
    http://www.ccshgames.com - Updated 1/30/2015
    OUYA games I've had a hand in: Slashers: The Power Battle (voice actor), Battle High 2 (casting/marketing director, voice actor)

  9. #9
    OUYA Developer dra6onfire's Avatar
    Join Date
    Jun 2013
    Location
    San Antonio
    Posts
    910


    This is what I was talking about with sticky controllers. I dont know what causes it and it has always taken cold restarts to resolve it for me. As far as detecting the first controller, I've had trouble with that. I have been able to make it work but fails miserably after a controller has to be reconnected after sleep. I dont use gm but even if you get the detection to work, there are challenges to be dealt with there.
    Nostalgia 2.4.2 is published in Discover

  10. #10
    OUYA Developer rgcd's Avatar
    Join Date
    Jul 2013
    Location
    Exeter, UK
    Posts
    147


    Hey, have a look at our framework: http://gmc.yoyogames.com/index.php?showtopic=649385

    Our games work on Ouya with just about any controller you can throw at it. Also, it supports plug 'n play and checks all connected devices, so you don't need to unpair everything first.
    Last edited by rgcd; 02-07-2015 at 09:13 PM.

Tags for this Thread

Bookmarks

Posting Permissions

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