Capped frame limit for no reason *sigh*

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
zorg
Party member
Posts: 2936
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Capped frame limit for no reason *sigh*

Post by zorg » Mon Oct 20, 2014 4:47 pm

just a fyi; love.timer.sleep() is imprecise at best so that could be a reason if you are calculating the sleep times like that; but this is just a guess.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
pacman
Citizen
Posts: 81
Joined: Thu Mar 14, 2013 4:10 pm

Re: Capped frame limit for no reason *sigh*

Post by pacman » Mon Oct 20, 2014 5:01 pm

It worked like a charm for weeks and it works on other OS and for other people :?
Also after commenting these lines I get same fps cap with random it_works_too_fast spikes.

User avatar
arampl
Party member
Posts: 248
Joined: Mon Oct 20, 2014 3:26 pm

Re: Capped frame limit for no reason *sigh*

Post by arampl » Mon Oct 20, 2014 9:03 pm

Well, I copied standard function love.run() from Wiki page and commented out line "if love.timer then love.timer.sleep(0.001) end" at the end.
And now it shows 125 FPS (Windows 7 64-bit and Xubuntu 13.10 64-bit)

Though I don't understand what is the purpose of this line...

caldur
Prole
Posts: 20
Joined: Tue Mar 13, 2012 3:30 pm

Re: Capped frame limit for no reason *sigh*

Post by caldur » Tue Oct 21, 2014 12:35 am

arampl wrote:Well, I copied standard function love.run() from Wiki page and commented out line "if love.timer then love.timer.sleep(0.001) end" at the end.
And now it shows 125 FPS (Windows 7 64-bit and Xubuntu 13.10 64-bit)

Though I don't understand what is the purpose of this line...
Tried and didn't work on my box... and I actually would be surprised if it did :?

And seriously, I can understand the need for a higher update rate (in cases like fighting games, more frequent input polling makes sense), but the fps beyond 60 is not that useful; in terms of eliminating temporal aliasing or screen shuttering, using interpolation would be a better approach (and more efficient if taking things like power consumption into consideration)

User avatar
zorg
Party member
Posts: 2936
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Capped frame limit for no reason *sigh*

Post by zorg » Tue Oct 21, 2014 3:30 am

arampl wrote:Well, I copied standard function love.run() from Wiki page and commented out line "if love.timer then love.timer.sleep(0.001) end" at the end. (...) Though I don't understand what is the purpose of this line...
Run your project, then open the equivalent of a task manager on your OS; you will probably see one of your CPU cores being consumed 100%... that is unless vsync is enabled, i think.
caldur wrote: And seriously, I can understand the need for a higher update rate (in cases like fighting games, more frequent input polling makes sense), but the fps beyond 60 is not that useful; in terms of eliminating temporal aliasing or screen shuttering, using interpolation would be a better approach (and more efficient if taking things like power consumption into consideration)
I actually solved this problem for myself with a custom game loop / love.run function, but i needed to bork some things in the process; namely love.timer.getDelta and getAverageDelta. (or i could have just borked getFPS though; but either one or the other)
*In the pastebin'd file, i commented out love.timer.sleep for experimental purposes; it works both ways though, and there are some vars that are pulled in from other files as well, so this isn't an out-of-the-box working snippet :3
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

caldur
Prole
Posts: 20
Joined: Tue Mar 13, 2012 3:30 pm

Re: Capped frame limit for no reason *sigh*

Post by caldur » Tue Oct 21, 2014 4:05 am

zorg wrote: I actually solved this problem for myself with a custom game loop / love.run function, but i needed to bork some things in the process; namely love.timer.getDelta and getAverageDelta. (or i could have just borked getFPS though; but either one or the other)
*In the pastebin'd file, i commented out love.timer.sleep for experimental purposes; it works both ways though, and there are some vars that are pulled in from other files as well, so this isn't an out-of-the-box working snippet :3
Yep, that's basically what I do in my projects, too. The thing about timestep is, there is the constant issue of decoupling it from rendering vs. making things look smooth, and also maintaining fixed timestep vs. catering to low perf machines... and above all better keep it simple and straightforward.

That sleep for 1ms is just to prevent rendering from going crazy without limits I assume...

User avatar
zorg
Party member
Posts: 2936
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Capped frame limit for no reason *sigh*

Post by zorg » Tue Oct 21, 2014 4:40 am

It's more like for the process to not hog your processor as i've said; and if i remember correctly, if you do have vsync on in your conf.lua, then you shouldn't sleep it; otherwise you should, but then it gets a bit wonky.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
arampl
Party member
Posts: 248
Joined: Mon Oct 20, 2014 3:26 pm

Re: Capped frame limit for no reason *sigh*

Post by arampl » Tue Oct 21, 2014 5:19 am

caldur, zorg may be you right guys, but why it behaves differently on different platforms? On Windows it gives no more than 100 FPS, on Linux - 125 FPS.

User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: Capped frame limit for no reason *sigh*

Post by Zilarrezko » Tue Oct 21, 2014 5:32 am

Don't know if it was mentioned before. But when I had windows 7, I had pretty good frames. I then upgraded to windows 8.1 and now I notice all my frames for every game ever is lower (I thought windows 8 was suppose to optimize my 8 cores for performance D';). But yeah, I get 64 frames as well. Something weird with windows 8.

User avatar
pacman
Citizen
Posts: 81
Joined: Thu Mar 14, 2013 4:10 pm

Re: Capped frame limit for no reason *sigh*

Post by pacman » Tue Oct 21, 2014 5:35 am

Zilarrezko wrote:Something weird with windows 8.
There's nothing weird about windows being weird :roll:

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests