Book Image

Learning iOS 8 Game Development Using Swift

By : Siddharth Shekar
Book Image

Learning iOS 8 Game Development Using Swift

By: Siddharth Shekar

Overview of this book

<p>Game development has been simplified with Apple's new programming language—Swift. If you're looking to start learning iOS development then you'll get everything you need - from&nbsp;the absolute basics such as the Xcode interface and takes you all the way to Swift programming.</p> <p>You will take a walk through the creation of 2D and 3D games followed by an introduction to SpriteKit and SceneKit. The book also looks at how game objects are placed in 3D scenes, how to use the graphics pipeline, and how objects are displayed on mobile screens. You will also delve into essential game concepts such as collision detection, animation, particle systems, and scene transitions. Finally, you will learn how to publish and distribute games to the iTunes store.</p>
Table of Contents (18 chapters)
Learning iOS 8 Game Development Using Swift
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Skeletal animation


In an earlier chapter, we saw how to make animations in the game using frame-based animation, in which we imported a series of images and created an animation by cycling through the frames. Although frame-based animations are good, they can be tedious to make. The artist has to draw each frame and you can't have too many frames if you want to keep the bundle size low. As a result, the animations don't look very fluid. Moreover, if you want to make some changes to the character, then it is back to the drawing board for the artist, as he has to go through all the frames of the animations and redo them.

Using the skeletal animation technique instead of making the individual frames for animation, we import individual parts of the character and make a spritesheet, as shown in the following:

Using an application, we position the parts of the character and then create an animation. This way we can create different animations such as walking, running, jumping, attacking, and so...