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