This is freaking awesome. I'm not gonna pretend to even begin to understand the guts of how this works, even though I have been doing a bit of reading about visiplanes recently.
This is immeasurably quicker than the traditional way of checking visiplanes... which is, of course, fire up chocorenderlimits and wander around the map staring at things and watching the little visiplane number.
'Course the limiting factor here is that obviously this can only calculate a visiplane count based on the map in its starting state, i.e. no doors open, no walls lowered, no new areas exposed, and it goes without saying that these things can vastly alter a visiplane map.
If you look at the top left area, you can see a big open area, surrounded on its left, top and right sides by a corridor, and these three sides are connected by 3 sectors (currently closed). Obviously when these three sectors open, it will thoroughly alter the visiplane count. And even if you don't know this map, you can pick out plenty of other areas where joining sectors are closed off.
I mean, I know little about programming and I imagine this would be a lot of work, but I wonder how possible it would be do write something that could do exactly what this program now does, but with the map in a 'totally open' position. I guess this program in its current form must take into account floor and ceiling heights to test the number of visiplanes at any given position. Would it be possible to incorporate linedef triggers into this? So say a door at map start had floor and ceiling heights of 0 and 0. And when the door was opened by a nearby switch, the door ceiling height raised to 72. Then the visiplane calculator would work out from the triggers and sector tag, that this particular sector now has floor and ceiling heights of 0 and 72 instead of 0 and 0, and recalculate the visiplane count accordingly.
Again, I know crap all about this stuff, but I am just wondering if such a thing is in any way a reasonable idea. It is probably possible, but whether the workload of doing something like this would be simply too high, I don't know.
Anyway, thanks for this little program, it is pretty darn neat.