> 
> **Possible Duplicate:**  
> 
> [How can I implement gravity?](https://gamedev.stackexchange.com/questions/15708/how-can-i-implement-gravity) 
> 
> 
> 

I want to make the jumping that my character does more realistic. This is what I've tried so far but it doesn't seem very realistic when the player jumps. I want it to jump up at a certain speed then slow down as it gets to the top then eventually stopping (for about one frame) and then slowly going back down but going faster and faster as it goes back down. I've been trying to make the speed at which the player jumps up slow down by one each frame then become negative and go down faster... but it doesn't work very well

```
    public bool isPlayerDown = true;
    public bool maxJumpLimit = false;
    public bool gravityReality = false;
    public bool leftWall = false;
    public bool rightWall = false;

    public float x = 76f;
    public float y = 405f;

      if (Keyboard.GetState().IsKeyDown(up) && this.isPlayerDown == true && this.y <= 405f)
        {
            this.isPlayerDown = false;
        }

        if (this.isPlayerDown == false && this.maxJumpLimit == false)
        {
            this.y = this.y - 6;
        }

        if (this.y <= 200)
        {
            this.maxJumpLimit = true;
        }

        if (this.isPlayerDown == true)
        {
            this.y = 405f;
            this.isPlayerDown = true;
            this.maxJumpLimit = false;
        }

        if (this.gravityReality == true)
        {
            this.y = this.y + 2f;
            this.gravityReality = false;
        }

        if (this.maxJumpLimit == true)
        {
            this.y = this.y + 2f;
            this.gravityReality = true;
        }

        if (this.y > 405f)
        {
            this.isPlayerDown = true;
        }

```