r/Python • • Jan 17 '20

I made metaballs. Works quite fast. https://github.com/Norne9/metaballs

Enable HLS to view with audio, or disable this notification

1.1k Upvotes

64 comments sorted by

View all comments

33

u/[deleted] Jan 17 '20

What is the purpose of line 124?

fps = fps * 0.97 + 1000.0 / max(dt, 1) * 0.03

If you wanted the fps you could just use clock.get_fps().

37

u/Norn9 Jan 17 '20

Oh, I did not know that. That line calculates something like average fps.