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

Started by
2 comments, last by Oluseyi 16 years, 2 months ago
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
Advertisement
Thought of splitting him in half?

Unless he's waving his arms or something while running
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...
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.

This topic is closed to new replies.

Advertisement