Create a Bigger World with Tile Map Nodes

Like other nodes in SpriteKit, the SKTileMapNode class is a subclass of the SKNode class, which means you can set the usual node properties like position and name. You can also run actions and use shaders[40] on these nodes. More important, though, you can define a tile set object using the SKTileSet class.

A tile set object stores an array of related tile groups. A tile group (SKTileGroup) can contain either a single tile (SKTileDefinition) or an array of tile group rules (SKTileGroupRule). A tile’s definition, along with the group rules, define how the tiles are placed within a tile map node.

Confused? I’m not surprised. The rabbit hole of tile maps and supporting classes can get pretty deep, especially ...

Get Apple Game Frameworks and Technologies 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.