OS And Compiler

When creating cross-platform games, it is often of vital importance that you get the details of the operating system that the device running your game is using. Things like the language, the version or the network state can all be used to adapt your game to the system running it and make the end-user experience the best possible, so GameMaker Studio 2 has a number of special functions which can be used to get the necessary information.

The following functions and variables exist for you to use to get certain details about the operating system or browser that is running your game:

 

 

Certain functions are pre compiled when you run your game (ie: they are used to define how the final game will be compiled), and some are also for use when the game has been compiled to get specific details about the runtime environment. Here you can find the full list of these functions:

 

 

Finally, when working with Extensions you may need to be able to define and call external functions at runtime, and so you'd use the following:

NOTE: These are legacy functions and you should define any extension functions within the Extension Editor itself.

NOTE: These functions are for the Windows and macOS target platforms only.