Time for action – creating a tileset
Before we can create a tile map, we need to create a tileset. This is quite easy to do using the TexturePacker app that we have used before. Once again, the free version will be enough for our tasks.
We will create a special spritesheet that we are going to use as a tileset. Perform the following steps:
- Open the TexturePacker application. You should have installed it during Chapter 4, Rendering Sprites. A new project is created by default, but create one if required.
- Open the book's supporting files in the
Chapter_11/Assets/Tilemap/Images/sd
folder and select all images. Drag those images to the TexturePacker app.Note
To download the book's supporting files, please visit www.packtpub.com/support and follow the instructions.
- Set the TextureSettings option in the left-hand side pane of TexturePacker as follows:
- Algorithm: Select Basic
- Sort by: Select Name
- Border padding: Enter
2
- Shape padding: Enter
2
- Allow rotation: Select Uncheck
- Trim mode: Select...