Skip to content

Window and game area

The window of the game is the area in which the game is displayed. It DOES NOT refer to the system window that includes the toolbar, title bar on the top and a frame on the other three sides.

Fullscreen

The "De/activate fullscreen" action allows you to toggle the game between fullscreen on/off. When the window is in fullscreen, it will take up as much area as possible. You can control the action using the "YES" and "NO" actions.

Window margins

The margin of the window is the distance between the side of the window and the game window displayed. Shown below is the preview of a game with 100 px margins on all 4 sides.

Notice the black borders on all for sides of the window. The width of the borders is 100px.

Size of the window

Size of the window is the number of pixels visible in the game. The "Width" field refers to the number of pixels in the horizontal directions while the "Height" field refers to the number of pixels in the vertical direction.

While setting the size of the window, if you want to scale the current area to the set resolution, choose "NO". This will decrease the visual quality of the game if the size entered is lower than default and will increase the visual quality if the size entered is higher than the default size.

If you want to scale the set resolution to the window area, choose "YES". This will crop the window and display only the number of pixels entered in the action. This does not affect the visual quality as long as the game is scaled up or down because of the size of the system window.

Note

The game is cropped starting from the top-left corner of the game.

Resolution resize mode

Instead of keeping a fixed resolution, you can have the game resolution automatically follow the window or screen size. The "Game resolution resize mode" action lets you choose to adapt the width of the resolution to fit the window, adapt the height, or disable automatic resizing. This is useful to support many screen ratios without black borders.

When a resize mode is set, the "Automatically adapt the game resolution" action controls whether the resolution keeps updating live as the window or screen size changes during the game.

Centering and resizing the window

On Windows, macOS and Linux, the "Center the game window on the screen" action repositions the window in the middle of the screen, and the "Game window size" action changes the size of the system window itself (which is distinct from the game resolution).

These actions have no effect for games running in a web browser or on Android/iOS, where the window size is controlled by the browser or operating system.

Window icon

The "Window's icon" action replaces the icon shown for the game window using an image from your project. As with the window size, this only applies on Windows, macOS and Linux.

Window title

The window title is the name of the window that is visible on the title bar (located at the top) of the window. The default title name is "Preview of ProjectName" during a preview.

By default, the game name is used for the executable name (on Windows, macOS and Linux), the app name (on Android and iOS) and the title bar (on Windows, macOS and Linux) (and the page title for HTML5 games). You can learn more about it in game properties.

With the action to change the title, the title bar on Windows, macOS and Linux will be changed. Nothing will be visible on Android and iOS. For HTML5 games, the web page title will be changed.

Reading the window and screen size

Expressions are available to read the current dimensions at runtime: SceneWindowWidth() and SceneWindowHeight() give the size of the game window (the canvas for HTML5 games), while ScreenWidth() and ScreenHeight() give the size of the whole screen (or the page for HTML5 games running in a browser). These are handy to position UI relative to the actual display size, especially when the resolution resize mode is enabled.

Reference

All actions, conditions and expressions are listed in the window reference page.