Jump to content
  • Advertisement
Sign in to follow this  
HexDump

Sprite Walk + Shoot animation question

This topic is 2569 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,

This days I'm developing a new game where I need the player to be able to walk and shoot at the same time.

How do people do this? I have been studying metal slug where the player is able to do what I explained and they doesn't seem to have 2 different animations for walk and walk and shoot. They have just walk and shoot when stand still. I have been thinking that they could be just rendering torso from the shooting (when stand still) animation and legs from the walk animation but it seems a bit complicated for just that. Could anybody give any tip, experience, etc... on this?

P.D. By the way I'm using cuads for the sprite rendering. I just tell because of the problems with artefacts that can arise if using 2 different cuads to render the different parts of the sprite (torso and legs.)

THanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
If you're doing this in 2D, you have two options:

1) Compose the player of multiple sprites, and layer them.... have a single "legs walking" animation, and several "Torso aiming" overlays, maybe one for every 22.5 degrees. Your art will need to make good use of transparency to combine these layers in a convincing way... otherwise you can get a "hinged" look. Robots will be easier to animate this way than than humans, but a good artist can make it work.

2) Use a single sprite for the player, but build an array of "walk while aiming" animations, and select between them by converting the aiming angle to an array index. If the feet keep the same timing in all your animations, you should be able to switch from "frame x" of "walk while aiming left" to "frame x" of "walk while aiming up" smoothly. This will probably be more work for an animator, but easier for the coder.


Have fun,
-sox

Share this post


Link to post
Share on other sites
Hi!,

Well, more or less what you explained (1st option) was the implementation I decided and it works ok. Just wanted to know if anyone was using any magic with this :). The difference is that I just have an anim for walking and another for shooting stand still. Then I compose the final character setting the needed uvs for top and bottom part that are held by different curds.

Thanks in advance.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!