Creating a platform game with Tiles and Tilemaps
Unity has introduced a set of Tile features that makes creating tile-based scenes quick and easy. A Tile Grid
GameObject acts as the parent to Tilemaps. These are the GameObjects that Tiles are painted on, from the Tile Palette panel.
Sprites can be made into Tile assets, and a collection of Tiles can be added to form a Tile Palette, which we can use to paint a scene:
Figure 8.44: Example of using Tilemapper and GameArt2D-supplied sprites
It also offers powerful, scripted Rule Tiles that enhance the Tile brush tools, automatically adding the top, left, right, and bottom edge Tiles as more Grid elements are painted with Tiles. Rule Tiles can even randomly choose from a selection of Tiles under defined conditions. You can learn more at https://unity3d.com/learn/tutorials/topics/2d-game-creation/using-rule-tiles-tilemap.
In this recipe, we’ll create a simple 2D platformer by building a Grid-based scene using...