| View previous topic :: View next topic |
| Author |
Message |
Leo28C
Joined: 18 Jan 2007 Posts: 19
|
Posted: Thu Feb 08, 2007 10:28 am Post subject: Framerate independence? |
|
|
Hello everyone! :-D
I remember, when coding in SDL for PC, the game would run at different speeds on various computers... There was a little routine to limit the number of frames rendered so it would run at a constant speed on any PC, but I forgot what that was! :-(
I'm not sure if this is needed at all on PSP, but I'd still like to have it... Anyone know how to? Thanks! ;-) |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Fri Feb 09, 2007 8:28 am Post subject: |
|
|
I guess you could do something like this:
Instead of:
| Code: | screen.waitVblankStart()
screen.flip() |
You could use a timer (normally the PSP runs at 100Hz I believe? Anyway with screen.waitVblankStart() it refreshes every 1/60th second -> 60 Hz):
| Code: | if timer > whatever you want then
screen.flip() |
I hope I got what you meant? |
|
| Back to top |
|
 |
|