Learn iOS SpriteKit with Examples, Code Snippets and Video Tutorials

 Maze Games

with Swift, Sprite Kit & Designed with Tiled

Maze Games with Sprite Kit and Swift – Video Tutorials

A step-by-step video tutorial series teaching three technologies for building iOS Games:

Sprite Kit Banner for Video Tutorial Technology Taught
Swift Video Tutorial - Technology Taught

Classic game concepts. Modern programming.

When you think of maze games, you’ll probably think of Pac-Man, which isn’t hard to argue is the most popular game of all time. At that game’s core is a simple hook. Move at high speeds and don’t get caught, which is a fun concept for any player of any age. Even today some of the most popular games don’t rely on much more than a classic hook: something that is easy to play, but impossible to beat. A game like Flappy Bird is a recent testament to that.

In this tutorial series, we’ll look at programming a conceptually simple game, but one that can be expanded in a hundred different directions using Apple’s amazingly easy physics engine. You’ll learn the latest in iOS programming technology: Swift and Sprite Kit.  Then for level design, you’ll get two options: create levels within Xcode 6 using the new Scene editor, or take a step outside Xcode and use Tiled, a free level design program which in our opinion, is a tad more refined and speeds up level creation.

After this series, you will be a game developer!  Ready to submit your first app for the iPhone, iPad, and possibly even Apple Watch.  Plus using software like Apportable, you can even export your app to Android and a plethora of other devices.

Retro Game with Physics using Swift and Sprite Kit

 

 

 

 

 

 

Over 7 Hours of Swift and Sprite Tutorials, broken into bite-size chunks

Initial Setup with Xcode

Session 1 – Creating the Hero

  1. Series Introduction – 3:54
  2. Initial Setup – 13:09
  3. Adding the Hero Class – 16:32
  4. Moving the Hero – 16:22
  5. Gestures and Adding Animation – 20:32
  6. Adding Physics Properties to the Hero – 18:01
Learn How to Layout with Tiled and Swift

Session 2 – Building the Maze in an SKS or Tiled File

  1. Intro to Session 2 – 1:24
  2. Create a Maze Boundary using a Sprite Kit Scene (.sks file) – 26:08
  3. Adding the Physics Contact Delegate to the Game Scene – 12:09
  4. Introduction to using Tiled for Level Layout – 11:46
  5. Parsing the Tiled File (parsing XML in general) – 22:41
  6. Centering the Hero in the World – 10:29
  7. The Star Class (a sprite for the Hero to pickup) 17:48
  8. The Star Class Continued – 8:17
Sensor Nodes with Swift to Detect Walls

Session 3 – Sensors, Edges, and Enemies

  1. Intro to Session 3 – 1:31
  2. Adding Sensor Nodes around the Hero – 16:16
  3. Using the Sensors to Detect Walls – 13:29
  4. Adding an Edge Based Physics Body Around the World – 16:25
  5. Placing Enemies with either SKS or Tiled Files – 18:56
  6. Moving Enemies – 25:13
  7. Refining Enemy Logic for Tracking the Hero –  18:12
  8. Reloading the Level – 12:03
Adding SKLabelNode

Session 4 – Property Lists, Text & Sounds

  1. Intro to Session 4 – 1:38
  2. Adding a Property List and Specifying Hero Settings – 21:41
  3. Getting Game Settings from the Property List – 13:05
  4. Creating an Array of Level Data – 18:34
  5. Passing Levels and Loading the Next – 17:19
  6. Text Labels for Lives Left and Game Over – 10:22
  7. Adding a Parallax Background – 14:42
  8. Adding Background Sound and Other In-Game Audio – 13:53
Maze Game Tutorial

Session 5 – Easy-to- Implement Extras / Student Suggestions

  1. Making Move-able Boundaries – 2:45
  2. Auto-Advancing to the Next Level when Contacting Special Stars – 2:34

Every student graduates with a mighty parting gift!

Like all our tutorials, you get the finished Xcode 6.1 project from the course, as well as the project files from the end of each session. The finished project contains an enormous amount of source code portable to any of your apps in the future.

After your purchase, you’ll always have the code to…

  • Import a Tiled file into a Swift / Sprite Kit based project
  • Parse any XML data into a Swift / Sprite Kit based project
  • Play audio, either through an SKAction or AVAudioPlayer
  • Setup swipe gestures in an SKView
  • Pull children from a Sprite Kit Scene file and replace them with custom classes
  • Setup a SKPhysicsContactDelegate and listen for bodies contacting each other
  • Center a Sprite Kit world around a specific child
  • And much, much more!
Included Xcode Project With Purchase

Can’t decide between level design using Tiled or the new Sprite Kit Scene editor?…

Why not learn to use both then?

Build with Tiled…

Read about using Tiled

The tutorial will teach you how to layout and design your levels using Tiled, a free software available from MapEditor.org. Tiled saves files in an XML format, so you’ll learn how to not only parse .tmx files, but any kind of XML data. This also gives you the flexibility to make mass changes to the level via any text editor by finding and replacing text. So for example, you could rename every boundary from “Boundary” to “PushableBoundary” which can be incredibly useful when creating multiple levels.

Objects setup within Tiled will get placed in the scene by the code you’ll learn to write in Xcode. Essentially we’ll be looking at a Type value we specify in Tiled (for example,  “Boundary”, “Enemy”, etc) and then placing a custom class of that type into the scene.  We can further specify details about each object in Tiled by including a Name value (like “RedEnemy”, “StartingPoint”). So for example, you could create an Enemy class in the scene, with specific functionality if it was a “RedEnemy’.

 

Build within Xcode…

Read about using Xcode

If you choose to build your levels directly within Xcode, you’ll learn how to use the new Sprite Kit Scene editor available in Xcode 6 (and up). This allows you to work exclusively within Xcode to build everything for your game. If you haven’t upgraded to Yosemite, it is highly recommended you do before using the Scene Editor (otherwise, there is a lag when placing objects).  The SpriteKit Scene editor lacks some of the workflow benefits of Tiled.  For example, snapping to a grid or selecting and copying objects as a group can be a bit tricky.

Children created within the scene editor are limited to SKNodes, SKSpriteNodes, SKShapeNodes and some other physics field types.  This means to make use of our custom classes, like Hero, Enemy, Boundary, you’ll learn how to find children in the scene editor and replace them (by name) with our classes. Which is essentially what we’ll be doing when parsing Tiled files. So although the tutorial teaches both layout options, there is a lot of overlap in the code.

If you choose to build your levels directly within Xcode, you’ll learn how to use the new Sprite Kit Scene editor available in Xcode 6 (and up). This allows you to work exclusively within Xcode to build everything for your game. The downside though is the SpriteKit Scene editor lacks some of the workflow benefits of Tiled.  For example, snapping to a grid or selecting and copying objects as a group can be a bit tricky.

Children created within the scene editor are limited to SKNodes, SKSpriteNodes, SKShapeNodes and some other physics field types.  This means to make use of our custom classes, like Hero, Enemy, Boundary, you’ll learn how to find children in the scene editor and replace them (by name) with our classes. Which isn’t much different than what we’ll do with Tiled files.

Maze Games Tutorial with Swift and Sprite Kit

Download today or watch through CartoonSmart’s Streaming Portal for Lifetime Access. Or heck, do both.

No matter how you choose to watch, you’ll have access to over 7 hours of videos, broken into over 30 short movies.

Purchase Today and Learn About Our Instant Social Sharing Discounts!

Check out our premium Swift and Sprite Kit Tutorial content!

Visit CartoonSmart.com