How can I make That It save Data/ Make points for my game

I am making different levels for the game I am creating, wanted that after done the level, it should save it, and I want to make that you get stars, and there is three stars, I wanted it that the stars you get depends on you did well on the level. Is There Any Ideas?


By:- Jack Median

What type of game? It could be based on one thing or a combination of things. It depends on what is happening in the game.

A puzzle game could be based on time, number of matches, moves or score. A shooter based on kills, accuracy, time or score. A driving game based on time or the order they placed.

There could be a main goal to complete the level but a bonus goal that would add a star.

is a mixture of fantasy game, the legend of zelda and super mario bros

(need more explaintion, if yes type yes)

You are having here 3 problems

1 - Saving and loading (you want logic of how to save so you can shove it in before you finish the level)

2 - IDK how you gonna measure stars player should get for performing in level but you would make structure variable and simply make level 1 level level 3 child variables and so go on
Make them all number variables and you would go from 0 to 3 since you have 3 stars at max and 0 at worst
And use saving/loading logic from above

3 - Would be displaying amount of stars you already have in level select screen
And you would that from the structure variable made in step 2 and that is pretty much all you need to do