![]() ![]() Some rooms are guaranteed to spawn, while others have a small chance or criteria. Nearly all other special rooms are placed at a random end room. This procedure ensures that the secret room will always be placed, but generally they are wedged near intersections so they are next to a lot of rooms. If doesn’t find one after 300 attempts, it loosens the criteria a bit, and after 600 attempts it loosens it even futher. The generator randomly searches for an empty cell that is next to at least three rooms, and not next to any end rooms. ![]() These are added to the floorplan, and one one of the few exceptions to rooms not being placed adjacent to multiple existing rooms. Because of the outward growth, this is always one of the rooms furthest from the start area. Special Roomsīoss rooms are placed by reading the last item from the end rooms list. It must have the right number of rooms, and the boss room cannot be adjacent to starting room. The floorplan is then checked for consistency. The restriction that it won’t add a room which already has 2 neighbours keeps the rooms in separate corridors that never loop around. In the case of maps needing more than 16 rooms, the starting room is reseeded into the queue periodically to encourage more growth.Īs the above starts with a single room, and repeatedly expands outwards, it’s essentially a breadth first exploration. If a cell doesn’t add a room to any of its neighbours, it’s a dead end, and it can be added to a list of end rooms for use later.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |