[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

opengl question




i am trying to program a simple game using opengl/glut under linux, and i 
have a few questions...

the idea is to make a good version of the mediocre warhammer 40k games 
that have been produced.  i am thinking of something that has myth-like 
graphics, but turn based.

i am using an nxn array corresponding to a level map (where each entry is 
a height value) where i could potentially sub-sample the height map to 
get a terrain of triangles (or a bez-mesh if i'm feeling masochistic)...

so my question is this.  if i wanted to tell a particular "troop" on the 
level map to go to another position on the level map, how do i correspond 
the mouse click to a position on the potentially translated and rotated 
level map?  i know there is this concept of selection in opengl, is this 
the way to go?  is this fast enough not to be too cumbersome?  or should 
i do the level map in a completely other way to accomidate for this type 
of play better (i.e., don't use an nxn array level map, but something 
different)?

if i do use an nxn level map, and i choose not to use the opengl 
selection features, does anyone know of a good way to find the 
corresponding position of the mouse click on the level map that doesn't 
take order n time?

thank you,
abram connelly