Here's my situation: When the main game state starts, it generates a couple hundred objects (sprites, images, etc) scattered around the world, but when I change to a different state, the objects are removed as normal, and when I change states back to the main state, the objects are re-generated. I'm trying to figure out a way to not re-generate that large number of already-generated objects when I switch back to the main state. I already know that game.state.start() gives you the option to not clear the world, but this keeps the objects from the previous state displayed.
Is there a way to store those objects so they don't appear when the state changes and then reappear on the screen where they were when the state is set back to the first state?
More details: I'm making an AR mobile game that uses random seeds based on the current geolocation and time (rounded to minutes) to generate objects with limited lifetimes. I'm trying to make it so that objects that are close to being destroyed still appear even though re-generating the objects would not generate them. For example, an object was generated 5 minutes ago and will die in 2 minutes. The state changes and the player does stuff in that state then goes back. The object still should have 1 minute left before it disappears but it is already gone because time has moved forward to the point where it would not generate the object again. I'd like that object to remain and live out that last minute of its life since it was there before the player changed states and should be there when they get back.