03/07/22 - Creating a mesmerising menu background


Infinite Treasure currently has an ugly blue background in all its menus. One of the main themes of this game is relaxation so I wanted to replace this with something therapeutic that players could stare at between levels. I was fortunate enough to be able to license some ambient sounds from the wonderful Dr Stéphane Pigeon at MyNoise - a particularly relaxing one was Sleeping Dragon so I chose to pair this with my new background. Here's the result:


How does it work?

  • The camera pans around a simplified version of a game level. Unlike normal levels, it is not infinite, but still uses Perlin noise to generate tiles with colours ranging between two values
  • The camera moves in a figure-of-8 based on a simple function applied to an ever-increasing counter C, with a magnitude M (this affects the size of the figure-of-8):
    • x = M * sin(C)
    • y = M * sin(C) * cos(C)
  • The camera moves like this:
  • The colours cycle through 12 pairs of complementary colours in a colour wheel. For both a "light colour" and a "dark colour", a cosine function is used to interpolate values between successive points around the colour wheel

I'm quite happy with the result. In the absence of my art skills, this turned out to be a simple way to make an attractive menu background using basic mathematics. The UI elements are still quite ugly - I'll likely employ a designer to improve those.

This background will be coming in the upcoming Alpha 6 version of Infinite Treasure, due next week. You'll be able to download it on Google Play then at https://play.google.com/store/apps/details?id=com.brillgames.infinitetreasure (I am seeking play-testers and feedback - all is welcome!)

Leave a comment

Log in with itch.io to leave a comment.