Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS Game Development By Example

You're reading from   iOS Game Development By Example Learn how to develop an ace game for your iOS device, using Sprite Kit

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher Packt
ISBN-13 9781785284694
Length 220 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Samanyu Chopra Samanyu Chopra
Author Profile Icon Samanyu Chopra
Samanyu Chopra
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. An Introduction to Sprite Kit FREE CHAPTER 2. Scenes in Sprite Kit 3. Sprites 4. Nodes in Sprite Kit 5. Physics in Sprite Kit 6. Animating Sprites, Controls, and SceneKit 7. Particle Effects and Shaders 8. Handling Multiple Scenes and Levels 9. Performance Enhancement and Extras 10. Revisiting Our Game and More on iOS 9 Index

Animation frames using SKTexture


So far, we have used static images in our game, but if you will see, most of the games have animated effects, such as player running effect, car running effect, or any other effect that enhances the gameplay and creates a much better experience for all.

Adding the Run action texture to the player in the Platformer game

We had earlier added an image atlas of the name, idle.atlas, which contained similar images of the player standing position.

Now, we are going to add running texture images for the player, which will make it look as though the player is running in the GameScene.

Firstly, add a texture image set called bro5_run.atlas, which we have provided. The image atlas contains sets of seven images, which are sometimes also referred to as a sprite sheet. In our case, it will be known as the player running sprite sheet. These sets of images will be running one after the other at a fast rate of time inside texture atlas.

Now, let's assign the texture image for...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime