help with some game logics
Hi, I have done this function draw_random_tank() in OpenGL, this function generate random numbers and place the objects on my landscape based on the random numbers generated. My question is this, because I have some keyboard function which will call glutPostRedisplay(), every time I press the key, it invokes the glutPostRedisplay(), therefore my draw_random_tank gets called, and their position changes every time a key event is pressed. How can I fix this? thanks(sorry, this is quite a long post).