Color Match Unity Game

Color Match is a small Unity game where you have to match the colors of the circle with the color of the incomming dots.

Game screen 1
Game screen 2

The source code of the Color Match project is available at the following link: https://github.com/SebastianMihali/ColorMatch

I’ve made everything myself except for the sound effect which I got here: https://opengameart.org/content/bubbles-pop

If you want to play the game you can download the apk at this link

ADS

I’ve also implemented Unity ads.
There is a button in the top corner that shows an interstitial ad.
When the game ends there is also an option to watch an ad and get another life

Game over ad

Circle creation

The circle is generated in runtime based on some variables like
the number of colors and the colors themselves.

I’ve made the number of colors a range value going from 4 to 10

Circle creation
Each color of the circle is a rotated filled image based on the number of colors.
For example, if we have 4 colors then each slice of the circle will be filled 0.25 and each will be rotated at 0,90,180,270 degrees.

To detect the collision with the circle I used an edge collider 2d which has as input an array of Vector2 points and a radius, creating a thick polygon.
From the test I’ve made ideally there should be at least 3 points or a point every 22 degree

Difficulty

The difficulty of the games scales with the time played.
In the inspector, there is a variable named “Time Max Difficulty” which is the time the user has to play to get the maximum difficulty.

The difficulty changes the speed of the dots and the rate at which they spawn. These are also visible in the inspector as “Speed Range” and “Time To Spawn Points” and are both Vector2 variables with the x being the smallest value and the y being the largest.

 

If you have any question you can contact me on twitter or send me an email