I'm building a game in Flash similar to the structure of Angry Birds or Cut the Rope (where there are a number of "rooms" and unique levels created within each "room").
The user gets through the game by playing through a room to unlock the next room. I have all the logic to unlock rooms and move between them. The problem I've come to is that I'm not sure how to build out the levels in each room. Let me provide an example.
Let's say I have 15 rooms. Each room has 10 levels, each with their own objects whose attributes change as the levels increase (ie. speed, position, collisions). There can be 2 to 5 objects out of a possible 10 that are randomly generated and placed on the stage, each level. This all adds up, with so many combinations and a total of 150 levels.
Ideally I would like to use a single class that controls the level creation for all rooms. Right now I have a Menu Class, one Class for each room to build the background, one LevelCreation Class, and one for the pause/lose menu. Does this seem like a feasible Class structure? Or should there be a LevelCreation Class for each room?
Switching between levels, re-initialize existing structure or create new one? is sort of helpful in reusing objects when advancing from level 3 to level 4, but I'm lost on how to set up the individual levels. So as a second part to the question: in my LevelCreation class(es), what is the best way to store the level attributes? In an array (or multiple arrays)?
I've also taken a look at How should I manage game levels in a flash games? but it seems to focus more on save/load data and not on how to build the levels. Structuring various game states and unique levels seems to be the closest I could get to an answer, but I guess I'm too much of a noob to quite understand what the answer to the question is saying.
I hope this all makes sense and I appreciate any help that I can get. Please let me know if I need to provide more details.