Tuesday Discount - Lifetime Access for $20!!!! - Click Here!

Free Swift and Sprite Kit Tutorial – Prototyping a Board Game and Moving Pieces

Free Swift and Sprite Kit Tutorial – Prototyping a Board Game and Moving Pieces
May 26, 2016 Justin

Free Swift and Sprite Kit Tutorial

Prototyping a Board Game and Moving Pieces

We’re smack-dab in the middle of teaching a lengthy series of lessons on how to program a property-list driven Card and Board Games Kit for iOS or tvOS, but thought it would be a fun diversion to break off from the main Xcode project, start a new and prototype how piece will move around the board game, using Swift and Sprite Kit.  We’ll start with a diagram of the board game, add empty nodes for each spot on the board, and add SKSpriteNodes for Player1 and Player2. When the user touches down, we’ll check how many moves are remaining in their turn (assume they rolled a spinner or threw dice to determine the move count). Then create an SKAction to move the player’s piece to a new slot on the board (again, noted by the Empty node). Each move repeats an SKAction to go to the next available slot (for example, A1 then A2 then A3, and so on. We’ll also discuss how to make alternate paths / shortcuts.

Download the Xcode Project

Never lose your place.

Sign up for the newsletter to get a free CartoonSmart account and track your progress in every course.

I'm cool. Sign me up!




Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!