Layers and cameras

A layer is used to categorize multiple objects with similar physical properties (Z order, speed, etc). The default layer in GDevelop is called “Base Layer”. To create a new layer, open the layers editor using this button:

This will open the layers editor. In the layers editor, you can create a new layer using the plus sign. You can change the name of the layer and also toggle its visibility using the layers editor.

A camera is used to display the scene in the game window. Each layer has its own camera and its position and angle can be controlled using events.

Camera fixed center

The center of the camera is the center of the game window displayed. The X and Y coordinates of the camera center denote the coordinates of the center of the window.

Center the camera on an object

If you want an object to always stay in the view of the camera, you can center the camera on an object. This will make the camera follow the object wherever it goes (even if it goes out of bounds).

To prevent the camera from going out of bounds, you can center the camera on an object within limits. This will limit the center of the camera within the quadrilateral inscribed using the two diagonally opposite points entered.

Dimensions and angle of the camera

Height of the camera is the length of the vertical side of the game visible and width is the length of the horizontal side.

The camera angle is the angle by which the camera is rotated on the X-Y plane. The angle increases as we go in the clockwise direction from the X axis.

Camera zoom

Zooming is a feature that allows the user to increase or decrease the magnification of the scene. If you zoom into a scene, the contents appear larger and if you zoom out, they appear smaller than the default setting. The default zoom value is 1. To zoom in, set a value higher than 1 and to zoom out, set a value less than 1.

Visibility of a layer

Visibility of a layer can be toggled. Hiding a layer DOES NOT delete the objects on the layer. If a layer is hidden, all the objects on the layer exist and can interact with the objects on other layers but they are not visible. By default, ever layer is visible.

Objects on layers

You can move the object to a different layer or check the layer of the object using actions and conditions that are common for all objects.

Time scale

Time scale of a layer allows you to change the speed of all the animations in a layer. To slow down the animations on a layer, set a time scale less than 1. To speed up the animations on a layer, set a time scale greater than 1. The default time scale is 1 for every layer.

Effects (shaders) on layers

In a future version of GDevelop, layers will be able to get effects applied on them. Vote for this feature on the roadmap: