sprite animation system height recalculating has some issues

Posted by Nicolas Martel on Game Development See other posts from Game Development or by Nicolas Martel
Published on 2012-09-08T07:02:43Z Indexed on 2012/09/08 9:51 UTC
Read the original article Hit count: 281

Filed under:
|

Basically, the way it works is that it update the frame to show every let's say 24 ticks and every time the frame update, it recalculates the height and width of the new sprite to render so that my gravity logics and stuff works well. But the problem i am having now is a bit hard to explain in words only, therefore i will use this picture to assist me

The picture

So what i need basically is that if let's say i froze the sprite at the first frame, then unfreeze it and freeze it at the second frame, have the second frame's sprite (let's say it's a prone move) simply stand on the foothold without starting the gravity and when switching back, have the first sprite go back on the foothold like normal without being under the foothold.

I had 2 ideas on doing this but I'm not sure it's the most efficient ways to do it so i wanna hear your inputs.

© Game Development or respective owner

Related posts about java

Related posts about collision-detection