Jump to content
  • Advertisement
Sign in to follow this  
bssandeshbs

Arkanoid Game/Break out -Timer Function-OPENGL

This topic is 3496 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
You can use the GetTickCount function to get the time elapsed in miliseconds. Remember to put #include <windows.h> 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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!