0 votes

I am trying to make a dungeon generation system for my game. I plan on using rooms (scenes) I already made and just add them in a random position, for example. The issue is that I don't know how could I add doors to these rooms.

Would it be better to make the rooms with the doors? Or would it be better to get the position where two rooms collide and "break" that part, adding a door after that (The rooms are tilemaps)

in Engine by (97 points)

1 Answer

0 votes

I am doing a project with design just like this right now

My room blueprints have marked joint tiles. Room menager generates rooms in certain locations and orientations connected by these joint tiles. After connection joint tile becomes integral part of a second room and later door is generated in this place, oriented as indicated by connection. Finally menager builds walls everywhere to border generated tiles from surrounding emptiness.
This way of solving this was important for pathfinding - You don't want one-tile long roomless corridor just for the purspose of door.

by (2,434 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.