Game Maker Studio Standard Mac Export Module

GameMaker Studio is designed to make developing games fun and easy. Coders can take advantage of its built in scripting language, 'GML' to design and create fully-featured, professional grade games. This subreddit is not designed for promoting your content and is instead focused on helping people make games, not promote them.

Module


GameMaker Studio 2 has a number of dedicated functions that can be used to detect both analogue and digital controls from multiple connected game pads. These functions work similar to the Device Inputs, in that you can detect up to four different XInput game pads that are connected (and up to 8 DirectInput gamepads) and deal with the input from each one using the same functions. Note that when a gamepad is plugged in to your device (or it is removed) then an asynchronous System Event is triggered where you can deal with the situation using the appropriate functions.

Game Maker Studio Standard Mac Export Module 1

The gamepad 'slots' are indexed from 0 with slots 0 - 3 inclusive being only for Xinput gamepads, ie: Xbox360 controllers and compatibles. However you can also check slots 4 - 11 inclusive for DirectInput gamepads, which means you can detect many other models of controller when connected through these slots. It is worth noting that when using DirectInput gamepads, the constants given below may not match exactly the buttons that you expect when they are pressed, due to the fragmented and non-standardised way that the API is implemented by controller manufacturers. Because of this, it is recommend that you have some kind of gamepad setup screen in your games where people can redefine the gamepad buttons based on input from any connected to device to mitigate any issues (there are gamepad 'mapping' functions that can help with this on Windows Desktop, Ubuntu, macOS, and Android targets, while on all others you would need to do this yourself using code). Also note that Direct Input gamepads are run in cooperative mode which means that your game only has access to them when it is the foreground application, which in turn will cause Direct Input controllers to be 'lost' if the game loses focus and then 'found' again when it comes back into focus (this can be detected in the System Event and dealt with).

When working with the gamepad functions, input can come from axis, buttons and/or hats, which GameMaker Studio 2 will assign to some or all of the following built-in constants (note that 'hats' are generally only detected on non-standard controllers):

ConstantDescription
gp_face1Top button 1 (this maps to the 'A' on an Xbox 360 controller and the cross on a PS controller)
gp_face2Top button 2 (this maps to the 'B' on an Xbox 360 controller and the circle on a PS controller)
gp_face3Top button 3 (this maps to the 'X' on an Xbox 360 controller and the square on a PS controller)
gp_face4Top button 4 (this maps to the 'Y' on an Xbox 360 controller and the triangle on a PS controller)
gp_shoulderlLeft shoulder button
gp_shoulderlbLeft shoulder trigger
gp_shoulderrRight shoulder button
gp_shoulderrbRight shoulder trigger
gp_selectThe select button (this is the PS button on a DS4 controller)
gp_startThe start button (this is the 'options' button on a PS4 controller)
gp_sticklThe left stick pressed (as a button)
gp_stickrThe right stick pressed (as a button)
gp_paduD-pad up
gp_paddD-pad down
gp_padlD-pad left
gp_padrD-pad right
gp_axislhLeft stick horizontal axis (analogue)
gp_axislvLeft stick vertical axis (analogue)
gp_axisrhRight stick horizontal axis (analogue)
gp_axisrvRight stick vertical axis (analogue)


To better understand exactly what part of the controller each constant represents, you can refer to the following image of a standard Xinput gamepad: Below you can find a list of all the gamepad functions:

  1. gamepad_is_supported
  2. gamepad_is_connected
  3. gamepad_iget_guid
  4. gamepad_get_device_count
  5. gamepad_get_description
  6. gamepad_get_button_threshold
  7. gamepad_get_axis_deadzone
  8. gamepad_get_option
  9. gamepad_set_button_threshold
  10. gamepad_get_axis_deadzone
  11. gamepad_set_vibration
  12. gamepad_set_colour
  13. gamepad_set_option
  14. gamepad_axis_count
  15. gamepad_axis_value
  16. gamepad_button_check
  17. gamepad_button_check_pressed
  18. gamepad_button_check_released
  19. gamepad_button_count
  20. gamepad_button_value
  21. gamepad_hat_count
  22. gamepad_hat_value

The following gamepad functions also exist and are used for remapping the built in constants to the direct physical inputs of a given gamepad. These functions are only for the Windows Desktop, Ubuntu, macOS, and Android target platforms and on Windows, they will only be valid for Direct input devices. While GameMaker Studio 2 comes with mappings for a number of different gamepads based on SDL Gamepad Controller DB, however due to the huge number of controller types and brands out there, it is impossible to map the GML constants to the correct inputs for every make and model, so with these functions you have the possibility to create your own custom mappings.

  1. gamepad_get_mapping
  2. gamepad_test_mapping
  3. gamepad_remove_mapping


Compatibility

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). Remapping of controller constants is also permitted.
  • macOS 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. Remapping of controller constants is also permitted.
  • Ubuntu does also support Gamepad input, but you may need to install additional libraries from the Ubuntu repository. You can do this easily by opening a command line terminal and typing the following:

    sudo apt-get install jstest-gtk
    sudo apt-get install joystick.

    This will install GUI support for the joystick/gamepad as well as the joystick/gamepad API itself. Remapping of controller constants is not permitted.

  • HTML5 games using gamepads are supported by most major browsers, except Safari. Remapping of controller constants is not permitted.
  • Gamepad support also extends to iOS with the iCade cabinet. The left axis maps to the stick controller (although the input is digital, not analogue), the four 'face' buttons map to the cabinet front buttons, and the four shoulder buttons map to those at the back of the cabinet.
  • Android export supports NYKO controllers and generic Bluetooth controllers (including the OUYA), but only when they are enabled, meaning that you will have to tick the iCade/Bluetooth option in the General section of the Android Game Options. They require API level 12 for them to work fully and it should be noted that GameMaker Studio 2 will register as connected any Bluetooth devices that your device is paired with, whether or not it's actually connected. Therefore this should be taken into account when assigning and checking 'slots'. Note that the remapping of controller constants is also permitted.
  • On PS4, if you want to use the touch pad tracking you need to use the device_mouse_* buttons. Remapping of controller constants is not permitted.
  • On Windows UWP, XBoxOne and Nintendo Switch targets, gamepads are fully supported, but remapping of controller constants is not permitted.

Game Maker Studio Standard Mac Export Module Download

Ideally, on all target platforms, you want to enumerate a list of available gamepad 'slots' and then check them to see if any devices are detected, something like this:

var maxpads = gamepad_get_device_count();for (var i = 0; i < maxpads; i++)
{
if (gamepad_is_connected(i))
{
// do stuff with pad 'i'
}
}


Export

YoYo Games announces that GameMaker: Studio, its powerful cross-platform games creation technology, now offers a Windows Phone 8 export module. GameMaker: Studio for Windows Phone 8 makes publishing newly-created and pre-existing games to Microsoft’s Windows Phone Store a quick and easy process, thanks to its one click exporting capability.

“With the addition of the Windows Phone 8 module to GameMaker: Studio, developers can create high quality games and distribute them across all of the leading platforms simultaneously without all the hassle of porting,” said Sandy Duncan, chief executive officer at YoYo Games. “Windows Phone 8 is a very real opportunity for developers to engage in a flourishing new market and GameMaker: Studio is the development technology to help them expand the revenue potential and exposure for their games.”

For GameMaker: Studio PROFESSIONAL customers, the Windows Phone 8 module is $199. The Windows Phone 8 export module comes as a free update for all new and existing GameMaker: Studio MASTER COLLECTION customers. GameMaker: Studio has been developed with usability and efficiency at its core, allowing developers to create games in a single code base and then export and run them natively on multiple formats including Chrome, Facebook, Google Play, iTunes, the App Store, the Mac App Store, OS X, the Windows Store and the Windows Phone Store.

GameMaker: Studio combines a powerful, yet simple to use drag-and-drop integrated development environment with a built-in games-oriented scripting language that considerably increases games development productivity. GameMaker: Studio caters to entry-level novices and seasoned game development professionals equally.

For more information about how to get started with GameMaker: Studio for Windows 8 and Windows Phone 8 and to take advantage of special promotions and offers from YoYo Games, please visit www.yoyogames.com.