What if I stick to a lot of layouts but keep saving the player's variables each time I leave and enter a room?
Also, how does it work like I said up there in the Persist example?
EDIT: I didn't mean to say that my game is for a mobile game, I'm just trying to find a general solution...
Thing is, there is almost never one general solution . It all depends on how you want the game to behave. I never used persist object, but from what I did read, it is only to keep object's variables across layouts and not position. You could eventually create 2 instance variables ( or global variables ) PlayerX,PlayerY, and then on starting new layout, set it's position to new X but load Y from the variable ( if you moving horizontally ). Ah, and you'll need to store information which room your player is exiting, so you can determine which direction player is entering from to set his starting position accordingly. Best thing would be to use arrays, and create some layout naming convention that you could easily loop trough and compare with data in array.