Okay, so I'm making a platformer, and I wanna know how I can make a arc'd jump easily. Like what Mario does in super Mario Bros 1. Any ideas on a simple way to accomplish this?


2 Answers 2


Interesting question; having taken Physics classes, I take this sort of thing for granted, when really it is an intriguing idea.

The key point is that X and Y movements are distinct from each other. An object in motion will sustain its X motion, and its Y motion will be affected by gravity at a rate which you set.

You should track the sprite's X and Y velocities. When standing still, the sprite has an X velocity of 0; when moving, it has a constant velocity. When touching the ground, the sprite has a Y velocity of 0. When the jump button is pressed, give the sprite a Y velocity.

Now every frame, reduce the Y velocity by some amount; this is your gravity magnitude. But if the sprite is touching ground, set the Y velocity to 0 so that the sprite doesn't move into the ground. And then modify the sprite's position by (velocity*time).

Here is a decent-looking Physics lesson which demonstrates these separated velocity components: http://www.physicsclassroom.com/class/vectors/u3l2c.cfm

If this was not the answer you're looking for, and you actually mean something more complicated by an "arc'd jumping method", then please elaborate!

  • 1
    \$\begingroup\$ You should add a note that the Y-component (and X too for that matter, but that's not really interesting for the question) of the velocity could be negative (being downward motion on the Y axis), and adding a negative value to the position will make it move downward. This doesn't feel obvious from the way you put it. +1 \$\endgroup\$
    – falstro
    Nov 18, 2010 at 8:18
  • \$\begingroup\$ The Y-component in Super Mario 1 also depended on how long you held down the jump button; releasing the button would immediately set y velocity to 0 even if Mario had some previous upward momentum. Also, falling tends to have a max negative-Y velocity (you can think of this as "terminal velocity") for gameplay reasons. Lastly, there are a LOT of ways to handle the X-component -- Mega Man sets X as constant -1, 0 or +1 based on joystick position, Mario modifies progressively like gravity, Castlevania doesn't allow direction changes in mid-air at all. \$\endgroup\$ Nov 19, 2010 at 19:00

ExciteMike has some great examinations of the Super Meat Boy and Super Mario 3 jump physics on his blog.


You must log in to answer this question.