FPS issue with simple box2D game
Posted: Wed Oct 19, 2016 3:56 am
Hey guys!
I just started working with love today but I have been struggling with this little FPS issue for a few hours. I know there are a lot of threads about FPS problems on this forum, but I couldn't find a solution after trying many of them. When I run the game, it is smooth as butter for about 10 seconds. After that, it will start to lag. It will not lag outrageously but it is definitely noticeable.
I draw the FPS on the screen of the game and it stays at 60 throughout since I limit it in love.update(). I also checked the cpu usage in Task Manager; it uses 2% of my cpu and about 34 MB of ram. I also checked garbage collection. I put the line collectgarbage("stop") in love.load() and it did not fix the issue.
I will attach my .love file to this post. It is not too complicated. If any of you have any guidance or ideas, please don't hesitate to let me know!
controls
a -> counterclockwise rotation
d -> clockwise rotation
Thanks,
Aaron
I just started working with love today but I have been struggling with this little FPS issue for a few hours. I know there are a lot of threads about FPS problems on this forum, but I couldn't find a solution after trying many of them. When I run the game, it is smooth as butter for about 10 seconds. After that, it will start to lag. It will not lag outrageously but it is definitely noticeable.
I draw the FPS on the screen of the game and it stays at 60 throughout since I limit it in love.update(). I also checked the cpu usage in Task Manager; it uses 2% of my cpu and about 34 MB of ram. I also checked garbage collection. I put the line collectgarbage("stop") in love.load() and it did not fix the issue.
I will attach my .love file to this post. It is not too complicated. If any of you have any guidance or ideas, please don't hesitate to let me know!
controls
a -> counterclockwise rotation
d -> clockwise rotation
Thanks,
Aaron