iOS Maze Games with Swift, Sprite Kit and Designed in Tiled

Learn how to program a Universal iOS game from scratch using Swift, Sprite Kit and design levels with Tiled or Xcode 6
4.3 (28 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
786 students enrolled
$20
Take This Course
  • Lectures 44
  • Contents Video: 7.5 hours
    Other: 0 mins
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 10/2014 English

Course Description

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.

What are the requirements?

  • Have a Mac running Xcode 6 or 6.1
  • While not required, to test on your actual device you'll need to be Registered Apple Developer

What am I going to get from this course?

  • Build an app from scratch
  • 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

What is the target audience?

  • Anyone with zero knowledge of Sprite Kit or Swift
  • Anyone who wants to build great games and get a foundation in solid programming techniques
  • Anyone that wants to choose between using Tiled or the SpriteKit Scene Editor
  • Prior programming experience is not required, but won't hurt

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Creating a Hero for the Maze
Introduction to the Series
Preview
05:05
Starting Game Assets and source projects for Swift 1.2 through Swift 2.2
Article
13:08

In this video we will take a short tour of Xcode and bring in our initial assets to use throughout the course.

Course Primers
Article
16:32

In this video we will create our Hero class, which is a subclass of SKNode.

16:22

In this video we will move the character using the update function.

10:14

In this video we will add gesture recognizers so we can swipe the screen and move the hero in a particular direction

10:17

This video continues right where the previous one left off.

09:26

In this video we will add physics properties to the Hero class and discuss each

08:34

This video continues right where the previous one left off.

6 questions

Let's test some basics of what you've learned so far

Section 2: Boundaries, Contacts, Tiled and Star Classes
Introduction to Section 2
Preview
01:24
13:40

In this video we will begin creating our Boundary class with Swift and Sprite Kit. These will be the maze walls.

12:28

This video continues right where the previous one left off.

12:29

In this video, we will setup the SKPhysicsContactDelegate in the GameScene.swift file which will enable us to react to contacts between physics objects.

11:46

In this video, we will incorporate Tiled a free program to help us layout and design levels. This software makes it much easier and faster (in your instructors opinion) then using the SpriteKit Scene editor

11:05

In this video, we will parse the Tiled file which is essentially just XML data.

11:45

This video continues right where the previous one left off.

10:28

In this video, we will center the mazeWorld instance around the hero.

17:48

In this video, we'll create a "pickup" type class (think pellets), called Stars. If you pick up them all, you'll clear the stage.

08:17

This video continues right where the previous one left off.

5 questions

Let's test what you know at the end of section 2.

Section 3: Sensing Walls and Adding Enemies
Introduction to Section 3
Preview
01:30
16:15

In this video, we will add sensor nodes around the hero, to detect which walls are currently blocked. If blocked, we will register that us the next "desired direction". When the passage clears, the hero will automatically turn that way.

13:29

In this video, we'll actually use the sensor nodes.

16:25

In this video, we will create a mass-less edge boundary around the world by extending the functionality of our Boundary class.

10:06

In this video, we will create an Enemy class and place the enemies with either our Tiled file or SKS file.

08:50

This video continues right where the previous one left off.

13:16

In this video we will move the enemies based on the location of the hero.

11:56

This video continues right where the previous one left off.

12:21

In this video, we will refine the enemy logic and create a variable factor for how quickly they can find the hero.

05:50

This video continues where the previous one left off.

12:03

In this video we will reload the current level. We will also add a little code for enemies bumping off of each other.

4 questions

Let's see what you know about the project by the end of section 3

Section 4: Property List, Loading the Next Level, Text, Sounds and More
Introduction to Section 4
Preview
01:38
10:21

In this video we will add a property list file and use that to setup the hero characters properties and animation frames.

11:18

This video continues right where the previous one left off.

13:05

In this video we will use the GameData.plist to set some initial game settings (like whether to show physics bodies, use Tiled files, set the amount of parallax, and gravity)

09:57

In this video we will create an Array in the property list and store the data for each level here (properties like hero speed, enemy speed, TMX file, next SKS file to load, etc)

08:37

This video continues right where the previous one left off.

17:19

In this video we will load the next level if the hero collects all stars.

10:21

In this video, we will add a text label using a custom font.

14:42

In this video we will add a parallax background that moves at an offset value in relation to the rest of the world.

13:53

In this video, we will add sounds to the game using SKActions and using the AVAudioPlayer

4 questions

Let's see what you know by the end of the main part of the project

Section 5: Bonus Lessons - Easy extensions with the final project
02:45

In this video, we will modify the Boundary class to make certain boundaries pushable.

02:33

In this video we will modify the Star class to make certain stars automatically advance the level.

Student questions
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Justin Dike, CartoonSmart / Owner / Leader Developer and Instructor

Justin Dike is the founder of CartoonSmart one of the internet's first video training websites. He is a long-time illustrator and animator, focusing mostly on Adobe Flash, and experienced programmer with Swift, Sprite Kit, Actionscript 3, Objective C and Cocos2d. For CartoonSmart he has recorded hundreds of hours of video tutorials and recently published his first full length book titled iOS Programming with Xcode and Cocos2d available in the iBookstore. Justin has also developed many iOS games, including a side scrolling game engine.

Ready to start learning?
Take This Course