title: Simulating gravity/jump in game - issue
body: <p>I'm using a game engine to make my own 3D game in python. I need to simulate a jump and/or gravity, but I'm running into an issue : either the calcul is immediate and my character isn't moving, like, there's no animation, instant blink, or either (if for exemple I had a bigger number in my for loop) it takes wayyyy more time, really slow, it lags and everything, struggling to calculate the jump. I got both extremes, and none works, so I'd like to find a way to make my jump. All I have at my disposition to do this is :</p>
  <pre class="lang-py prettyprint-override"><code>player.y +=
  #can be -=, =, +=, etc.
  </code></pre>
  <p>So, do you got any ideas of ways to do this ? I'm not really asking a specific problem, I'd just like to gather some ideas ! And there's even no need to give predone examples, just throw your ideas, like : use this, try with this formula, this function, etc.</p>
  <p>Adding some details : what I already tried.</p>
  <p>Here is the main solution I tried, pretty basic :</p>
  <pre class="lang-py prettyprint-override"><code>velocity = 3
  def input(key):
      global velocity
      if key == &quot;space&quot;:
          for i in range(7):
              print(velocity)
              player.y += velocity
              velocity -= 1
          velocity = 3
  </code></pre>
  <p>Which is pretty cool, as you had to your height 3, then 2, then 1 (deceleration as your energy lowers), then you add -1, -2, -3 (acceleration due to gravity), and go back to your starting point. Perfect ! But, as said, instantly done. So if I try this :</p>
  <pre class="lang-py prettyprint-override"><code>velocity = 3
  def input(key):
      global velocity
      if key == &quot;space&quot;:
          for i in range(61):
              print(velocity)
              player.y += velocity
              velocity -= 0.1
          velocity = 3
  </code></pre>
  <p>Again, instantly done. And if I try higher and higher intervals, at some point I just get it to lag, no in-between where it's done correctly</p>