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

Creating animations in SpriteKit

Until this point, we have given movement to almost every node in the scene in order to make our game look realistic, but we still have our main character static and it doesn't look very normal. It looks as if the rabbit is floating over the ground.

In order to overcome this situation, we are going to animate the rabbit so that it appears as if it is running or jumping through the doors. Animating nodes consists of intercalating images with a little modification in relation to the previous one so that their visualization provides a simulation of movement.

The problem that this technique can produce is that the performance of the game can suffer alarmingly due to the large amount of images needed. To avoid this issue, ...

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