title: In Pygame, normalizing game-speed across different fps values
body: <p>I'm messing around with Pygame, making some simple games just to learn it. However, I'm having a hard time implementing fps the way that I want.</p>
  
  <p>From what I understand, fps is generally set with:</p>
  
  <pre><code>import pygame
  ...
  clock = pygame.time.Clock()
  while True:
      clock.tick(60)
  </code></pre>
  
  <p>And then throughout the program, I make sure that every loop/frame is written to take 1/60th of a second, so I can, for example, make objects move at the speed I want them too. Increasing the tick to 120 fps will make the game run too fast, while decreasing it will make the game run too slow.</p>
  
  <p>However, this is not how I'm familiar with fps working for any other game. In most games, fps can vary as much as you want (usually based on how well the system is running the application), but the game will always run at the same speed (e.g. moving 100 pixels across the screen will take 1 second no matter how many frames happened in that second).</p>
  
  <p>The only way I can think of getting it to work the way I want is to grab the current fps every frame, and factor that into the calculations of every movement or time based event. But that seems needlessly complicated, and I'm wondering if I'm completely missing a part of pygame functionality that figures that out for me.</p>