Chapter 6. Animations
In the last chapter, we saw how to bring the scene to life by adding a scrolling background. In this chapter, we will learn different tools that can be used to animate the character. Then, using these animations, we will create a simple state machine that will automatically check whether the hero is falling or is being boosted up into the air, and depending on the state, the character will be animated accordingly.
We will cover the following in this chapter:
- Animation basics
- TexturePacker
- Creating spritesheet for the player
- Coding the player animation
- Creating and coding the enemy animation
- Creating the skeletal animation
- Coding the player walk cycle
Animation basics
First of all, let's discuss what animation is. An animation is made ...
Get Learning Cocos2d-x Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.