quote: Original post by Wachar
OIC! It sets a maximum time the frames can pass. And, the while loop consists of the GetTickCount, and the main game loop. I didn''t know that the drawing was before the while loop. I didn''t think about that while starts from there. Not like a do..while. Thanks! I think I get it now! Ciao!
It sets the _minimum_ time a frame can take. The maximum is unbounded. This approach allows for any FPS under 30. 30 satisfies, as does 29, 28, etc.
The while loop does nothing but test it''s condition until it''s condition is true. This is equilvalent to waiting. The main game loop isn''t in the same while loop as the GetTickCount. The wait loop is a second loop called from inside the game loop.
I think you should take the advice Kwizatz gave you and back up to an introductory C book for a while. You''re trying to learn game logic, but you''re obviously still misunderstanding basic C syntax. You must crawl before you run.