SDL3 Oyun Programlama ve Godot Oyun Motoru sayfalarımız yayında...

Ana sayfa > Oyun programlama > Godot game engine > Adding background

Adding background

To add a background to the "game" Scene, follow the steps below:

1. With the "game" Scene and "Game" Node selected, create a TileMapLayer Node by clicking the + sign under the Scene tab or by pressing the Ctrl-A key combination to create a new Node.

2. In the Create New Node window that appears, search for TileMapLayer in the Search line and select it, and click the Create button.

3. Change the name of the "TileMapLayer" Node to "Background".

4. While the "Background" Node is selected, create a new TileSet by selecting the "New TileSet" option from the right selection box in the "Tile Set" row in the "Inspector" tab.

As a result of this process, a grid is placed on the stage.

5. Click on the "TileSet" statement at the bottom line of the Godot development environment.

6. Drag the world_tileset.png file under the "sprites" directory and drop it into the window in the "Tiles" tab.

7. Click the "Yes" button in the "Automatic queue creation" checkbox.

8. While the "TileMap" tabs on the bottom bar and the "Tiles" tabs on the top bar and the "Paint" button are selected, we can select any of the tails under the "Base Tiles" heading by clicking on them and copy them by clicking on any square in the grid in the "game" tab with the left mouse button.

9. With this method, edit the background of the game scene as shown below.

10. Move the "Background" Node under the "Game" Node.

11. Save all the scenes with Ctrl-S.