Skip to content

Instantly share code, notes, and snippets.

@reidrac
Created January 22, 2016 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reidrac/5aa87c5082f9a55667d6 to your computer and use it in GitHub Desktop.
Save reidrac/5aa87c5082f9a55667d6 to your computer and use it in GitHub Desktop.
FPS = 1.0/60
UFPS = 1.0/80
dt = 0
....
def update(last_dt):
if paused:
return
dt += last_dt
while dt >= UFPS:
entities_update(UFPS)
dt -= UFPS
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment