Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Muffinwoman

How to make timedelay?

This topic is 5573 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

Hi! I hope somebody can help me understand how to make timedelays (with duration about 1-3 sec.), so as to get a figure to evolve in time. btw. I use MS Visual C++ in combination with GLUT / OpenGL... thanx!But I don't mean movement. Just kind of a figure getting bigger while you watch... like one kube exist and after 3 sec you see one more...and so on... will the same do? And how do you get frametime? [edited by - Muffinwoman on March 18, 2003 11:47:03 AM] [edited by - Muffinwoman on March 18, 2003 12:25:48 PM] [edited by - Muffinwoman on March 18, 2003 12:27:31 PM] [edited by - Muffinwoman on March 18, 2003 12:33:36 PM]

Share this post


Link to post
Share on other sites
Advertisement
im guessing you have some kind of timing fuction for movement.
Just add a variable with the value 3 and then subtract with the frametime value and while the var is above 0 then freeze the frame.

Share this post


Link to post
Share on other sites
use GetTickCount it checks the time from the system clock i think then you just check it every loop through the program and when it gets to 3000??? (i think its in mili secounds) from the original time update.

Share this post


Link to post
Share on other sites
Sleep() is prolly what you're looking for.
[EDIT:] Except you wouldn't be able to "watch the figure getting bigger". You'd have to use GetTickCount() or timeGetTime() for that. You might also wanna look into the SetTimer function.

[edited by - AdmiralBinary on March 18, 2003 11:52:30 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!