A downloadable app for Android

Download NowName your own price

This is a short maths game intended for kids that can be played on android devices.

Made in April 2022

The game has 3 levels, easy, medium, and hard. Each level has a different time limit on each question. Easy has no time limit per question, normal has 20 seconds per question, and hard has 10 seconds per question. 

Each level has 10 questions, that are randomly generated with numbers from 1-12, and a random symbol. I programmed the questions to make negative answers or answers with decimals impossible to show up, so that the questions would be easier to answer, since the target audience for the game was older children. Getting a question wrong will decrease the timer by 1.5 seconds on that question.

Each question gives you points based on how much time was left on the timer on that question when you answered it correctly. These points add up to the end of the level, and if you get a high score, the end screen will show you you got a high score and the score will be saved on the level selection screen. Since the easy difficulty has no timer on it, each question at first gives you 100 points, and then 5 points are removed from that question every time you get a question wrong. Getting a question right will also play a clapping noise, and getting the level right will play a "whoo!" noise.

I prevented subtraction questions from going into negatives by randomising the first number first, and then randomising the 2nd number between 1 and the first number, so the 2nd number will only ever be as high as the first number. Division required more code to prevent decimals. I managed to prevent decimals in division questions by creating a class with an int and a list in it, then creating 12 objects from that class, and incrementing the value of the int ever object. I then looped through 1-12 for each class, and checked if the int in that class could be divided by the number in the loop, and if it could, I would add it to the list. This would be done when the first level loaded up, and would be saved. This meant I had 12 objects, with each number and each number it can be divided by in it,  so when randomising a question I could pick a random class object, and then pick a random int inside the list that is in the object, which will only be numbers the int in the object is divisible by.

If I did this project again I would optimise the code by taking more advantage of classes, instead of just functions. I would also like to find a more secure way to store the high score of the levels, as in this project I just used unity playerprefs which are stored in plain text and as so are very easy to modify and change the values of, which would make it easy for someone who knows what they're doing to modify their high score.

Download

Download NowName your own price

Click download now to get access to the following files:

Maths Game 19 MB
Maths Game Unity Project 184 MB
if you pay $1 USD or more

Leave a comment

Log in with itch.io to leave a comment.