[gameprogrammer] Re: 3d overhead view rts games

El lun, 25-10-2004 a las 03:00, Alan Wolfe escribió:
> 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?
Well, thats the question of the million dollars.
Dont pay much attention to what I say, but I wouldnt use a grid for
that, I would just go for pure coordinates and make some check to see if
the match the area of some  building or unit. Which of course, requires
solution to the question "how to convert clicks to 3d coordinates?"
Forget about GL picking, the queue could be too small for your needs and
depends on the implementation of GL you are using.

-- 
Roger Durañona Vargas
Linux user #180787
A cada momento nos rodea lo desconocido. Es alli
donde uno tiene que buscar el conocimiento.
Paul Muad'Dib Atreides. Children of Dune



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


Other related posts: