Problem with aligning different room scenes

Godot Version

4.5.stable

Question

Hello! I’m adding rooms to my 2D top-down game. Each room is a separate scene, and I switch between them using “doors”. However, currently the rooms are sort of like “pocket dimensions”, they don’t follow the laws of euclidean geometry. It could be immersion breaking if suddenly a corridor feels too long or short to be connected to another room. Is there a way to “map” these scenes out somehow?

Here are a few example images of rooms (Pink CollisionShape2Ds are doors):



One idea I had was to save the positions of each door using a tool script, but I couldn’t figure out how to save those locations as code that could be stored in an autoload.

I could also save the collision layer TileMapLayer, and then use coordinates to paste ghosts of them around the room I’m making.

Is this just a pen and paper kind of thing? Am I making rooms the wrong way?

What do you people think? How would you solve this problem? Would you even try to solve this problem?

This sounds like a pen and paper problem to me.

It’s not that you can’t automate it. You could write a script to reduce every scene to an image, load the images into an image editor as different layers, and shuffle them around using the move tool. You can create a master scene in Godot that contains instances of all your room scenes and shuffle them around like that. You can create your own editor that switches between “world mode” and “room mode” at the touch of a button. All possibilities, but all probably more work than going the pen-and-paper route.

If you want to reduce the amount of work, I recommend picking a base size and making all rooms multiples of that base size. Or if you don’t need big rooms, just pick a base size and make all rooms exactly that size. Placing rooms is now as simple as filling in a grid.

Hello @rainerdeyke! Thank you for the response.

I decided to go the “pen and paper” route, but with a twist.

I plan the layout of an area on paper, and then I map out the most important locations (mostly doors) using Marker2Ds on an “AreaBlueprint” scene. Then, when I create a new room, I use a tool script to load an “AreaTemplate” resource (it also contains other nodes, such as TilemapLayers), which adds the AreaBlueprint as a child of the room. Then, I can use the Markers as guides for where rooms connect. It’s not perfect, but it works for now. The biggest problem my method has is that I make all rooms at (0, 0), which means I have to move the AreaBlueprint around.