Hi folks,
I have a question. How can you calculate the framerate?
i need the function that get the current time.
this way i can save it loop through the game 1 frame. compare the new time with the old time. see how much time has passed in 1 frame with that i can calculate the steps of my enemies and there speed.
what function do i need to get the time?
greets Ghoti
Framerate how?
Framerate how?
My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Woops, I swore I replied to this the other day...
There is a cdReadClock call that will return the current time, however it is an EXTREMELY expensive call and should be avoided.
Setting up a timer is probably the most accurate and one of the fastest (performancewise) ways to go..
For an example, I think quake_ps2 uses timers to track the time, but I haven't looked so I could be wrong and I dunno if it's a good example or not.
Counting vblanks is an easy way to setup, but you have to worry about what TV standard is being used.
There is a cdReadClock call that will return the current time, however it is an EXTREMELY expensive call and should be avoided.
Setting up a timer is probably the most accurate and one of the fastest (performancewise) ways to go..
For an example, I think quake_ps2 uses timers to track the time, but I haven't looked so I could be wrong and I dunno if it's a good example or not.
Counting vblanks is an easy way to setup, but you have to worry about what TV standard is being used.
Shoot Pixels Not People!
Makeshift Development
Makeshift Development
Ohw sorry sorry i posted this in the wrong forum is has to be in the PSP software section.
sorry
sorry
My PSP games:
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Um... wow. The answer would be entirely different then :P
Shoot Pixels Not People!
Makeshift Development
Makeshift Development