Adding Animation to Your Game

We have learned how to create sprites on screen as well as made our background image scroll continuously. Sprites are basically just images, which are used for game assets. Now, it is time to add a bit more spice to it and make it interesting. In this chapter, we will make our player character appear on screen on top of our background and add an animation that will make the player run. In this chapter, you will learn the following:

  • Creating sprite animations based on sprite sheets
  • Running basic animations
  • Creating an abstract class to serve as a foundation for our future game objects

By the end of this chapter, you will have a running character on screen. So let's begin!

Get Learning Android Game Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.