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, we can take advantage of texture atlases, which are collections of images that contain all the images, thus reducing the number of draw calls.
In SpriteKit, we can create atlases easily by collecting all the necessary textures in a folder with the...