> Just have 1 invisible box. On collision go to 'next layout'.
>
I do that in a way. I have one invisible box with a variable. The variable is the name of the layout, so I use go to invisiblebox.variable layout.
Once again, that is not the problem. The problem is I will end up having way too many layouts, one for reach room. Like I said my problem is not layout switching, is keeping it efficient.
Hello there,
If i understood correctly, your main concern would to have for example, 50 "maps" on your game, so meaning 50 layouts (at least), right? Well, i just tought one thing you could do: have a couple layouts big enough to "comport"/"can contain" (cant find a word in english) smaller maps.
For example, having a window of 500,500 and one layout of 2000,2000 you could easily have 4 independent maps full window sized. You'd need to just spawn your player on the correct map on the layout, and ofc having some walls between the maps making the player unable to walk by.
If you played Tibia or any other top-down game like this you'll probably understand what i mean. If not: in Tibia you can go to the sewer, under the town. Dependending on the entrance you use, you'll get to one are or another, and can even see the other areas when on the sewer.
Edit: as your game is sidescrolling (im considering you have a goal on the edge of the layout), one example would be: window size 500,500, map layout 2000, 500, ok? Then if you have 3 maps you can put then one on top of each other having a final size of 2000,1500 for example, or even greater/lesser width.