Hi Marco,
I completely dropped this idea on the floor as I was building my first game. The trouble with it is that you need to iterate all objects and save the state of only the interesting parts (position, chest open, etc).
I recommend adding `saveState` and `loadState` methods to every class that needs it. Before switching levels, iterate the entities in the game world and call the saveState() method if it exists. In your me.game.onLevelLoaded callback, do the same iteration, but call loadState() instead. You can use me.save to persist data :
http://melonjs.github.io/docs/me.save.html
The tricky part here is to uniquely identify these entities. So for example, a chest always knows its unique id is abc123, so it can save/load its state using that key. I suppose you could add an id property manually to each object in Tiled. MelonJS does create a uuid property on some entities, but I don't know if they are deterministic.
Second, you can deterministically generate unique ids by hashing the current map name with the input arguments to the entity constructor. I will probably add that to melonJS, since it would be useful for other things.