title: Delta time in game development
body: <p>So im making a flappy bird clone, just to learn opengl. I've got a problem with delta time, value that im multiplying with delta time behaves differently depending on FPS.
  This is the delta time code:</p>
  <pre><code>float lastTick = 0.0f;
  float deltaTime = 0.0f;
  
  inline void calculateDeltaTime(double time)
  {
      deltaTime = (float)time - lastTick;
      lastTick = (float)time;
  }
  </code></pre>
  <p>And this is how i call it in my game loop:</p>
  <pre><code>calculateDeltaTime(glfwGetTime());
  </code></pre>
  <p>I've tested it, when vsync is enabled i get the value around 0.0167 @ 60fps, which is right.</p>
  <p>Over time i want my player to fall down, and this is how i implemented it, in the game loop.</p>
  <pre><code>fall += 0.3f * deltaTime;
  m_Sprite-&gt;setPosition(math::vec3(m_Sprite-&gt;getPosition().x, m_Sprite-&gt;getPosition().y - fall, 0));
  </code></pre>
  <p>The player fall speed isnt the same when the fps is increased, at 60 it works great, when i disable vsync, at around 1500fps player instantly falls down, seems like the delta value isnt calculated properly, what am i doing wrong?</p>