Funny, I had a similar experience. I wrote a script that enabled players to "call in" mortar support, by looking at the target and selecting a distance. Also using shoddy trigonometry and also one of my earliest programming experiences. Very basic from today's perspective, but I was mighty proud back then and so hooked!