Member-only story
Build a Game of Chess With SpriteKit
A look at using tilesets programmatically in SpriteKit

When I started out in the world of computers, it was 1982, a long long time ago in a far far away place called England. Microsoft hadn’t cornered the market and Windows [1995] did not exist. The command line was the way to go — with MSDOS on one side and UNIX on the other.
When I went to University in 1985 to study computer science, everything was command-line centric. Even the IDE wasn’t in the big scheme of things; it didn’t appear until 1991. It’s a way of working that has never left me; it simply feels more efficient to type in a command to do what you want to do than use a GUI to get there.
You won’t be unsurprised then when I tell you I want to talk about tilemaps in SpriteKit here not through the GUI Apple build but through code. Code that feels like command lines me. Join me on a journey to build a game of chess using tilemaps. Tilemaps as a programmer, not a designer. Although just before we start, let’s be sure we’re on the same page here.
“TileMaps” has been an integral part of game engines for almost as long as game engines have been around. They came about because designers and coders needed the means to paint a background scene efficiently. Efficiently both in terms of initial build and indeed update…