Introducing Sprite Kit

Hours of Easy Video Tutorials to Get You Started!

Learn Swift and Sprite Kit

The Sprite Kit Starting Template – Part 1

A quick video tutorial for FIRST time users of Xcode 8, Sprite Kit, and (later on) Swift 3. This video is a quick tour of the general settings in Xcode 8, and the GameScene.sks file. We’ll tinker a bit with some physics properties and run the Simulator a few times to experiment. If you already have some experience with Xcode, you can skip this intro video.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 1

Adding a Player with Physics Properties – Part 2

In this video tutorial we’ll jump right in by adding player art assets to the game, then use them in our Sprite Kit Scene file by setting physics properties on an SKSpriteNode. We’ll tinker with some of the physics, then look at how to declare / cast an SKSpriteNode variable in the GameScene.swift which equals the child node setup in the Scene (.sks file). Sounds like a lot, but its a quick and painless introduction to the power of Sprite Kit and the Scene Editor.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 2

Introducing SKActions and Detecting Touches – Part 3

In this video tutorial, we’ll continue where we left off in the last video and run SKActions on our player. We’ll work both with programmatically setup SKActions as well as Actions created using the Timeline in the Scene Editor. Then we’ll work with detecting touch locations as well as using the update function to check on the player’s location.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 3

Action Groups / Sequences and Run Blocks – Part 4

In this video, we’ll continue working with SKActions, by changing the previous lesson’s walk actions into a sequence of actions. This will allow you to run code at the end of a sequence. In this example, when the player begins walking we’ll make gravity affect him (creating an effect like wind is pushing him), then when the player has stopped walking, gravity will no longer be in affect. We’ll also look at create a speed variable for movements and frame animations of the player.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 4

Short Interlude to look at a Cross Platform Project – Part 5

We’ll take a short break from the previous project and explore the Cross Platform Sprite Kit template included with Xcode. This is a project that has an iOS, tvOS, WatchOS and MacOS Target. The neat thing about this template is all four device types use the same GameScene.swift and GameScene.sks files. So ideally, you can code once and deploy to all those devices. We’ll also look at how to add files to a particular device Target after they’ve already been imported or created (this is done in Xcode’s Build Phases tab)

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 5

Gesture Recognizers in Sprite Kit – Part 6

In this video tutorial we’ll add Swipe, Tap and Rotation gestures recognizers to the scene. We’ll discuss properties and related functions for each, as well as converting radians to degrees and removing all gestures from the scene.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 6

Detecting Physics Contacts Between Bodies – Part 7

In this video tutorial, we’ll add an SKPhysicsContactDelegate to the class, then add a didBegin contact statement to listen out for physics notifications from bodies. This requires setting the categoryBitMask and contactTestBitMask on the player and a hypothetical building object that we add this lesson.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 7

Changing zPositions at Runtime and Making a Custom Class – Part 8

In this final video, we’ll use the update method to check where the player is and then change the zPosition (layering) of buildings based on that value. This will make it look like the player is visually in front of or in back of a particular building. Then finally we’ll create a Castle class, or subclass of SKSpriteNode, and demonstrate how this custom class can have it’s own functions and properties.

Watch this video
Introduction to Sprite Kit with Swift 3 video tutorials 8

Continue Learning….

Role Playing Games Swift and Sprite Kit Tutorials

Role Playing Games with Swift and Sprite Kit

Want to continue building a top-down style game? Our new RPG tutorial series picks up right where our last lesson in the intro courses leaves off. We’ll go cover inventory, non-player characters, attacking, enemies, portals to other levels, treasure items, rewards, XP and much more!

Get Started!

Interested in our older Objective C and Sprite Kit video tutorials?

Course Introduction – Part 1

A quick introduction to our Objective-C based Sprite Kit tutorial. You can download the starting assets here.

Watch this video

Tour of the Xcode  Interface – Part 2

In this video tutorial we will tour the Xcode  interface. We’ll look at all the essential areas you should know about as a first time programmer. We will also look briefly at Asset Catalogs, a new way of adding your launch images and app icons (as of Xcode 5). 

Watch this video

Provisioning Profiles in Xcode – Part 3

This video will teach you how to add your Provisioning Profiles in Xcode 5 using the developer portal and Organizer. You need to be a registered developer to install your profiles and test on your actual device. Otherwise, you can test your project on the iOS Simulator.

Watch this video

Objective C Basics for Beginners

– Part 4

If you aren’t familiar with Objective-C or programming in general, you’ll want to watch this first video on basic variable types. We’ll look at int, float, NSString, bool and CGPoint variables and quickly test logging them in the update loop of the Sprite Kit template.

Watch this video

Objective C Basics for Beginners (continued) – Part 5

This course continues teaching the very basics of Objective-C. If you aren’t familiar with if statements, while and for loops, or creating methods (with non-void returns and parameters) then you will definitely want to watch this quick primer.

Watch this video

The Sprite Kit Template – Part 6

This video will look at the Sprite Kit template and play around some with what already exists. If you skipped past the optional Objective-C basics tutorial, this video is also intended to give you a quick reminder of some core concepts to programming (for example, returning objects from a method, adding children, setting properties, etc)

Watch this video

The Sprite Kit Template (continued) – Part 7

This second video examining the Sprite Kit Template will teach you how to enable multiple touches in the view controller, detect touch end events, use childNodeWithName, and enumerate through children during the update method.

Watch this video

Building a Quick Boulder Jumping Game – Part 8

Importing Assets to Xcode (and Exporting from Flash)  – From here on, the series will focus on building a sample Sprite Kit jumping game, where your goal is to avoid getting hit by boulders and timing a characters leap over them. This short first video will discuss importing images to an Asset Catalog (new to Xcode 5), using Retina Display images, and also show you tips on how to export images from a program such as Adobe Flash. 

Watch this video

Texture Atlases with Sprite Kit – Part 9

This video discusses creating a Texture Atlas for Sprite Kit.  If you are already familiar with sprite sheets (for optimizing game graphics), a texture atlas is exactly that. You can name a folder with the “.atlas” extension and include your standard and retina images (with @2x.png extensions). This atlas folder with get packaged as a sprite sheet at compile time (code to use the atlas is discussed later)

Watch this video

Adding and Identifying Children with Sprite Kit – Part 10

This video tutorial really gets the ball rolling with Sprite Kit. Pun intended. We’ll be moving the boulder across the  screen and detecting if it intersects with our character. We will also look at the enumerateChildNodesWithName method.

Watch this video

Moving Objects and Detecting Two Objects Colliding – Part 11

This video discusses the concept of Casting in a Sprite Kit game. This is an important concept, and worthy of it’s own video. We’ll talking about when to cast an object, making sure it actually exists, and testing the kind of class that the cast object is.

Watch this video

Casting in Sprite Kit – Part 12

In this video we will add our Sprite Kit Actions which will do all the work involved with making the character jump and use the texture atlas we imported earlier. We will look at adding a sequence of SKActions as well as declaring them in the header file for use every time we touch the screen. We will also use the SKAction performSelector method to control how often the character is able to jump (toggling on or off if the character can jump).

Watch this video

Adding Sprite Kit Actions – Part 13

n this last video, we will test if the boulder has intersected with the character a certain number of times, and if so, we will transition to a new scene (actually the same scene over again) to restart the game.

Watch this video