Advertisement

Jumping animations

Started by August 25, 2011 03:52 PM
2 comments, last by Firestryke31 13 years, 3 months ago
I am working on a 2d platformer game, but I am having a lot of trouble drawing character sprites. One big issue I have right now is that I have no idea how to do the jumping animation.

The problem is that while jumping, you normally bend your legs down and then release before leaving the ground. However, in a game, you expect to jump immediately, so a delay while the animation is shown is not desirable. It also makes coding more complicated because you have to keep track of the jumping state instead of just immediately setting the y velocity.

So what do you do? How have other retro platformers solved this problem?
I trust exceptions about as far as I can throw them.
Off hand I actually can't think of a game that did this correctly (in that you crouch first). I have seen games do this humorously incorrectly though (i.e. do the crouch animation while floating upward).

I think it's acceptable for most games to just immediately start moving upward. In Super Mario Bros., Mario does that. There's no animation for crouching or anything. In fact, if I recall correctly, there's just a single "in the air" animation frame that starts as soon as you hit the button until Mario lands on the ground again. Pretty sure it's that way all the way through Mario World, and although I haven't paid attention, I imagine it's a similar deal even with new games like Mario Galaxy where he immediately starts floating up without any preparation.
Success requires no explanation. Failure allows none.
Advertisement
Just make the legs go up immediately, no crouching. Usually it does the trick.
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
What about this: Crouch when the user presses the jump button, then jump when they release it? This could also be made so that the longer you hold the button down, the higher you jump (to a limit, of course).

This topic is closed to new replies.

Advertisement