Instance procedural rooms as The binding of Isaac

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By xShut

Hello guys i have a little question:
i followed this tutorial on youtube : to make procedural rooms 2d for a school project but now im trying to instance a new room next to previus like The binding of isaac but i have no idea.
my first idea was to declare a list and load the scenes in a for circle but i didnt have any resoult.

can i have an help?

:bust_in_silhouette: Reply From: whiteshampoo

You could instance the same scene again, add it to your games root-node (get_tree().get_root() or just get_parent() in root-node of your scene)
then set it to the desired position, move your player into the new room, and queue_free the old one.
Or just hide it (visible = false) it, incase you want to go back. If your Roomgenerator is deterministic, you can just save the seed from the random number generator and regenerate if, if nececcary.