The Game Window

The game you create happens in a window (even when fullscreen), and this window has a number of properties, like position, size, whether it is fullscreen, etc... These details are normally set automatically for you based on the room size and view ports enabled in combination with the settings from Game Options for the target platform, but you can change them during the game using the functions listed on this page.

NOTE: These functions are for Windows, Ubuntu (Linux), macOS and HTML5 target modules only and may not work on any other device.

The following image illustrates how all some of the most general windows functions relate and interact with each other:

Window Position exampleNote that the image above shows the game window drawn in a browser, but the for the other targets, you can replace the browser with the display, so a function like window_get_y() will return the position of the top of the game window relative to the display.

The following functions exist to change and get game window properties: