Glut/OpenGL and a small battle ship game....problem :(

Oats

Newcomer
I have to make a small battleship 2d/3d game for school. We are using opengl and GLUT. The problem I am having, well one of the problems I am having ( :) ), I was thinking of using an endless loop for the main game function. Basicly, user interacts, some changes are made to state variables, the loop picks them up and reacts accordingly. Now Glut already uses an endless loop which is required, at least I thnik it is, for anything to dislay. So I am kinda of fucked, since I can't start 2 endless loop in main, since they never return, can't start the second.

What can I do? Was going with an endless loop in the first place a bad idea? Could I "pack" all the game code in idle func? Or do I have code everything in the display and call back funcs?
 
If you want fastest frame rate, it is better to put everything inside the idle function.
 
alternatively, put your game loop in a separate threat.

-darkblu

ps: why does the software forum allow for guest posts?
 
Back
Top