Follow these steps to make a basic facts game:
Change the title of your project and add the first sprite.
2. Add the second sprite which is the 'wall' or object that the main character is walking towards.
3. Create the variables (a variable is a value that can change, depending on conditions or on information passed to the program)
Think about maths problems like the times tables:
The x and the = symbols are in every problem. They don't change. The things that change are the numbers.
This can be summarised as...
If you look at these examples, the numbers circled in green are 'number 1', the numbers circled in yellow are 'number 2' and the answers, circled in orange, are the totals.
This means the variables are:
number 1
number 2
total
4. Add the code to the screen which decides the numbers which show up in each times table question.
The random number from 1 to 10 is because 'Number 1' and 'Number 2' in the times table fall somewhere between 0 and 10.
If you wanted to include the x11 and x12 times tables you would change the range of random numbers to '1 to 12.'
5. Add the code which makes the maths facts show on the screen.
If you click the green flag to start the game nothing happens until you do step 5. This because we have said what the variables are but we haven't said where we want them to show up.
Add this code then press the green flag. Every time you press the green flag, you should get a new maths question show up.
6. Let the player know if they got the answer right or wrong.
At this point the questions are showing up but we don't know if we got the answers correct or not. If we add this code and then test the game your player will know if their answer is correct or not.
7. Have the player move when they get the answer right / wrong.
Set the starting position of the player and then add the code so that when they get the answer right, they move closer to the wall. When they get the answer wrong, they move further away from the wall.
8. Have the questions come up one after another
At the moment, when you test the game, only one question shows up BUT we want the questions to keep coming up until the player gets to the wall. Here's how to add the code to do that.
The questions should now come up one after the other and your player should move towards or away from the wall, depending on whether they got the answer correct.
9. What happens when the player gets to the wall?
Add this code to finish off the game. When the player gets to the wall, it tells them they're a winner and stops the questions.