title: Player movement calculation for dynamic FPS (frame per second)
body: <p>If a game is running at 177FPS or 22FPS, how is the player movements calculated? I'm trying to do this in Javascript:</p>
  
  <pre><code>setInterval(update, 0);
  
  function update() {
       player_x++;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/pVZOO.jpg" alt="preview of problem"></p>
  
  <p>Problem is if the player will be move faster/slower according to the frame rate. How would I solve this?</p>