• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX [Solved: Use Windows lol] Gamepad Support with newer Xbox ONE Controllers

K

Kilo

Guest
I have two wired Xbox ONE controllers, and have successfully connected them to my Mac (running Sierra).

My problem is, Gamemaker is not registering inputs from the controller.

I have character controls set in the Step event by a control object as follows:

Code:
if !gamepad_is_connected(0) {
    
    // PLAYER 1
    global.P1_left = keyboard_check(ord("A"))
    global.P1_right = keyboard_check(ord("D"))

    global.P1_duck = keyboard_check(ord("S"))
    global.P1_duck_rel = keyboard_check_released(ord("S"));

    global.P1_jump = keyboard_check_pressed(ord("W"));
    global.P1_jump_rel = keyboard_check_released(ord("W"));

    global.P1_attack1 = keyboard_check_pressed(ord("X"));
    global.P1_attack1_rel = keyboard_check_released(ord("X"));
    global.P1_attack2 = keyboard_check_pressed(ord("C"));
    global.P1_attack3 = keyboard_check_pressed(ord("V"));
    
} else {
    // PLAYER 1 Gamepad
    global.P1_left = gamepad_axis_value(0, gp_axislh) < 0;
    global.P1_right = gamepad_axis_value(0, gp_axislh) > 0;

    global.P1_duck = gamepad_axis_value(0, gp_axislv) > 0;
    global.P1_duck_rel = gamepad_axis_value(0, gp_axislv) <= 0;

    global.P1_jump = gamepad_button_check_pressed(0,12);
    global.P1_jump_rel = gamepad_button_check_released(0,12);

    global.P1_attack1 = gamepad_button_check_pressed(0,8);
    global.P1_attack1_rel = gamepad_button_check_released(0,8);
    global.P1_attack2 = gamepad_button_check_pressed(0,9);
    global.P1_attack3 = gamepad_button_check_pressed(0,15);
    
}
And I get no ability to move as the character, since it appears Gamemaker is detecting the gamepad being connected, but fails to read the inputs from it.

Are Xbox ONE controllers not compatible with GMS2 for Mac (I saw in the handboox they specifically listed Xbox 360) , or is there an obvious element that I am missing here? I can provide the controller model number (Power A 1427470-01).

I appreciate any help directed my way.
 

rIKmAN

Member
Are Xbox ONE controllers not compatible with GMS2 for Mac (I saw in the handboox they specifically listed Xbox 360) , or is there an obvious element that I am missing here?
Not sure about Mac, but XB1 controller are detected and work fine on PC (Windows 10), and I would assume if the OS picks them up then they would be available to use.

Have you tested if the pads work in another game / piece of software that isn't GMS2?
Are the pads detected in the Asynchronous System Event when connected / disconnected to the Mac?
 
K

Kilo

Guest
Not sure about Mac, but XB1 controller are detected and work fine on PC (Windows 10), and I would assume if the OS picks them up then they would be available to use.

Have you tested if the pads work in another game / piece of software that isn't GMS2?
Are the pads detected in the Asynchronous System Event when connected / disconnected to the Mac?
Argh, I guess I didn't try other games yet. I tried 2 now, and they both didn't work, so I guess it's back to square one.

I also have not enabled any async events. Before GMS2, I used GM6 so some of these functions are new to me. I won't ask how they operate, as I can do that research on my own.

Thank you for the direction however! I won't lock this thread in case a Mac-gamepad expert drops in, and I'll post if I find a solution myself. Cheers!
 

rIKmAN

Member
Argh, I guess I didn't try other games yet. I tried 2 now, and they both didn't work, so I guess it's back to square one.

I also have not enabled any async events. Before GMS2, I used GM6 so some of these functions are new to me. I won't ask how they operate, as I can do that research on my own.

Thank you for the direction however! I won't lock this thread in case a Mac-gamepad expert drops in, and I'll post if I find a solution myself. Cheers!
If you check this page of the manual: http://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/controls/gamepad input/index.html
at the top it mentions the System Event being triggered when pads are added / removed.

Follow your nose through a couple of pages (System Event > Gamepads) and it explains how it works, and if you search on here there are a few code examples of how to use the event and check for the pads being connected / disconnected.

In saying that though, if the pads aren't working in other games then it isn't a GMS2 issue, it's an issue with Mac OS not detecting your pads at all so you should probably try and get that fixed before looking at anything GMS specific.

Are there any special Mac drivers or tools/apps that need to be used to get them working on a Mac?
(Sorry not a Mac user, can't help much here)
 
K

Kilo

Guest
If you check this page of the manual: http://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/controls/gamepad input/index.html
if the pads aren't working in other games then it isn't a GMS2 issue, it's an issue with Mac OS not detecting your pads at all so you should probably try and get that fixed before looking at anything GMS specific.

Are there any special Mac drivers or tools/apps that need to be used to get them working on a Mac?
(Sorry not a Mac user, can't help much here)
Definitely. I have figured that much as well, I jumped the gun with assuming that the inputs were working.

For thread's reference:

I am running macOS Sierra (10.12.6)
I am using 360Controller 0.16.5 (https://github.com/360Controller/360Controller/releases)
> my next step here is top try other versions​

https://imgur.com/a/mWEUh

Pic of the interface for 360controller. The device is listed as found, but the inputs are not registering (this is where my issue lies). No matter how I tinker with the settings, I cannot get the inputs to register.

Obviously this isn't a problem with GMS anymore - but I still hope to keep this thread open as I plan on updating with my findings, FOR PROSPERITY! (I believe I have SEO optimized the content on this page for future google searchers encountering the same problem ;) )
 
K

Kilo

Guest
My solution: Installing Parallels to run Windows on my Mac. After installing controller drivers on the virtual machine, the controllers work like a charm, on the computer, and on GMS.

Now I can actually export my game into an executable without paying the Apple Developer $99 a year as well ;)

Not really solved, since Mac was still unable to recognize the controllers inputs, but from a bit of research, older models of controllers (I purchased mine in November 2017) (Xbox ONE earlier models (around April 2017), AND Xbox 360 models) should be able to work with the 360controller driver on Mac, since the driver was last updated in April 2017.

Or perhaps it is a Sierra incompatibility, I'm not really sure but maybe some developer may know and use my findings as a springboard. Cheers!
 
Top