In 2D games, the process of creating the map, which is the area where the game will be played, is done with tiles. Tiles are specific and small-sized images located within a large image. These images are used one or more times to create a map.
In the Godot development environment, the TileMapLayer Node is used to create a map using tiles.
Perform the following steps in order to create the game map:
1. To create a TileMapLayer Node, while the "Game" scene is selected, create a new Node by clicking the + sign under the Scene tab or the Ctrl-A key combination.
2. In the Create New Node window that appears, search for and select TileMapLayer in the Search line and click on the Create button.
3. While the "TileMapLayer" 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 scene.
4. Click on the "TileSet" statement at the bottom line of the Godot development environment.
5. Drag the world_tileset.png file under the "sprites" directory and drop it into the window in the "Tiles" tab.
6. Click the "Yes" button in the "Automatic queue creation" checkbox.
7. While the "TileMap" tabs in the bottom bar and the "Tiles" tabs in the top bar and the "Paint" button are selected, we can select any of the tails under the "Base Tiles" title by clicking on them and copy them by clicking on any square in the grid in the "game" tab with the left mouse button.
When we move the mouse on the stage, the grids become visible in the background.
8. Complete the drawings as seen in the picture below by applying the rules below.
9. When we're done drawing, save the scene and run the game. The player will fall down again. Close the game.