🔒 Locked
Why need Timer?
Advertisement
Original Post
I like to have "frames per second" information to see how various optimizations or algorithyms speed up or slow down my code. I grab timing info every frame that is drawn, then do some nifty averaging to smooth out the information.
There are a whole bunch of articles here on GameDev, like:
http://www.gamedev.net/reference/articles/article753.asp
There are a whole bunch of articles here on GameDev, like:
http://www.gamedev.net/reference/articles/article753.asp
You must know that timer is used not only for counting FPS. It will be able to do you rendering independent from frame rate. I just want to say: refer you rendering not to frame rate but to system timer. Look through the Microsoft's samples from DX SDK.
I'm from Ukraine - I don't know english well, sorry. And what means your 'what?'
Quote:
Original post by Anonymous Poster Quote:
Original post by matvievski
You must know that timer is used not only for counting FPS. It will be able to do you rendering independent from frame rate. I just want to say: refer you rendering not to frame rate but to system timer. Look through the Microsoft's samples from DX SDK.
What?
I think what matvievski is trying to say is that one can make frame-rate independent motion (etc.) by using a timer.
The function of timer is very simple. On faster computer the framerate is higher than on slower one. Try imagine a 3D person in 3D game. On slower computer it will move too slow but on fast computer it will move too fast. If you use timer, person will move exactly so fast on every computer.
Answer: You should use timer on any place where you need to have program exactly so fast on every computer.
Answer: You should use timer on any place where you need to have program exactly so fast on every computer.
Risko's pretty right.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement