O'Reilly logo

SFML Blueprints by Maxime Barbier

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

Building animations

In all our previous games, all the different entities displayed on the screen were static; at least they were not animated. For a more attractive game, the simplest thing to do is add some animations and different entities on the player. For us, this will be applied on the different buildings and warriors.

As we use a sprite-based game and not real-time animation based on bone movement, we need some textures with the animations that are already prepared. So, our textures will look as shown in the following figure:

Building animations

Note

Note that the green grid is not a part of the image and is only shown here for information; the background is transparent ...

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