What would be the best way to create a particular math game? (details of the game in the post)

0 favourites
  • 3 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • I want to make an educational game about the 4 math operations and I'm trying to figure out the best way to do it. The game will show a result and the player needs to select the number options below as many as necessary, according to the mathematical operator being displayed,. For example: operator: sum / result: 10 / alternatives to be selected: 5, 3, 2, 1 and 4. In this case, the player could select 5, 4 and 1 or 5, 3 and 2

    My solution, which is certainly not the best, would be to create a two-dimensional array for the 5 levels for each operator, to store a result and its respective alternatives/options, then use another array to randomize and delete the options each time they are displayed on the screen so that they don't repeat.

    Is there a better solution? For example, one in which the system itself automatically creates a random result and also the alternatives for each result withou repetions? If not and I will really have to define all the results and alternatives, the way I intend to do this would be the best way to shuffle and avoid repeating the exercises?

    I am looking for ideas/suggestions.

  • Storing in the array as you described seems like the way. If the focus is on operators then I would keep it simple, have a sum of two numbers and the child chooses the operator in the middle. Or alternatively have the operator and then child taps 2 numbers that will go before and after. I don't think giving so many options to make 10 is fun or educational.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for answering.

    Ok. I decided to use only one array for all levels. Normally I use localstorage to save/load the information, but as I only want the information to be available while the game is open, I was wondering if I could generate a JSON file with this information (a JSON file for each bidimensional array) and load it only if the player returns to the levels they have already passed to show different data. It seems to be a leaner solution but I don't know exactly how to do this. Would this be similar to what I usually do with localstorage?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)