O'Reilly logo

LibGDX Game Development By Example by James Cook

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

Introducing Pete

So far we have created a level using Tiled, and we have implemented tile maps in LibGDX so that we can see that level. The next step is to introduce our characters into this world and have them interact with the surroundings.

Introducing Pete

The preceding image shows Pete, our lovely squirrel! He has four different poses, two for walking and one each for jumping up and down.

Adding our character

Before we add our textures to Pete, let's go through the process of creating our character in code and have them interact with the world, then we can implement the animations.

Let's create class for Pete, I have called it Pete and in that class we are going ...

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