Rebound (another pong)
Re: Rebound (another pong)
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)
Now compatible with LÖVE 0.8.0!
- Attachments
-
- Rebound-0.8.0.love
- (117.73 KiB) Downloaded 195 times
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests