create only one room at a time and prevent overlapping?
you could as i said pre define your room types
start with a grid of max blocks of level size then
create the first room of random type on the grid
then as you need a new room only create them on the grid
preventing overlapping by having each grid with
a variable used=1 or used=0 ... as for attaching
the correct type of rooms together that comes from
your room defenitions and current room and door
you enter .. i dont know what problems such an algoritj
would produce but i like pondering on it ..
perhaps someone comes up with a nice contribution
for something like that you wish to do....
@xbox i updated it to try and correct maze-solvability ...
edit..oh and think of the maze like hallways and
the open blocks between them you could add
rooms linking to the hallway center sections
rooms could contain stairs/elevators whatever you want
you simply have to add deadend checking and some
code for adding rooms into the empty centre blocks
linking to hallways if you decide to use that...
i find the seed generation of levels intresting
because as we all know for a small amount of code
we could generate very large or large anount of levels
it also saves space in the sense of pre made levels storage space..
by the way hallways dont even need walls ..the walls
could come from the rooms and simply add a roof ontop of it all
to form hallway roofs that way your hallways could
basicly be just simple flat blocks like roads you walj on...
i could ramble on but its up to you if and how you
decide to go forward
Last edited by Wjbender; 02/19/13 15:28.