- Maps would define a sort of view distance. This would be analoguous to the earth's curvature. For earth this is somewhere around 20km for the average human. This would have to be standardized to be the distance seen for a unit of a certain height.
- Units would define an eye-height. This would tie in with the above.
- Units would have a size, probably calculated by L x W x H or something.
- Units would have some sort of eyesight resolution tag so that units with 'sharp eyesight' could see smaller units at greater distances.
Total distance would be: (observer height - observee height) * constant / curvature. For practicality's sake, the constant / curvature part could either be precalculated or be the value given in the map def. Also factored in here would be the units eye height relative to the ground its on.
So, first a unit must be within view distance (viewable part of map). Additionally, the observer's view resolution needs to be factored in. This would be done by some sort of simplification to avoid square roots (for absolute separation). Viewability = distance (or approximation) * constant / observee size (see #3). Thus, if viewability >= observer resolution, the unit is visible. Note that units are not necessarily viewable even if they're in the view distance.
This system would encourage dragon's eyes and such things to be built to prevent small, discrete units from slipping by half-blind metal extractors. I think it would add a really neat element to the game. At no 'extra' cost, building on top of mountains is suddenly a good idea.
You may think that this is fairly complex, but in reality it is not all that crazy. Hope someone likes this. Perhaps, if time permits, I will even attempt to do some of it myself.