Adding a Background to game

Hey All,

Newbie question. How would I add/change the background to my game? I’ve read the tutorial but that’s for GD4. GD4 isn’t preforming well for me so I have to uase GD5. How can I achieve the background change.

Thanks :smiley:

In case you mean to add a background image, you can use a sprite object. Everything in GDevelop is an object and sprite object is the most commonly used. You can also use a Tiled sprite object in case it a “tile”.

To make the object appear behind everything you need to set the Z order of the object. Select the object in the editor and on the left side you should see the object properties such as position, layer, there you can find Z-order. Make sure this value is lower than the value of any other object in the scene and it will be rendered behind everything. You can also lock the object used as a background to avoid selecting it in the editor. Alternatively, you can also use events to crate the background object at the beginning of the scene so you don’t need to deal with it in the editor and you can also put it on a separated layer if you want.

In case you mean to change the colour of the background, right click in the scene and select Scene properties. There you should find the option to select colour. Alternatively, you can also change the background colour by using events.

When using events, the only thing you need to be careful with, when you want to do something only once and only at the beginning of the scene such as creating the background image or change the colour, make sure you are using the “At the beginning” condition, otherwise you might keep creating the background object or change the colour 60 times a second which is not what you want.

Thanks so much! :smiley: