Make a Cut The Rope Game using SpriteKit: Part 1
This tutorial will cover how to create a game like Cut The Rope in SpriteKit from start to finish using LevelHelper 2. While similar tutorials exist, I feel all of them focus on building a prototype and not an actual game. All of them cover how to create a single level and do everything by code. This type of game isn’t suitable for doing everything in code since, in order to create a ton of levels, you need a fast way to build and test levels. This is where LevelHelper 2 comes in. It significantly reduces the time spent to put your ideas into working prototypes. As a programmer I prefer to spend my time implementing actual game logic.
The series will take the form of several videos, the first of which you’ll find below. I’ve also included prerequisites, video chapters and other useful info below. Without further ado, let’s get started!
Topics covered in this part:
- Basic LevelHelper 2 project setup
- Basic Xcode project setup
- Sprite sheets
- Basic animations
- Publishing and loading scenes into SpriteKit
Download everything you need for this part of the tutorial:
- LevelHelper 2: The tool we’ll use throughout the creation of our game.
- Xcode: Apple IDE that we will use to compile and build our game.
- Game Assets: The image assets we will use in this part of the tutorial.
This entire tutorial is available in the video above. For your convenience, I’ve split it into chapters below so that you can access each part with ease at a later time. Click on the links below to access the desired chapter.
- Introduction – Setting up a basic project
- Using images – Image naming conventions and setting up a background.
- Creating optimised sprite sheets – Packing images and reducing memory usage.
- Sprite usage, image references and parent/child relationship – Parent child relationships, reference images for faster game level layout and saving level representation as an image to help your artist.
- Animations – Animations.
- Publishing and importing into Xcode – Publishing your resources and importing them into Xcode.
- Loading the level into SpriteKit – Loading your generated LevelHelper scene into SpriteKit engine.
- Subclassing and adding game logic – Using the API to add game logic to your game.
- Understanding Z Order – Placing sprites behind or on top of other sprites.
- Cleaning up the project – Removing demo files.
- Final words
Where do we go from here?
Congratulations! If you’ve come this far it means you’ve successfully created a project, published and run your first LevelHelper scene in SpriteKit.
In the next parts we’ll add buttons to our main scene, create the game scene where we’ll create ropes, cut those ropes when the user swipes and give our little creature some candies to eat. We’ll also create a win/fail scene, a level select and an “About” scene.
I hope you’ve enjoyed this tutorial and, as always, if you have any questions or need further help, please write on my forum and I’ll do my best to reply ASAP.
This tutorial is also available on www.gamedevhelper.com
Author: Bogdan Vladu