So, i'm creating this little music game as and exerciseand want to do it as "Correct" as possible.

The game works like this:

  • The player gets a short melody played to them ("C4","D4","E4","C4")
  • Then the player has to play it back.
  • The notes in each level are at the movment stored in arrays as strings, and each level has a class(Level1, Level2 etc...).

I'm thinking this can be difficult to manage as a create more complex levels. And I really want to be able to add Levels via the internet without having to update the app.

Would it be better to have a "LevelMangager" that loads inn XML data on runtime?

I'm using the starling framework and i want it to be able to run on Mobile to.

As you probably can tell i'm fairly new to game dev. so all insight is appreciated

  • \$\begingroup\$ There's generally no one right way to do anything (this included), so these sorts of questions tend to be discussion-oriented. They're better asked on a forum, like GDNet. That said, I'd say you probably don't want each level to be its own class, but rather have many instances of one class ("Level") and load the notes from a file. \$\endgroup\$ – user1430 Apr 13 '15 at 17:13
  • \$\begingroup\$ I sorta disagree with this close reason; there is an objective answer to the specific question asked here. Would it be better to have a "LevelMangager" that loads inn XML data on runtime? Better than having each level as a separate class, yes. The BEST approach, well that is more debatable and could result in a non-productive discussion. \$\endgroup\$ – jhocking Apr 13 '15 at 19:11