Hello, I require assistance on creating a 3D Room Detection System, there are (unsolved) several topics on devforum on this issue (some even created by me in the past).
This was the closest I believe I’ve gotten, but there were several misunderstandings and / or issues.
(@ThanksRoBama posted a very in depth reply, but going it several times, it wasn’t really of help to use + there wasn’t a way they were checking if the tiles were even checking the walls?, also we don’t think it originated in lua since there were many errors / missing functions?, but overall great read for anyone wanting to learn Flood Fill )
Fundamentals:
Each post has been met with some form of confusion or misunderstandings, here is what I (and many others probably) am seeking:
Something a long the lines of this:
Flood Fill:
Everyone who replied to the many posts on ‘Room Detection’ on the devforum (including myself), has pointed to the Flood Fill Algorithm or DPS (which I already know how to achieve).
But, what I’ve been trying to explain is, we can’t use ‘color’ for the basis, and we wan’t to know what walls are making up said room.
Instead of checking the color of a ‘tile’, we were left with some options, but no one has elaborated or said which was the best answer to recreate the room detection (in the video above).
Said Options:
So we don’t want ‘color’ to decide what is / isn’t in a room, so we could:
(Issue with using Flood Fill in general: What if a room is divided in 2 rooms itself, because it’s on the inside, the rest of the tiles will cast blue, and return both rooms as 1 room)
(Blue is the tiles iterated by Flood Fill, black is the ignored / avoided color)
(this should be 2 rooms, with one shared wall)
-
Region cast each tile, and check if it’s touching a wall, and exclude that tile from the DPS.
(Issue / unsure reaction: we can’t just region each tile, due to if there’s just one wall (not connected to others), it would return as a room, so we need to check if walls are touching?, well if we were to iterate each wall, why even use Flood Fill in the first place?). -
We can use Flood Fill, return all tiles touching a wall, then loop through that table checking if Tile[1] and Tile[2] are touching the same wall, then we could get the walls in a room.
(Issue / unsure reaction: Simply and Hypothesis and was untested.)
I’ll try the second option, just to be sure, and update this topic on it’s success, but we have doubts over all.