Getting Started with SpriteKit

Develop fun and exciting games and create amazing animations for your existing apps with SpriteKit, Apple's 2D game development framework

Getting Started with SpriteKit

Jorge Jordán

1 customer reviews
Develop fun and exciting games and create amazing animations for your existing apps with SpriteKit, Apple's 2D game development framework
Mapt Subscription
FREE
$29.99/m after trial
eBook
$22.40
RRP $31.99
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785887338
Paperback226 pages

Book Description

SpriteKit is Apple’s game engine to develop native iOS games. Strongly boosted by the Apple Inc., Cupertino, it has increased in popularity since its first release. This book shows you the solutions provided by SpriteKit to help you create any 2D game you can imagine and apply them to create animations that will highlight your existing apps.

This book will give you the knowledge you need to apply SpriteKit to your existing apps or create your own games from scratch.

Throughout the book, you will develop a complete game. The beautiful designs implemented in the game in this book will easily lead you to learn the basis of 2D game development, including creating and moving sprites, and adding them to a game scene. You will also discover how to apply advanced techniques such as collision detection, action execution, playing music, or running animations to give a more professional aspect to the game. You will finish your first game by learning how to add a main menu and a tutorial, as well as saving and loading data from and to the player’s device.

Finally, you will find out how to apply some mobile games techniques such as accelerometer use or touch detection.

Table of Contents

Chapter 1: The First Step toward SpriteKit
Game engines
Creating a new SpriteKit project
Running the project for first time
The SKNode class
SKScene
Your first game – InsideTheHat
Our first SKSpriteNode class
Adding a background
Working with screen resolutions
Summary
Chapter 2: What Makes a Game a Game?
Handling touch events
1-star challenge: an easier way to reset position
Collision management
1-star challenge: check collisions accurately
Creating labels
Playing some music
2-star challenge: reproducing sound effects
Summary
Chapter 3: Taking Games One Step Further
Extending the SKNode class
2-star challenge: colliding puppets
The parallax effect
Creating animations in SpriteKit
2-star challenge: animate collisions
Geometrical primitives
Summary
Chapter 4: From Basic to Professional Games
Ending the game
3-star challenge: restarting a game
Creating a main menu
Transitions and scenes
Creating a tutorial
Loading and saving data
2-star challenge: completing the tutorial
Summary
Chapter 5: Utilizing the Hardware and Graphics Processor
Using the accelerometer
Adding shaders to our game
Turning on the lights
2-star challenge: moving lights
Summary
Chapter 6: Auxiliary Techniques
Creating particle systems
Combining SpriteKit and UIKit
Using third-party tools
How to find audio files
How to find images
Summary

What You Will Learn

  • Create and configure a SpriteKit project from scratch
  • Load and manage the basic elements of games such as sprites, labels, and geometrical primitives
  • Handle touch events, detect collisions, and play sound audio files
  • Create complex elements, animate sprites, and run the parallax effect
  • Complete your games with key components such as a main menu, transitions between scenes, a tutorial, and the ability to load and save data
  • Increase the efficiency of your device using the accelerometer or by adding shaders, lights, and shadows
  • Gain complementary techniques such as creating or finding audio resources, applying SpriteKit to apps, or using third-party tools

Authors

Table of Contents

Chapter 1: The First Step toward SpriteKit
Game engines
Creating a new SpriteKit project
Running the project for first time
The SKNode class
SKScene
Your first game – InsideTheHat
Our first SKSpriteNode class
Adding a background
Working with screen resolutions
Summary
Chapter 2: What Makes a Game a Game?
Handling touch events
1-star challenge: an easier way to reset position
Collision management
1-star challenge: check collisions accurately
Creating labels
Playing some music
2-star challenge: reproducing sound effects
Summary
Chapter 3: Taking Games One Step Further
Extending the SKNode class
2-star challenge: colliding puppets
The parallax effect
Creating animations in SpriteKit
2-star challenge: animate collisions
Geometrical primitives
Summary
Chapter 4: From Basic to Professional Games
Ending the game
3-star challenge: restarting a game
Creating a main menu
Transitions and scenes
Creating a tutorial
Loading and saving data
2-star challenge: completing the tutorial
Summary
Chapter 5: Utilizing the Hardware and Graphics Processor
Using the accelerometer
Adding shaders to our game
Turning on the lights
2-star challenge: moving lights
Summary
Chapter 6: Auxiliary Techniques
Creating particle systems
Combining SpriteKit and UIKit
Using third-party tools
How to find audio files
How to find images
Summary

Book Details

ISBN 139781785887338
Paperback226 pages
Read More
From 1 reviews

Read More Reviews