8

Making 2D Games Easier with TileSet and TileMap

In this chapter, we will download a hex tileset and add a TileMap to Godot. We will set up the tileset to paint on the TileMap. We will add two layers to the TileMap: a ground layer for the background and an objects layer to place trees on top of the ground layer. We will use TileMap tools such as Paint, Rect, Line, Bucket fill, Picker, and Eraser, and place random tiles to paint our tiles to the TileMap.

We will edit the color of a tile in the sprite sheet and see what other ways we can use to edit a tile. We will create an alternative tile and add a collision layer to the tile. We will set up a navigation layer on the tiles and use Custom Data Layers to add an Int variable with a value of ...

Get Godot 4 Game Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.