
Dive into SpriteKit to build unique 2D games across four projects with 50+ combinations, using source code, a companion app, and flexible controls and scoring, including a smart bomb.
Choose project 1 variations—highway, space, or sea—and learn particle effects and collision detection as you code in SpriteKit. Follow the module lectures to decide options and dive into game play.
Learn to build a racing game background in SpriteKit by loading the road at 2x, creating a sprite node, and displaying it behind other elements using zPosition in didMoveTo.
Create mud particle effects in sprite kit by modifying a snow template, setting left-to-right motion, zero gravity, high speed, long lifetime, and brown color to resemble mud on the road.
Create the player's motorbike sprite from assets and declare a game-wide property. Set its position and zPosition in didMoveTo, test in the simulator, and plan to move the player.
Learn to move the player in SpriteKit using tilt and touch, with a touchingPlayer flag and Core Motion accelerometer data updated each frame for responsive motion.
Learn to create enemies in SpriteKit by adding a create enemy method, spawning at random y positions with a timer, and configuring physics bodies, textures, and leftward velocity.
Learn collision detection between the player and enemy using masks and contact testing in SpriteKit, assign category bits, implement the physics contact delegate, and remove the player on collision.
Design and code a scoring system in SpriteKit that awards points for minimal tilt, collecting coins, or staying alive, with a live score label updated via a score property.
Choose a Creative Commons music track and import the MP3 into the project. Use SKAudioNode to start and loop music at game start, and trigger an explosion sound with SKAction.
End the game with a dramatic finale by stopping the music, displaying a game over message, and spawning an explosion at the player's position using a sprite kit particle system.
Fix bugs in the SpriteKit game by clamping the player to screen bounds, restarting the game scene after death, removing offscreen enemies, and safeguarding the score after destruction.
Load the space background from the asset catalog as space at 2x, create a sprite kit node, and add it to game scene behind others using a negative z position.
Design space dust effects in a SpriteKit game by creating a particle emitter, tweaking angle, gravity, lifetime, and scale, and spawning particles at the right edge for instant background motion.
Create the player's rocket as a sprite node in the SpriteKit game scene, assign a player property, set its position in didMove, and adjust z position for correct layering.
Learn to move the player in two ways—tilt the device using core motion accelerometer data, or control with touch—via update loop that reads accelerometer data in landscape mode.
Create enemies at random vertical positions using GK random distribution. Position them off the right edge and move them left with a physics body and velocity.
Learn collision detection in sprite kit by setting physics bodies, category masks, and contact testing to detect player-enemy collisions, handle contacts with a delegate, and remove the player on impact.
Add a score label with SKLabelNode and a score property with a property observer that updates text via string interpolation, set z position to 2 at top, initialize to zero.
Choose how players earn points by moving very little, collecting energy, or staying alive; implement score updates in the update method with absolute movement checks and bonus collection.
Learn to add background music and sound effects in SpriteKit using SKAudioNode and SKAction, including selecting Creative Commons tracks, looping music, and triggering explosion sounds.
Stop the music, show a game over message, and create an explosion at the player's position using a sprite kit particle system and an NSK emitter node.
Clamp the player inside screen bounds in the update method to prevent movement off screen, and restart the game with a delayed new scene while removing off screen enemies.
Add a water background as a sprite node from the water 2x image to the game scene and set its zPosition behind others.
Design bubble particle effects in SpriteKit by creating a snow template named bubbles, configuring the emitter to move right-to-left with zero gravity, and start particles at startup.
Create and place the player sprite by declaring a property outside methods, adding the submarine asset, and setting zPosition to keep the player in front for tilt or touch.
Move the player by tilting the device or touching the screen using SpriteKit, with touch began, moved, and end methods and a touching player property. Use a motion manager to read accelerometer data in update at 60 fps, mapping y for left-right and x for up-down in landscape.
Spawn enemies in SpriteKit with a create enemy method, random y positions via GK random distribution, driven by a timer every 0.35 seconds, featuring physics bodies and leftward velocity.
Learn collision detection in SpriteKit by setting physics categories and contact tests for the player and enemy, handling contacts via SKPhysicsContactDelegate, determining which node collided, and removing the player.
Add a score label with SKLabelNode and a score property to display the player's score, position it above the player, and use a property observer to auto-update the label.
Choose how the player earns points: move little, collect coins, or stay alive. The update method uses abs(changeX) and abs(changeY) to award points and manage bonuses, collisions, and stars.
Import a Creative Commons track as an mp3 and loop it from game start with SKAudioNode. Trigger explosion on death using explosion wave and SKAction, while background music plays.
Learn to end a SpriteKit game with a dramatic finish by stopping music, showing a game over message, and triggering an explosion at the player's position via a particle system.
Clamp the player within screen bounds, restart the game after death, and remove off-screen enemies. Learn update timing, scene transitions, physics bodies, random distribution, timers, and scoring.
design and build a puzzle game in spritekit that uses a grid of similar items to find the correct answer; explore variations with animals, lights, or numbered balls.
Set up a blank SpriteKit scene, load a background image from assets, and add it behind all nodes using z position to fill the screen.
Create a 12 by 8 grid of animals in SpriteKit using Spryte note objects with 64 by 64 and 80 by 80 spacing, starting at x -440 and y -320.
Dive into creating levels in SpriteKit by showing a growing set of animals in a shuffled grid, with a single correct answer and dynamic textures.
Design a tap-based gameplay where tapping the correct grid item triggers sparks, fades wrong items, and levels up, using SpriteKit particle systems and GCD for delays.
Learn to handle wrong guesses in SpriteKit by implementing a wrong answer method, showing a red X briefly, and demoting the player or returning them to level 1, before scorekeeping.
Implement scoring in sprite kit by adding a score property and an SKLabelNode, placing it in top-left, and updating it via a property observer when correct or wrong answers occur.
Add sound effects and background music to your SpriteKit game using SKAudioNode, choose from five tracks by Kevin MacLeod, and use SKAction for correct and wrong sounds.
End the game by choosing ten seconds per level or three minutes for the whole game, and implement a countdown using start time, a time label, and the ceil function.
Fix bugs by capping items to 96 to prevent grid overflow, and implement a new game scene after loss using gcd with aspect fill, while disabling rapid taps.
Create a new SpriteKit project from a blank template and set a full-screen background image in the game scene via the didMoveTo method, using assets.
Dive into SpriteKit by building a grid of lights using SKSpriteNode objects. Arrange red and green 64 by 64 assets in an 80 by 80 grid with offsets.
Create levels in SpriteKit by showing a subset of lights in a grid and highlighting the correct one. Level up by shuffling items, hiding lights, and flashing them.
Learn to detect taps on grid items in a SpriteKit game, trigger sparks at the touch point, and level up after a correct guess using touches began and particle effects.
Implement wrong-answer feedback in a SpriteKit game by displaying a red X, delaying briefly with SKAction, and penalizing wrong choices by lowering the level or resetting to level 1.
Implement a SpriteKit score system by adding a score integer and an SKLabelNode to display it, updating the label via a property observer when correct or wrong answers occur.
Add music and sound effects to your SpriteKit game with SKAudioNode, which automatically plays. Choose from five Kevin MacLeod tracks under Creative Commons and attach correct and wrong sounds.
Choose between 10 seconds per level, or a three-minute game timer, then implement a start time, time label, and update loop to display remaining time and trigger a game over.
Cap the items to show at 96 to prevent grid overflow crashes; use GCD to present game scene after a two-second delay and manage user interaction to avoid glitches.
Learn to set up a new SpriteKit project, initialize the background in didMove(to:), and manage scene nodes with parent, position, zPosition, and naming conventions.
Create a 12 by 8 grid of 64 by 64 ball sprites in SpriteKit, using an 80 by 80 grid with padding and a create grid method called in didMove.
Level up your game by creating a level method that shuffles and hides grid balls, then reveals a subset and marks the highest-numbered ball as correct using an sk texture.
Design and implement tap-based interactions in SpriteKit to detect correct or wrong answers, trigger sparks with a particle emitter, and level up through timed animations and grid items fading away.
Implement the wrong answer flow by showing a red X over the guess, waiting with an SKAction, then demoting to level 1 or lowering a level, triggered by touches began.
Implement a SpriteKit scoring system by adding a score integer and a top-left label node, updating the score on correct or wrong answers via a property observer.
Choose from five music tracks, add background music with SKAudioNode, and implement four correct and four wrong sound effects for guesses to enhance your SpriteKit game.
Code the end of the game in SpriteKit by implementing a countdown timer with 10 seconds per level or 3 minutes total, and trigger game over with a sprite node.
Fixes bugs in project 2 by capping items to 96 to prevent grid overflow and adding a restart flow using gcd to present a new game scene after game over.
Build a flappy bird–style game with three variations—3A Quereshi plane, 3B Sankey's sub, or 3C bumpy balloon—sharing similar code and using parallax scrolling to create depth in 2-D gameplay.
Design a flappy-bird style game in SpriteKit with parallax scrolling, starting from a blank template. Add the player plane as an SKSpriteNode, positioned near the top-left in didMove.
Explore how to implement gravity-driven motion and pixel-perfect collision in SpriteKit, using a physics world, texture-based physics bodies, and touch-driven velocity to control the plane.
Create a parallax background by scrolling two layers—the sky and the ground—at different speeds, wrapping endlessly with SKAction-based moves for depth in a 2D game.
Choose balloons or birds as obstacles from the asset catalog, spawn them every 1.5 seconds with a timer, and randomize their y positions with GKRandomDistribution.
Configure non-dynamic ground and obstacles with pixel perfect collision in SpriteKit, using the contact test mask and the category bit mask, and remove the player when collisions occur.
Create a fire particle explosion for the player, adjust birth rate and angle, load the particle file, and deploy the emitter before removing the player to showcase the effect.
Implement scoring in SpriteKit by avoiding obstacles, collecting coins, or staying alive, using a score property and label with a property observer and collision logic.
Learn to add sound effects and looping music to your SpriteKit game by integrating explosion sounds, selecting a looping track with S-K Audio Note, and stopping audio on player death.
Fix three bugs in the SpriteKit game: stop the player from moving offscreen, remove offscreen objects, and enable restart after death with a two-second delay.
Welcome to "Dive Into SpriteKit".
Note - All source code is downloadable and updated to Swift 5 in section 2
There are lots of SpriteKit courses out there, but Dive Into SpriteKit is the first to introduce a new teaching approach that puts your choices right into the games you make. Here you learn how to design and code your own games by choosing exactly what should happen.This course is written and authored by the award winning Swift programmer, Paul Hudson, and these videos were made with his permission and support. You can always be guaranteed you're learning the latest and greatest Apple technologies in the Hacking with Swift tutorials.
This course is different in that these projects put YOU in control of the design and gameplay, because you will be making many of the choices. Sometimes the choices are small – like, what should the player look like? – and other times they are much bigger, such as “how do you want to move the player, by touch, or by using the accelerometer....or what kind of special item do you want the player to have, a smart bomb?, or a maybe a power up? Or something else?
Which ever choice you make, we code it together in an easy to follow format. And with the many coding choices presented, there are tons of different combinations you can give to your games, all contributing to you building a game that is uniquely yours.
Build games by learning from an award winning Swift programmer - Paul Hudson - who has been praised by the creator of the Swift language, Chris Lattner, for his outstanding methods of teaching.
200+ Combinations - The course projects fan out to over 200 possible combinations as you make choices that decide how your game should look and work.
Choose things like: Players, Enemies, Backgrounds, How the player should move, How to award and penalize the player, Obstacles to avoid, What should happen when the user is correct or wrong, What special items should the player have, How to end the game, Background music, Sound effects...and more!
Dive Into SpriteKit gives you four complete game projects for iPad, all built on top of SpriteKit – Apple's high-performance 2D games framework.
Each lecture is recorded to be as short as possible, so you can make steady progress every few minutes and see your creation come to life.
To help you follow along, there’s a companion app that contains all the projects in all variations, so you can see how your own code should look.
You're in control - At key points the course presents various choices for you to decide what should happen next – your choices then affect how the project continues.
The course is easy to use, and your never lost, as each option is clearly defined in key lectures that lists the possible choices, and its location in the video. So navigating around to a particular choice couldn’t be easier.
Work through the projects in any order you want, as they are all completely stand alone games.
And because of the unique layout of this course, you can use the lectures as your own SpriteKit docs, for fast look up and retrieval of the code you need for design and gameplay.
Although this course is designed to teach you SpriteKit, it is explicitly not designed to teach you Swift. If you don't already know Swift you should read the introduction to Swift over at HackingWithSwift