Is there an effective way to cut down lag?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Is there an effective way to cut down lag?
And your graphics card? love.graphics.getRendererInfo
Me and my stuff True 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.
- icekiller8002
- Prole
- Posts: 49
- Joined: Mon Jun 06, 2016 9:28 pm
- Location: United States
Re: Is there an effective way to cut down lag?
I am drawing all images at one time, not quads. I will try quads first and let you know how it goes.
Code: Select all
function love.draw()
love.graphics.print("obey")
end
- icekiller8002
- Prole
- Posts: 49
- Joined: Mon Jun 06, 2016 9:28 pm
- Location: United States
Re: Is there an effective way to cut down lag?
Zorg, the image below contains my graphics card info
Yintercept, I tried quads for all images, but it still didn't help.
Yintercept, I tried quads for all images, but it still didn't help.
Code: Select all
function love.draw()
love.graphics.print("obey")
end
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Is there an effective way to cut down lag?
Alright, I'm downloading it now and gonna take a look into it. Can't promise anything but I'll get back to you sometime tonight.
Back in the saddle again.
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Is there an effective way to cut down lag?
Experiencing 40-50fps on an i3, with intel hd graphics old enough that it doesn't fully support opengl ES2, with 8gb ram, all running at 1366 by 768 (had to go in and do a little surgery to set resolution).
From what I can see your two biggest resource uses are something called [string 'boot.lua'] line 493, and a draw() call in main.lua on line 1740--but the boot.lua call is using ten times as much resources as the second one I mentioned.
Either too many string operations going on, you're doing something thats particularly taxing, or your system is badly in need of an upgrade
(and I'm one to talk seeing as my systems over 3 years old!)
I hope this helps point you in the right direction. Let us know how it goes.
From what I can see your two biggest resource uses are something called [string 'boot.lua'] line 493, and a draw() call in main.lua on line 1740--but the boot.lua call is using ten times as much resources as the second one I mentioned.
Either too many string operations going on, you're doing something thats particularly taxing, or your system is badly in need of an upgrade
(and I'm one to talk seeing as my systems over 3 years old!)
I hope this helps point you in the right direction. Let us know how it goes.
Back in the saddle again.
Re: Is there an effective way to cut down lag?
Drawing a quad has no advantage over drawing an image. However, drawing multiple quads in a single spritebatch has a big performance advantage, as the cost is comparable to that of drawing a single image, even when you have hundreds of quads in the batch.
That doesn't mean that that's the bottleneck, though.
With vsync disabled, I get >600 FPS at the default resolution, and about 210 FPS at 1280x1024. For me, disabling vsync makes the bullets run like crazy. I guess you're not using dt at every place where your game logic requires it. But that's a separate issue.
With this example program, I get ~320 FPS at 800x600 and ~123 FPS when maximized (approx. 1280x1024):
I get the same FPS in 0.10 and 11.0.
My guess is that your graphics hardware can't cope with drawing what you're drawing at that resolution at full speed.
That doesn't mean that that's the bottleneck, though.
With vsync disabled, I get >600 FPS at the default resolution, and about 210 FPS at 1280x1024. For me, disabling vsync makes the bullets run like crazy. I guess you're not using dt at every place where your game logic requires it. But that's a separate issue.
With this example program, I get ~320 FPS at 800x600 and ~123 FPS when maximized (approx. 1280x1024):
Code: Select all
love.window.setMode(800, 600, {vsync=false, resizable=true})
local MAX = love._version_major > 0 and 1 or 255
function love.draw()
love.graphics.clear()
love.graphics.setColor(0,0,MAX)
local w, h = love.graphics.getDimensions()
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.rectangle("fill", 0, 0, w, h)
love.graphics.setColor(MAX,MAX,MAX)
love.graphics.print(love.timer.getFPS())
end
function love.keypressed(k)
if k == "escape" then love.event.quit() end
if k == "f" then
love.window.maximize()
elseif k == "n" then
love.window.restore()
end
end
My guess is that your graphics hardware can't cope with drawing what you're drawing at that resolution at full speed.
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Is there an effective way to cut down lag?
You're the real VIP pgimeno
Back in the saddle again.
- icekiller8002
- Prole
- Posts: 49
- Joined: Mon Jun 06, 2016 9:28 pm
- Location: United States
Re: Is there an effective way to cut down lag?
The main thing I was worried about was that the lag would affect everyone, not just people with graphics cards like mine. Thank you all for helping. I’ll continue to play around with it.
Code: Select all
function love.draw()
love.graphics.print("obey")
end
- NotARaptor
- Citizen
- Posts: 59
- Joined: Thu Feb 22, 2018 3:15 pm
Re: Is there an effective way to cut down lag?
Is there a way to upvote comments here?
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Is there an effective way to cut down lag?
Thats what I was originally gonna ask. Apparently you're a mind reader NotARaptor.
Back in the saddle again.
Who is online
Users browsing this forum: Bing [Bot] and 4 guests