I managed to finish the new border system. Oh boy, did I ever. I created and absolute abomination. Probably the worst piece of code from the whole project. And the worst part was that after I thought I was done I realized I forget some special cases. I don't know what was wrong with me. Probably it was too late and I was coding on autopilot, with my fingers moving but my mind on some warm tee and hot cookies (literally speaking; get your mind out of the bloody gutter :) ).
So I was forced to rewrite it. The new solution is at least 20 times shorter! It handles all cases fine. The old solution did have one advantage though: it handled the small visual artifacts. The new one does not, but it will be able to do so quite easily. But I won't fix it right now. I don't want borders to turn into "ramps 2.0". The horror!
An "Anonymous" user had a really great comment and mock up which I ended up implementing. Thank you! And hooray for me for not knowing lighting basics.
In the next video you can see the two techniques working together to better illustrate the structure of the level:
It is a little bit rough around the edges, but I am really starting to love the look and feel of it! The little arrows have double function: they help to better differentiate borders and also point you to the direction the border will move when you dig out a wall. What do you think?
There is one problem though: the border system is a huge resource hog. Even if I limit borders only to the active level it might still be a little bit too slow on older computers, especially with a full fortress and freeform fly camera.