How to create Mission System 2D

Hello,

I’m working on a endless runner game on 2D. I want to create a mission system like “jetpack joyride” or “subway surfers” but i don’t know where to start or even i don’t know how to store these missions. Can you guys guide me to do this?

Thank you so much.

Te easiest hard coded way is to crate class for example
class Mission
{
// mission properties
public string name ;
public bool active ;
public float time ;
// … etc
}

and then having List
List myMissionsStore = new List () ;

Mission mission = new Mission () ;
mission.somePropertyName = someVariable ;

myMissionsStore.Add ( mission ) ;

and then access missions store by index from the list.

This is cool. I thinked almost same thing with that but the problem is how to store and check different conditions. For exampla run 1000 meter or collect 10 coins.

Also is it a good thing to create missions everytime player start the game. I think storing data in JSON is better, am i right?

Thank you!