Sign in to follow this  

How to tween between 2d Animations. And should I even bother?

This topic is 3591 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm writing a 2D sprite based game, and I've come across the following sticking point. When I blend between running and shooting-while-running animations, how should I go about doing that? ie. My running animation is 10 frames long and loops. My shooting animation is 5 frames long. therefore, if the user tries shooting while running: the following can occur: he can press the shoot button, while he's in the middle of [running frame 1]. he can press the shoot button, while he's in the middle of [running frame 2]. he can press the shoot button, while he's in the middle of [running frame 3]. etc... so therefore, I would need a different set of shooting animations for every single running frame. This seems like a LOT of work for the sprite drawer. Does anyone know how a commercial game (ie. Metal Slug) does it? Thanks a lot -CuppoJava

Share this post


Link to post
Share on other sites
I have thought about splitting the sprite into multiple parts.
But I concluded that it's too messy to work out.

If the sprite's pose can be distinctly split into two parts, then yes it's possible. But as the poses's get more complex (ie. shooting-while-backflipping, or shooting-while-falling), then it's just not possible.

EDIT: Unless, wow... this is really how other games do it. I haven't really given it serious thought as it seems like a nightmare to code...

Share this post


Link to post
Share on other sites
Yes, this is how other games do it. You want to split your character sprites into top and bottom halves, and carefully design your animations for synchronization. You'll want to design them relative to a "hotspot," so that you can trivially move the whole thing in gameplay code simply by manipulating the hotspot.

Share this post


Link to post
Share on other sites

This topic is 3591 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this