SpriteKit Animations and Texture Atlases in Swift

Create an animated walking bear while you learn about using texture atlases with animations in this SpriteKit tutorial! By Kevin Colligan.

Leave a rating/review
Download materials
Save for later
Share
You are currently viewing page 3 of 3 of this article. Click here to view the first page.

Where To Go From Here?

You can download the completed version of the project using the Download Materials button at the top or bottom of this tutorial.

For more animation fun, here are a few ideas to try out:

  1. What if you wanted the bear to moonwalk? Hint: Try building the array of images backwards!
  2. Try accelerating or slowing down the frame times in animateBear().
  3. Try animating multiple bears on the screen at the same time. Hint: Create multiple sprite nodes with actions.

At this point, you should know all you need to start adding animations to your projects using texture atlases. Have some fun and experiment by creating your own animations and seeing what you can do!

If you want to learn more about SpriteKit and Swift, you should check out our book 2D Apple Games by Tutorials. We'll teach you everything you need to know — physics, tile maps, particle systems and even making your own 2D game art.

In the meantime, if you have any questions or comments, please join the forum discussion below!

Kevin Colligan

Contributors

Kevin Colligan

Author

Kyle Gorlick

Tech Editor

Morten Faarkrog

Final Pass Editor

Richard Critz

Team Lead

Over 300 content creators. Join our team.