M
m11ad
Guest
Hi! I was watching the tutorials for a 2d platformer. All of them were teaching simple jump animation with one or two static frames. one static frame for ascending and one for falling.
It seems the tutorials areteaching 8-bit era jumping. I have no idea how to implement a 16-bit era jump. I've seen smoother jump animation in sega mega drive than these static tutorials.
I know how to script a jump with two states (rise and fall) or maybe three in pseudocode:
if (player_is_grounded &and jump_button) {
image_speed = 0;
if (vertical_speed > 0) then index = fall;
if (verical_speed < 0) then index = rise;
if (-1 < vertical_speed < 1 ) then index = peak; //or something like this
But what about a jump animation with more than two static frames?like a 12 frame jump? or a jump with a peak state / land state / take-off state / the state between these states. how do you handle that animation?
For example take a look at this sprite. there is 14 frames just for falling.
another example:
If you know how to handle the animation or have seen a tutorial for it, please recommend it!
It seems the tutorials areteaching 8-bit era jumping. I have no idea how to implement a 16-bit era jump. I've seen smoother jump animation in sega mega drive than these static tutorials.
I know how to script a jump with two states (rise and fall) or maybe three in pseudocode:
if (player_is_grounded &and jump_button) {
image_speed = 0;
if (vertical_speed > 0) then index = fall;
if (verical_speed < 0) then index = rise;
if (-1 < vertical_speed < 1 ) then index = peak; //or something like this
But what about a jump animation with more than two static frames?like a 12 frame jump? or a jump with a peak state / land state / take-off state / the state between these states. how do you handle that animation?
For example take a look at this sprite. there is 14 frames just for falling.
another example:
If you know how to handle the animation or have seen a tutorial for it, please recommend it!
Attachments
-
177.9 KB Views: 5