Skip to main content
gamedev.net
🔒 Locked

Arkanoid Game/Break out -Timer Function-OPENGL

Started by bssandeshbs 1 reply 1.4k views
Original Post
bssandeshbs
bssandeshbs
I have designed a Arkanoid game like project.. All i want is to implement a Timer Function in the games..Can any one tell how to include the code also where should i include that The language is OPENGL and it is implemented on Visual C++ [Edited by - bssandeshbs on May 16, 2009 11:27:38 AM]
fcoelho
fcoelho
You can use the GetTickCount function to get the time elapsed in miliseconds. Remember to put #include in your code.
If you do this:
int time1 = GetTickCount();do_something();int time2 = GetTickCount();int diff = time2 - time1;

Then you get the time elapsed between the first and second calls to GetTickCount.
mmakrzem
mmakrzem
I prefer to use the performance timers (http://msdn.microsoft.com/en-us/library/ms632592(VS.85).aspx) in my code. I have a video on my website that shows you how to set them up and use them to count the # of FPS.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.