So I have room generation working on a grid basis(plotted in a random grid(layout)). Now I am just stuck on getting the paths to connect properly. On the creation of the room position it stores it in two arrays of roomX[] and roomY[](for small and big rooms).
roomSize is the equivalent of grid size. (for a small grid and a big grid)
i pass the roomX and Y into for a function which checks them against one main room.
from here the check between two positions function should take the x and y values of two rooms. determine the left most and top most and plot a path accordingly. (it doesn't matter if it passes through other rooms)
It plots the path by changing values in the random gird.
It works to some extent. And generally it will connect most rooms.
But rooms closer to the bottom of the grid can often be left out and have a random path drawn elsewhere.(the path would end on the same y axis as the room but not the correct x, or at least i think that is what is going on)