forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Framerate independence?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Leo28C



Joined: 18 Jan 2007
Posts: 19

PostPosted: Thu Feb 08, 2007 10:28 am    Post subject: Framerate independence? Reply with quote

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
View user's profile Send private message MSN Messenger
Altair



Joined: 20 May 2006
Posts: 76
Location: The Netherlands

PostPosted: Fri Feb 09, 2007 8:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group