Could anyone help me figure out why this little beginning-of-a-game slows down cumulatively but erratically?
- To see the slowing down: try new game and then click the cross then tick with any side panel a few times. After about thirty seconds you'll see it slow to a crawl... then recover and resume at a decent pace for a bit??
- It also sometimes takes a few seconds to run the quit command, even bringing up the spinning coloured wheel (on a Macbook).
- I know it's a strange/silly game. It's for my little ones.
- I know it doesn't do much yet.
- You can turn off the annoying voice if you click the audio button top left.
(- If you're not hearing an annoying voice anyway, it will only be playing if you're connected to the Internet.)
As always, massively appreciative of the awesome & wise community here. Thanks!
EDIT: Solved it myself and learnt a bit on the way!
The offending problem was in the function drawbuttontext as I was creating new fonts every frame:
Code: Select all
local font = love.graphics.newFont("fonts/heading.ttf", height*0.6)
I can also force garbagecollect() to run in the update to keep things ultra smooth... good to know!