Low fps?

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.
Post Reply
User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Low fps?

Post by TurtleP »

Hi all,

I am working on updating an old game one of my group's beta testers and I made together. One of my current issues is that even with VSync on, I only get ~43FPS. I'd like to make that number a lot higher, say 60 FPS. This is after porting it over to Love 0.9.1. I am not sure if it's the game, video drivers, or what. Here is a .love of the current build:

https://dl.dropboxusercontent.com/u/976 ... 05-06.love
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Low fps?

Post by micha »

It runs smoothly on my computer. Which part is it, that is to slow? The main game?
foo0
Prole
Posts: 35
Joined: Sun Apr 27, 2014 10:25 am

Re: Low fps?

Post by foo0 »

You are reseting vsync setting to default in main.lua line 234:

Code: Select all

love.window.setMode(screen_width, screen_height)
changing it to this:

Code: Select all

love.window.setMode(screen_width, screen_height, { vsync = false })
makes fps go up

// and it works fine for me too, even with vsync on
Last edited by foo0 on Tue May 06, 2014 8:52 pm, edited 1 time in total.
User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: Low fps?

Post by TurtleP »

micha wrote:It runs smoothly on my computer. Which part is it, that is to slow? The main game?
When I do love.timer.getFPS() in love.update or print it on screen, it shows 43 as the FPS. Yeah, it also seems to be the main game that feels the slowest.
foo0
Prole
Posts: 35
Joined: Sun Apr 27, 2014 10:25 am

Re: Low fps?

Post by foo0 »

When phoenix's health bar reaches zero I got this:

Code: Select all

Error: classes/hpbar.lua:50: Can't set scissor with negative width and/or height.
stack traceback:
        [C]: in function 'setScissor'
        classes/hpbar.lua:50: in function 'draw'
        entities/spacephoenix.lua:174: in function 'draw'
        states/game.lua:188: in function <states/game.lua:153>
        main.lua:427: in function 'draw'
        [string "boot.lua"]:438: in function <[string "boot.lua"]:399>
        [C]: in function 'xpcall'
User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: Low fps?

Post by TurtleP »

foo0 wrote:When phoenix's health bar reaches zero I got this:

Code: Select all

Error: classes/hpbar.lua:50: Can't set scissor with negative width and/or height.
stack traceback:
        [C]: in function 'setScissor'
        classes/hpbar.lua:50: in function 'draw'
        entities/spacephoenix.lua:174: in function 'draw'
        states/game.lua:188: in function <states/game.lua:153>
        main.lua:427: in function 'draw'
        [string "boot.lua"]:438: in function <[string "boot.lua"]:399>
        [C]: in function 'xpcall'
This is not stable, and is not really intended for people to play. It's to help fix my low FPS issue. But thanks anyway for that. I somehow managed to forget to stop it from doing that.
User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: Low fps?

Post by TurtleP »

I figured out what was wrong: too many for loops during the game_update method. It's all fixed up and runs smooth as butter now :D. If anyone wants, I might set up this as a public beta and release things every now and then.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 217 guests