[gameprogrammer] 3d overhead view rts games

I was wondering, in a game like warcraft 3, how do you know how to corelate 
where the mouse is on the screen with where that part is on the grid of the 
map?  IE when you are building a building, how does it know, based on mouse 
position, what part of the map to put that building on?
The first thing that comes to mind is to give each square it's own unique id 
and use the picking ability of GL, but for a large map like 100x100, that's 
10,000 id's which seems like an aweful lot.

The second thing that comes to mind is somehow using the view matrix but no 
idea how you would get from point A to point B on that one.

Anybody know how they do it?


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: