O'Reilly logo

LibGDX Cross-Platform Development Blueprints by Indraneel Potnis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Dungeon Bob

Starting from this chapter, we are going to make a platform game called Dungeon Bob. The story is quite simple. Our main character, Bob, is stuck in a dungeon and has to find his way out to get home. The dungeon is full of hostile creatures who will attack him, and he needs to fight them. It also contains some environmental hazards, which he needs to evade. This game will have multiple levels and the player must complete all of them to beat the game.

We will cover the following topics in this chapter:

  • Creating the player
  • Moving the player
  • Character animation

Creating the player

In this section, we will see how to create the player character and display it against a background.

Implementing the Bob class

First, we need to set up ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required