How is collision detection done?
I know that hidden surface removal- ie making walls that are behind closer walls not show, is entirely controlled by the z-buffer of the graphics card (or by the D3D driver software of less powerful cards).
But this information isn't made backwards available to the calling program. So how does the game programmer figure out that someone has a clear line of fire to a target and that there isn't a building in the way to stop the shell? Obviously this isn't a trivial task as AH occasionally gets it wrong in very complex environments: in Tank Town you can sometimes shoot through buildings and hit tanks you can't see. (The graphics cards even sometimes gets things wrong and you can see the tank behind the wall- and shoot it).
The only way my feeble brain can think to do this would take forever and be inaccurate: step calculate the shell position along its path and check at each point if it is within the footprint of a building or target.
Can any game programmers out there tell me how its actually done? Or is that proprietary?
(Just curious)