It is a 2d game. So basically what I am trying to do is, rather then making game states and clrearing/loading the game resources during runtime, I am thinking to load everything at the application start and set all levels frame by frame. Then when I have to change the level, I will just skip the frame. I have implemented the scene, resource loading etc, now I have to implement only the layer and frames. it is like -
Scene -- Layers -- Frames
If I hide one layer, every entity belongs to that layer will hide and remain invisible to all frames(levels).
I also want something like this, but it will not be visible graphically in my game. It will only work internally. What I wanted to do is, load the resources at the initialization and setup all the levels at the same time, frame by frame. Each frame will be a separate level. And during runtime, just change the frame to change the level. Each level will have some layers, which will decide the visibility of the entities. What I wanted to know is, how do I implement them, as a class, as a struct, as a vector or something else. A simple example will be, Flash actionScript 2. The levels are created frame by frame during initialization and nothing is freed/loaded during runtime.