STEP 3: Let’s Add a New Tile
Now let’s create a new tile layer and try loading your own tile graphics.
If you don’t have any tile materials ready, feel free to use this sample tile:
1. Create a new node for the tile layer.
In the [Scene] window, select BaseLayer, then click the + button.
2. In the node creation dialog, choose TileMapLayer
.
Type “tile” in the search bar to filter the results.
Be careful not to select TileMap
, which is an older, legacy node.
3. Select the newly created layer and assign a TileSet
.
In the [Inspector] window, click the dropdown next to TileSet and choose New TileSet.
4. Click the TileSet to expand and begin configuring it.
- Tile Size: Match this to the size of your tile (e.g., 24px for the sample tile).
- Physics Layers: Add a new physics layer (click +) so tiles can have collision settings.
Without this, the player won’t be able to stand on the tiles.
This tutorial assumes square tiles, but you can change the Tile Shape to isometric or hexagonal as needed.
5. Switch to the TileSet panel at the bottom center.
This tab allows you to manage tiles.
Drag and drop your tile image from the [File System] into this panel.
6. A window will appear for tile slicing.
Confirm that the tile size is correct, then click “Yes.”
7. You’ll be asked whether to import as Auto Tile.
Since the sample and likely your tile isn’t designed for auto-tiling, choose No.
Auto-tiles will be covered in the next step.
8. Tiles will now appear, sliced into the correct size.
If something went wrong, use the trash can icon to delete and try again.
Next, let’s define the collision area (wall detection).
Switch to the Select tab and drag over all tiles to select them.
9. The tile settings panel will open.
Go to Physics > Physics Layer 0.
If you don’t see this, go back and make sure you added a physics layer in step 4.
10. Use the “Add Point” tool to click the four corners of each tile to define the collision polygon.
Click the last point again to close the shape. A red collision outline should appear.
Tips:
- Be careful when clicking the top-left corner—zooming in can help avoid misclicks.
- Use the blue arrow tool to move points, or the red “X” tool to delete them.
- If some tiles aren’t perfect squares, select them individually and adjust the points accordingly.
11. Switch the panel to “TileMap” view and begin placing tiles on your stage.
Pick a tile and click to place it.
Since collisions are defined, the player should be able to walk on them in test play.
In Godot, nodes lower in the Scene tree are drawn in front.
If you want to change draw order, drag the TileMapLayer
up or down in the Scene window.
You’ve successfully created and configured your own custom tile!
However, setting each tile manually can be time-consuming.
In the next step, we’ll explore Auto Tiles to speed things up.