Performance issues

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
napolux
Prole
Posts: 8
Joined: Wed Dec 02, 2015 7:37 pm

Performance issues

Post by napolux »

I'm in the process of creating a tetris clone (YAY!). I'm now at a point where I can move pieces around, but I begin to see performance issues with points where I reach the low 4/5 FPS and of course this can't be acceptable.

I'm pretty new to Löve, but I was wondering if I'm doing something wrong or not.
You can find the whole code here: https://github.com/napolux/tile4up

But the main stuff is here: https://github.com/napolux/tile4up/blob ... s/game.lua

I don't know if I'm organizing my code well or I am missing something... Any idea?
rxi
Prole
Posts: 47
Joined: Sun Mar 02, 2014 10:22 pm

Re: Performance issues

Post by rxi »

This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
https://love2d.org/wiki/love.graphics.newImage
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests