Saturday, 7 April 2012

Testing connections

Fixed corridor corner fix, now it removes only the tile next to room wall. Then I started to test the level generator. Usually it works fine, but sometimes rooms and corridors have a bad alignment which makes impossible for them to connect.


Red circles show problem areas where connection has failed for various reasons. Sometimes there is another room blocking the way, sometimes corridors run at the round part of the round room. How to fix these? It's a good question. One possible way is check room connections, because rooms are objects and their data includes the number of connections (doors). So, a room with zero connections has obviously failed. Those rooms could then be connected with a special routine starting from a random room place and travelling from there with a special corridor routine (using path finder to find another corridor).

No comments:

Post a Comment