Created
August 10, 2025 08:43
-
-
Save Achie72/7f41277cd3b223a627708e7506a5d7f2 to your computer and use it in GitHub Desktop.
Accumulator trick for fix fps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function love.update(dt) | |
| accumulator = accumulator+dt | |
| if joystick then | |
| handle_joystick(joystick) | |
| end | |
| if accumulator >= tickPeriod then | |
| -- do update stuff | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment