Page 5 of 5

Re: Rebound (another pong)

Posted: Thu Aug 11, 2011 12:23 pm
by Rad3k
Ghuntar, my answer to your question is yes. At least I think that way. On each frame it does the processing and all the stuff that the default love.run does, but then it checks how much time it took and therefore how much time it has until the next frame. And then it just waits this amount of time. That way, unless the processing takes more time than is reserved for a single frame, the game should run with constant framerate, requiring only as much cpu cycles as it really needs. Don't be afraid to change the default love.run, it won't break your game. The function I supplied isn't perfect though, as e.g. it doesn't check if the love.timer module is loaded before using it. But I think I can safely assume that every game that cares about framerate does use timer. I think I'm going to start a separate topic about it, so stay tuned.

Re: Rebound (another pong)

Posted: Thu Aug 09, 2012 4:56 pm
by Santos
Now compatible with LÖVE 0.8.0!