Friday, 6 April 2012

Corner fix failure

Fixed the flood fill which now correctly finds double doors to rooms by checking the connection with flood fill to make sure there is a connection per corridor and/or cavern. However the corner fix routine doesn't work that well.

I've painted red circles around the problem areas. The round room fix fails completely and that lower corridor is not connected at all. It just doesn't figure out how to create a clean entry through that wall. Also with that rectangular room the fix does work, but it's carving extra holes through corridor walls. A good way to approach bugs like this is use pen and paper to visualize the problem and create rules for the fix algorithm.

No comments:

Post a comment