Categories
blog Games

Psychedelic Snake Charmer – Colours

A game can be made of any number of colours, minimum being three, two for contrast, and one for transparency. Can we make a game with only one colour? That’s another question to think about before you sleep. Let’s solve that another day. This game uses five colours – background, the walls, snake, food, and the food in the snake. This could also be achieved with only two colours, one for the background, and the rest filled with the same colour, and this wouldn’t affect the gameplay significantly. But let’s stick with the five colour palette.

The colour palette must contain different shades and tints of the same colour (hue). The hue changes with every food point the player gains, but this shouldn’t affect the contrast between the different colours. The background should have severe contrast to all the other colours, since it appears beside every other colour. The wall and the snake needn’t have much contrast, as they rarely appear beside one another, and even when they appear, their shape provides for the space in between to be filled by the background, thus providing the contrast. Same is true with every other item.

Eight main colours have been chosen to serve as the base hues – Red, Orange, Yellow, Green, Cyan, Blue, Violet and Magenta, as they can be differentiated from one another easily. The player being able to tell the hues apart plays a vital role in the gameplay. Now, shades and tints of these colours are required to fill in our colour palette.

Since the background has to stand out, it is the brightest and most desaturated version of the hue. The snake and the walls are the dull ones, with walls being desaturated and the snake being highly saturated. The colour for food is between the darkest and the brightest, and the food inside of the snake is only a small deviation away from the snake’s colour.

  • background = color(hue, 25, 100);
  • snakeColor = color(hue, 100, 25);
  • wallColor = color(hue, 25, 25);
  • foodColor = color(hue, 100, 75);
  • foodInSnake = color(hue, 100, 50);

The hue is an int between 0 – 360, representing the angle of the colour on the HSB spectrum. The second and the third parameters are saturation and brightness respectively. Brightness of a colour is how bright or dull the colour. Saturation is how much of the other colours are mixed into it. A desaturated colour means that the other colours are mixed into it, which makes it appear whiter. For a more engaging colour palette, the hue could be shifted along with the other variables to create a more appealing and eye soothing experience.

There is, sometimes, a problem with the colours like Cyan and Yellow. These are the mixtures of green with blue and green respectively. They often appear to be brighter than the other colours. When desaturating them, they often fail to establish required amount of contrast with their tints. This should be corrected later by adjusting the hue and brightness to produce the required colour effect. This game might not be a perfect example, but it’s a starting point of a learning curve.

HEX:

The Hexadikc version of the game is unlockable after the player performs a series of unlocks on all the hues. If colours of the normal version are to be described in photography terms as “monochromatic”, then this version would be described as “hexadic”. Monochromatic colour palette, generally used in photography and filmmaking, is when a single hue is being used to paint the entire screen. Hexadic, generally, refers to using the entire colour wheel to fill in the screen. And this is what was intended to achieve in this version.

But since there are only five different colour requirements at any particular moment, the idea has to be ditched in favour of a pseudo hex version. In the hex version, the five hues are being chosen at random for each item. Sometimes, they form eye soothing colour palettes, whereas other times, they are not so comfortable to watch. But since they only exist till the snake eats its next food, it is a part of the game’s experiment with mimicking psychedelic experience.

Get the game at: https://rk-jain.itch.io/psy-snake-charmer
Github: https://github.com/rk-jain/psy-snake-charmer

Read more about the game at: https://uox.home.blog/2020/05/05/psychedelic-snake-charmer/

One reply on “Psychedelic Snake Charmer – Colours”

Leave a comment