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 ...

Get LibGDX Game Development By Example 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.