Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions automated_updates_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
{
"date": "2026-04-02",
"summary": "Improved multiplayer docs: added Quick Join section, documented player username/ping/last-joined/last-left expressions, lobby ID expression, custom message variable variant, and synchronization rate action"
},
{
"date": "2026-04-12",
"summary": "Improved window/game area docs (added IsFullScreen condition, game resolution vs window size distinction, SceneWindowWidth/ScreenWidth expressions, resize modes, CenterWindow desktop note, WindowTitle expression) and screenshot docs (added desktop-only warning, PNG-only format note, error handling note)"
}
]
}
31 changes: 10 additions & 21 deletions docs/gdevelop5/all-features/screenshot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,24 @@ title: Screenshot extension
---
# Screenshot extension

This extension lets you save a screenshot of the running game in a specified folder.
This extension lets you save a screenshot of the running game as a PNG file.

Note: As of GDevelop 5.0.0-beta92 the screenshot action is no longer an extension. Just add an action and search for `screenshot` or go to `Other Actions`/`Screenshot`/`Take screenshot`.
!!! warning

### Actions
Screenshots are only supported on **desktop builds** (Windows, Linux, and macOS). The action does nothing on web (HTML5) or mobile (Android, iOS) exports.

#### Take screenshot
## Take a screenshot

Use this action to save a screenshot of everything which is currently drawn on the game window into a *png* file.
Use the **Take screenshot** action and provide a file path where the PNG file should be saved.

##### Parameters:
- The output is always a **PNG file**. If the path you provide does not end in `.png`, the extension is added automatically.
- Use an **absolute path** or build one dynamically using [FileSystem expressions](/gdevelop5/all-features/filesystem) so the path works correctly on all desktop operating systems.

**Save path**: The file path where the screenshot should be saved.
!!! tip

The save path needs to be an absolute path on the file system (Like "C:\MyFolder\MyScreenshot.png" on Windows)'
Use `FileSystem::PicturesPath() + FileSystem::PathDelimiter() + "screenshot.png"` to save to the user's **Pictures** folder on Windows, Linux, and macOS automatically.

Relative paths are not supported.

!!! note

In order to create a game that runs on all supported platforms you should use the special folders from the file system extension in combination with the path separator. These determine the path to common folders like *Pictures*, *Documents* or *Desktop* automatically. You can read more about it in [this article](/gdevelop5/all-features/filesystem).

## Example

This path:

``` <FileSystem::PicturesPath>() + <FileSystem::PathDelimiter>() + "my_screenshot.png" ```

This will save the screenshot to the *Pictures* folder on Windows, Linux and MacOS.
If saving fails (for example, because the folder does not exist or permissions are denied), an error is written to the console but the game continues running. There is no built-in condition to detect whether the save succeeded.

## Reference

Expand Down
49 changes: 36 additions & 13 deletions docs/gdevelop5/all-features/window/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,61 @@ title: 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.

The **De/activate fullscreen** action toggles the game between fullscreen and windowed mode. When in fullscreen, the game takes up as much screen area as possible.

Use the **Is fullscreen?** condition to check whether the game is currently running in fullscreen mode — useful for toggling a fullscreen button or adjusting UI layout.

## 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.

![](/gdevelop5/all-features/annotation_2019-06-29_174027.png)

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

## Game resolution vs. window size

GDevelop separates two distinct concepts:

- **Game resolution** (also called "canvas size"): the logical number of pixels the game renders at. This controls how much of the scene is visible and the coordinate system used for objects.
- **Window size**: the physical size of the window on the screen. The game is stretched or letterboxed to fit the window.

### Changing the game resolution

Use the **Change the game resolution** action to resize the canvas at runtime — for example, to support different aspect ratios depending on the device. The expressions `SceneWindowWidth()` and `SceneWindowHeight()` return the current game resolution width and height.

### Changing the window size

The **Change the size of the window** action changes the physical window size. This is most useful in desktop (Windows, macOS, Linux) builds; on mobile and web the browser or OS controls the display size.

When changing window size, you can also choose whether to update the game resolution to match. If you set the window larger without updating the resolution, the game is simply scaled up (no extra content is revealed).

## Size of the window
To center the window on screen, use the **Center the window on screen** action (desktop builds only).

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.
### Auto-adapting the resolution

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.
Use the **Change the game resolution resize mode** action to control how GDevelop automatically adapts the game resolution when the window or screen changes size:

![](/gdevelop5/all-features/annotation_2019-06-29_175454.png)
- **Adapt the width**: keeps the height fixed and adjusts the width to fill the window.
- **Adapt the height**: keeps the width fixed and adjusts the height to fill the window.
- Leave the mode empty to disable automatic adaptation.

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.
You can also enable or disable the adaptation at runtime with **Enable/disable adapting the game resolution to the window size**.

!!! note
### Getting the screen and window dimensions

The game is cropped starting from the top-left corner of the game.
- `SceneWindowWidth()` / `SceneWindowHeight()` — current game resolution (canvas size).
- `ScreenWidth()` / `ScreenHeight()` — actual screen or browser window size in pixels.

![](/gdevelop5/all-features/annotation_2019-06-29_175540.png)
These are useful for positioning UI elements or detecting device type at runtime.

## 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.
The window title is the name visible on the title bar of the window.

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.](/gdevelop5/interface/project-manager/properties)
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 page title for web games. You can [learn more in game properties.](/gdevelop5/interface/project-manager/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.
The **Change the window title** action updates the title bar on Windows, macOS and Linux. For web games, it changes the browser tab title. The action has no visible effect on Android and iOS. Read back the current title at any time using the `WindowTitle()` expression.

## Reference

Expand Down