Posted on

Table of Contents

Western Lion is a collection of two minigames based on the spaghetti western theme, developed during the one-month Spaghetti Western Jam organized by IndieVault.it.

In one of the games, you impersonate Nobody, trying to shoot mugs before they shatter on the pavement, while in the other game you are Jack, annoyed by a fly while waiting at the train station.

Preparation

The idea of minigames originated from the fragmentary way scenes from spaghetti western movies I have seen over the years came back to my mind. Figuring out how to realize that idea was the next step.

The libGDX framework was definitely a good choice from both a prototyping speed and portability perspective.

Talking about graphics, I reduced it to the lowest terms, as it was easier working with an 8-bit palette borrowed from the wonderful PICO-8 fantasy console, and a resolution of 160x90 pixels.

Audio resources were simply collected by searching on Freesound.org.

Jack and the Fly

The first mini-game is Jack and the fly. It is inspired by the concept of waiting, which has a prominent role in the beginning of Sergio Leone's Once Upon a Time in the West.

Waiting makes us think; it gives us time to breathe, to meditate, to observe. This emphasis projects us onto those boundless spaces and, at the same time, allows us to get lost in the tiny details.

Nobody is drinking

The second mini-game is Nobody is drinking. It is based on a scene from Tonino Valerii's My Name Is Nobody.

Nobody, the main character of the movie, bets on a particular game where you drink whiskey from a mug, then throw the mug into the air, and try to shoot it before it shatters into pieces on the ground.

With both games, the key to winning is being alert and quick. Indeed, when you finish a game, your time is recorded onto a leaderboard.

Development

Here is the list of tools I used to develop Western Lion:

Although the right tools greatly simplify the development of projects like this, a good understanding of mathematics and physics is fundamental to realizing the ideas that come to your mind.

  • A two-dimensional Cartesian coordinate system helps position pictures in the right place on the screen;
  • The laws of motion allow you to simulate the movement of objects, like the fly and the mugs.
  • Trigonometric functions can be used to make cool, smooth animations like the sliding in the achievements screen.

These are only some examples of the countless applications that mathematics has in the world of game development.