Code for Ray Wenderlich's "How To Make a Tile-Based Game with Cocos2D 2.X" ported to Cocos2D 3.X