
maintaining desired framerate?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
maintaining desired framerate?
How do you maintain a constant framerate? im using the timers lib for a couple of simple timers but the framerate keep fluctuating visibly atleast, i tried adding timer.sleep(10) and it didnt really do much 

http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: maintaining desired framerate?
There is not much you can do about that. Other processes use your CPU as well, and their use differs. You can't count on the framerate to be constant. If you want your game to be independent of framerate (which you most certainly will), you can use dt, as you probably know.
Help us help you: attach a .love.
Re: maintaining desired framerate?
Really, just optimize your code as much as you can. You can never be too optimized.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: maintaining desired framerate?
Mr Knuth does not agree.zugamifk wrote:You can never be too optimized.

Help us help you: attach a .love.
Re: maintaining desired framerate?
Adding love.timer.sleep(10) somewhere should help, though. Did you add it somewhere in the call chain of update()?
- Jasoco
- Inner party member
- Posts: 3728
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: maintaining desired framerate?
I do though. I've sped up my game a bit by taking a step back and looking at what can be fixed up to make it squeeze out a few more FPS.Robin wrote:Mr Knuth does not agree.zugamifk wrote:You can never be too optimized.
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 3 guests