Open akarle opened 7 years ago
Update: after much consideration, this method does not work.
We decided upon a jigsaw like method where you:
getPossRooms4ExpBasedOnGrid
or whatever, which will in turn return a list of room sizes that could be added and which doors should be connected so that the new room fits in the grid bounds and does not overlap current roomsWe also need some way to display this grid upon request, both for users and for us to debug!
Most work should be done in Floor.js I think
We need a major rehaul of the room system to provide a 2D map #76. Our game plan is the following:
Changes needed to be made:
position
= 'left', 'right', etc...Store the graph (of rooms) as an adjacency list (list of lists). ie: [[2],[1,3],[2]] means room 1 has a door to 2, room 2 has doors to 1 and 3, etc
In order to randomize this process, use a round robin type of simple algorithm: