Page 1 of 1

Natural jumping

PostPosted: Tue Feb 21, 2006 4:03 pm
by Troodon
I know that I can jump using y = -30; or yvelocity = -30; and I know that I can make jumps more believable with variables, but how can I make natural jumping. I mean that now when I jump the actor first fly little up and then the draw actor-event throws it back to terrain. I have tried to do cool jumps with timers and multiple variables but...
How can I make soft and smooth jumps like in many platform games for example sonic, supermario etc?

PostPosted: Tue Feb 21, 2006 6:25 pm
by makslane
Add gravity in the Draw Actor event:

yvelocity += .8;

PostPosted: Wed Feb 22, 2006 10:55 am
by Troodon
You mean like this?
Code: Select all
yvelocity = rand(40)+2;
yvelocity += .8;

It makes the actor jumps more naturally. Thank you!