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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.