Book Image

iOS Game Programming Cookbook

Book Image

iOS Game Programming Cookbook

Overview of this book

Table of Contents (19 chapters)
iOS Game Programming Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Animations and Texture

In Chapter 2, SpriteKit, you learned about the basic structure of SpriteKit and its building blocks such as scenes, nodes, sprites, and so on. We got a flying spaceship in the sky by touching the screen, and now in this chapter we will be moving to a fully featured game play for the user.

You will learn about how the content of sprites are changed using animations, how textures (which store sprite data) are used to render the sprites, how to create a large image for all game assets using the texture atlas, some character (spaceship) animations, and last but the most beautiful will be creating a parallax background for the game full of animations.

In this chapter, we will be focusing on the following recipes:

  • Animating your textures

  • Creating a texture atlas

  • Adding animations using a texture atlas

  • Collision detection

  • Parallax background