Page 2 of 4
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 8:28 am
by slime
vsync is on by default in LÖVE. When I turned vsync off in your game, I got ~560fps without the background, and ~550fps with the background.
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 8:39 am
by baby_nux
tentus wrote:
That code is fine, though I have to ask, why 1 * 0.9? Why not just 0.9?
i was change to 0.9 but not show diference.
crow wrote:I am confused in what your doing as I get 62 with and without background
i just do a little test for see what wrong with code.
there is not wrong from code, but why my result is so much slow with background. this is make no sense isn't it?
if the problem is from hardware why without background is 110 FPS.
slime wrote:vsync is on by default in LÖVE. When I turned vsync off in your game, I got ~560fps without the background, and ~550fps with the background.
i new in love
how to change vsync?
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 8:57 am
by kikito
The code runs at 60 fps in all cases on my sytem.
I've had a look at the code and could not find anything obviously bad.
Are your graphic drivers up to date?
Small things:
- As others have said, 1*0.9 is often times the same as 0.9; -1*0.9 is -0.9
- Booleans are better than 1's and 0's for conditions.
Instead of this:
Code: Select all
on_back=1
...
if on_back==1 then
...
function love.keypressed(k)
if k == "b" then
if on_back==1 then
on_back=0
else
on_back=1
end
end
end
You could have this:
Code: Select all
on_black = true
...
if on_black then
...
function love.keypressed(k)
if k == "b" then
on_back= not on_black
end
end
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 9:13 am
by baby_nux
kikito wrote:The code runs at 60 fps in all cases on my sytem.
I've had a look at the code and could not find anything obviously bad.
Are your graphic drivers up to date?
hmm.. i'm use openchrome driver for my via chrome VGA.
they say via chrome has lot of problem with driver in linux,
but why if i used sdl framework run smoothly with my vga driver.
is there any issues bug or problem if love2D with via chrome driver?
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 9:21 am
by bartbes
But love doesn't use SDL for drawing, it uses OpenGL.
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 10:40 am
by Robin
baby_nux wrote:i new in love
how to change vsync?
In
conf.lua:
Code: Select all
function love.conf(t)
t.vsync = false
end
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 11:29 am
by baby_nux
problem solved!!!
since via chrome driver at ubuntu has problem about driver compatibility then i do some tweak on driver.
the problem is from opengl driver, its doesn't work well. ( thx to bartbes for remain me )
so i download "via_chrome9_dri.so" from official site and replace the old one.
and then, love2D work perfectly.
test result:
165 FPS with background
423 FPS without background
but why so much deference, I am soo confuse
..
anyway, but more better now
maybe i do not need FPS trick anymore LOL...
thx all
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 11:41 am
by crow
I just test this on my laptop I getting 65 on both also strange my laptop is older and is using a crap gfx and 1.7 amd dual core where my
pc gets 61 and thats a core 2 duo 2.4 with a 512 Radian HD 4450 hmm why are my Frame Rate so low ?
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 6:13 pm
by tentus
crow wrote:I just test this on my laptop I getting 65 on both also strange my laptop is older and is using a crap gfx and 1.7 amd dual core where my
pc gets 61 and thats a core 2 duo 2.4 with a 512 Radian HD 4450 hmm why are my Frame Rate so low ?
Ok, first off, use punctuation, you are very difficult to understand most of the time, since you ignore commas and periods.
Now that I've got that off my chest, it's probably a video card cap: many systems will refuse to go much above 60 fps, to avoid overheating. My Asus M51 does that, which is kinda irritating but makes sense (makes it much harder to optimize code
).
Re: there has any tricks to improve FPS for old PC?
Posted: Mon Mar 07, 2011 7:01 pm
by TechnoCat
tentus wrote:Now that I've got that off my chest, it's probably a video card cap: many systems will refuse to go much above 60 fps, to avoid overheating. My Asus M51 does that, which is kinda irritating but makes sense (makes it much harder to optimize code
).
Argh, and my system refuses to do vsync. So everyone who decides to not use dt and assume max FPS makes a game I can't play.