Creating a platform game with Tiles and Tilemaps
One of the powerful 2D tools introduced by Unity is the Tilemapper
. In this recipe, we'll create a simple 2D platformer, building a grid-based Scene using some free Tile
Sprite images:

Getting ready
For this recipe, we have prepared the Unity package and images you need in folder 08_07
.
Special thanks to GameArt2D.com for publishing the Desert image Sprites with the Creative Commons Zero
licence: https://www.gameart2d.com/free-desert-platformer-tileset.html.
How to do it...
To create a platform game with Tiles
and Tilemaps
, follow these steps:
- Create a new Unity 2D project.
- Import the provided images.
- The tile
Sprites
we've using for this recipe are128 x 128
pixels. It's important to ensure that we set the pixels per unit to128
, so that ourSprite
images will map to a grid of 1 x 1 Unity units. Select all theSprites
in theProject | DesertTilePack | Tile
folder, and in the Inspector setPixels per Unit
to128
:

- Display the Tile Palette panel, by...