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

Shooting and stars

In this section, we will learn about enemies that follow a predefined path. We will also learn how to shoot bullets and kill enemies in the game.

Stars

Let's try to make enemies who follow a path made by us. We will create a new enemy type called star:

Stars

This type of an enemy will follow the path that we create in the Tiled map editor. I have created the map, which looks like the following screenshot:

Stars

The Objects layer looks like this:

As you can see, we created a path in the Objects layer using a polygon. We named the path as star. The ...

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