How can I improve my Animation

Posted by sharethis on Game Development See other posts from Game Development or by sharethis
Published on 2012-12-15T11:31:25Z Indexed on 2012/12/16 11:28 UTC
Read the original article Hit count: 273

Filed under:
|
|

The first approaches in animation for my game relied mostly on sine and cosine functions with the time as parameter.

Here is an example of a very basic jump I implemented.

if(jumping)
{
    height = sin(time);
    if(height < 0) jumping = false; // player landed
    player.position.z = height;
}

if(keydown(SPACE) && !jumping)
{
    jumping = true;
    time = now(); // store the starting time
}

So my player jumped in a perfect sine function. That seems quite natural, because he slows down when he reached the top position, and in the fall he speeds up again. But patching every animation out of sine and cosine is stretched to its limits soon.

So can I improve my animation and provide a more abstract layer?

© Game Development or respective owner

Related posts about animation

Related posts about jumping

  • Smooth vector based jump

    as seen on Game Development - Search for 'Game Development'
    I started working on Wolfire's mathematics tutorials. I got the jumping working well using a step by step system, where you press a button and the cube moves to the next point on the jumping curve. Then I tried making the jumping happen during a set time period e.g the jump starts and lands within… >>> More

  • How can I improve my Animation

    as seen on Game Development - Search for 'Game Development'
    The first approaches in animation for my game relied mostly on sine and cosine functions with the time as parameter. Here is an example of a very basic jump I implemented. if(jumping) { height = sin(time); if(height < 0) jumping = false; // player landed player.position.z = height; } if(keydown(SPACE)… >>> More

  • Impulsioned jumping

    as seen on Game Development - Search for 'Game Development'
    There's one thing that has been puzzling me, and that is how to implement a 'faux-impulsed' jump in a platformer. If you don't know what I'm talking about, then think of the jumps of Mario, Kirby, and Quote from Cave Story. What do they have in common? Well, the height of your jump is determined by… >>> More

  • 3D Studio Max biped restrictions?

    as seen on Game Development - Search for 'Game Development'
    I have a stock biped character in 3D studio max which has a jump animation. The problem I have with the jump animation is that there is actual y offset happening inside it which makes it awkward to play while the character is jumping since it's not only jumping in the game world but the jump animation… >>> More

  • Jump handling and gravity

    as seen on Game Development - Search for 'Game Development'
    I'm new to game development and am looking for some help on improving my jump handling for a simple side scrolling game I've made. I would like to make the jump last longer if the key is held down for the full length of the jump, otherwise if the key is tapped, make the jump not as long. Currently… >>> More