Original Post
I'm working on a Platformer game. I got 'Walking' to work but am having trouble getting my character to jump.
Here is how it is now :

This is all I could come up with for jumping :
And obviously, its nor working.
Does anyone know how I can make a character jump while simulating gravity (ie. it decelerates towards the down after a while). I want to do this own my own without using any Physics Engine.
Thanks.
Here is how it is now :

This is all I could come up with for jumping :
//Jump
for (int i = 0; position.Y == 288; i++)
{
if (keyboardState.IsKeyDown(Keys.Up))
position.Y -= 10;
if (i == 90)
{
position.Y += 10;
i = 0;
}
}
And obviously, its nor working.
Does anyone know how I can make a character jump while simulating gravity (ie. it decelerates towards the down after a while). I want to do this own my own without using any Physics Engine.
Thanks.