• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Mac OSX Problem with GamePad Detection

I

IBarcia

Guest
Hi everybody,

I have just bought an 8BITDO SN30 Gamepad to test my shooter in Game Maker studio 2.

The game detects the fire and jump buttons but I can't make it detect the direction pad, the traditional D-pad or "cross".

Any idea? So far, what I've tried is this:

key_right = gamepad_button_check(0,gp_padr);
key_left = gamepad_button_check(0,gp_padl);
key_up = gamepad_button_check(0,gp_padu);
key_down = gamepad_button_check(0,gp_padd);
key_jump = gamepad_button_check_pressed(0,gp_face1); //This one works well
key_shoot = gamepad_button_check(0,gp_face2); //This one works well

Thank you all and have a nice day
 

kupo15

Member
I don't know anything about that controller but are you sure it has a dpad input? The snes controller uses the analog functions, not dpad ones. Just a thought...go into your joystick menu from the start menu and see if the dpad corresponds with dpad inputs
 
I

IBarcia

Guest
Hi kupo15, thank you for your answer,
What I am trying now is this:

key_right = gamepad_button_check(0,gp_axislh);
key_left = gamepad_button_check(0,gp_axislh);
key_up = gamepad_button_check(0,gp_axislv);
key_down = gamepad_button_check(0,gp_axislv);
key_jump = gamepad_button_check_pressed(0,gp_face1);
key_shoot = gamepad_button_check(0,gp_face2);


as you see, I am checking the analog input of the gamepad, but it still doesn't work :( I am afraid that the 8BITDO SN30 is not compatible with GameMaker when using Mac, as it is written down in the GM Manual:

The following list shows current compatibility across the platforms (note that this will change with future updates):

  • Windows is fully supported with up to a maximum of 12 connected devices permitted at once (numbered from 0 to 11, with 0 - 3 being XInput devices and 4 - 11 being DirectInput).
  • Mac OS is supported with up to a maximum of 4 connected devices permitted at once, and these devices can ONLY be of the type Playstation3 or Xbox 360. Please note that the "Build for Mac AppStore" option in Mac Game Options needs to be OFF for pad support to work.
The thing is that the jump and Fire buttons are well detected... I don't know if it is possible that it detects the Dpad too...


Thank you anyway
 
D

dannyjenn

Guest
I don't know... I think GMS2 simply doesn't support certain controllers. e.g. I purchased this controller: https://www.amazon.com/gp/product/B07449HLKJ/ and GMS2 doesn't recognize half the buttons (and the ones it does recognize are not recognized correctly).

My solution: use additional software (such as this for Mac: https://yukkurigames.com/enjoyable/ ) to map your controller to your keyboard. Then you can use the controller, and you don't even need to bother with GameMaker's gamepad functionality. (Might not be what you want though...)
 
Last edited by a moderator:
I

IBarcia

Guest
@dannyjenn
Thank you so much for your reply. It sounds like a great solution! At least in this development stage. I didn't know that such a thing as a controller mapper existed. Thank you so much.

And I apologize for my late reply: I had it in mind but I forgot to do it. Sorry.
Best
 
Top