title: Basic gravity implementation in OpenGL
body: <p>I'm trying to implement jumping in my OpenGL game. My left and right 'velocity' and 'friction' is working well, but I'm not able to get my jump working in a nice arc. The player gets stuck in the air:</p>
  
  <pre><code>void keyboard() {
      //Move Left
      if (GetAsyncKeyState(keyA)) {
          playerVelX -= 3;
      }
      //Move Right
      if (GetAsyncKeyState(keyD)) {
          playerVelX += 3;
      }
      //Jump
      if (GetAsyncKeyState(keySpace)) {
          playerVelY += 3;
      }
  }
  
  void position() {
      //Move on x and y axis
      playerX += playerVelX;
      playerY += playerVelY;
  
      //Slow down respective axes
      playerVelX *= friction;
      playerVelY *= gravity;
  }
  
  while(gameRunning) {
      keyboard();
      position();
  }
  </code></pre>
  
  <p>I think I've been looking at it too long. Does anyone have experience implementing gravity like this? Thanks</p>