This is a very difficult problem that I just can't wrap my mind around. I would be really very grateful if anyone could solve it for me. Basically I have an array in 2 dimensions.
I would like to populate the array with "blocks" of a value. These blocks will serve as rooms for a dungeon. I suppose they would have a max width and a max height.
So in our 2d array, the value 0 is a non-room square and the value 1 is part of a room block of squares. I don't need anything fancy just rectangles of the value 1 fitted inside an array.
I have a few dungeon generation algorithms I want to try but they all start with the rooms in place first. So fellows, how do I seed a 2d array with room squares?
I would like to populate the array with "blocks" of a value. These blocks will serve as rooms for a dungeon. I suppose they would have a max width and a max height.
So in our 2d array, the value 0 is a non-room square and the value 1 is part of a room block of squares. I don't need anything fancy just rectangles of the value 1 fitted inside an array.
I have a few dungeon generation algorithms I want to try but they all start with the rooms in place first. So fellows, how do I seed a 2d array with room squares?