Quote Originally Posted by PJYelton
Another idea that could possibly work depending on how you plan to write this graphics wise is to simply use the graphics themselves to tell you whether or not you hit mountain. For example, if using WinAPI you could first draw the mountain to the screen using whatever method you choose (recursively is a good way), then don't bother storing the mountain at all. Then after a shot is fired and before you draw it moving to the next pixel, check to see what color that new pixel is by using GetPixel(). If its the color of a mountain or anything else that would stop a bullet, then process a hit. I would think this would be easier to implement, but obviously far less versatile than other methods such as Jeremy's.

Actually the graphic method would be more versitle. The limit of my version, is the mountain cant be converse. The equations of the lines have to be function (pass vertical line test). IF you did it graphic wise, testing and changing pixels, it would allow you to have converse shapes. Also you would be able to avoid costly math operations. I only proposed my way as it is very "mathmatical" in solution.