O'Reilly logo

Getting Started with SpriteKit by Jorge Jordán

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. What Makes a Game a Game?

In Chapter 1, The First Step toward SpriteKit, we set the basis of our game by adding a background and the first sprite to our project. In the following pages, I will show you the key elements that take part in every game, such as the movement of sprites in a scene, the detection of touches, and the handling of collisions. You will also learn how to add labels to a scene and play music and sound effects.

The things that you will learn in this chapter are as follows:

  • How to detect touch interaction
  • How to execute actions on sprites
  • How to handle collisions
  • Creating and updating labels
  • Playing music and sound effects

Handling touch events

Our beloved main character is supposed to run though several doors, but some of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required