• Advertisement

Archived

This topic is now archived and is closed to further replies.

animating sprites

This topic is 5528 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

For a 2d tile based rpg...how many individual versions of a single sprite, each featuring a subtle movement that would be part of the wealking animation, do you need for smooth animation...would you simply need 3?, standing still, right leg forward, left leg forward?...or would you need standing still, right leg a tiny bit forward, then a bit more, then a bit more etc. Anyone know how i should do this? The frame rate is 60fps. -Dave ca_priest@yahoo.com

Share this post


Link to post
Share on other sites
Advertisement
12fps is the absolute minimum for smooth animation. 25fps is the NTSC standard, while high-quality animation today is generally displayed at 60fps. Based on the frame rate you plan to run your game at, figure out how long a motion takes/should take and animate appropriately (a 2-second movement at 25fps requires 50 frames, etc).

Share this post


Link to post
Share on other sites
This is not quite the case when it comes to tile based rpgs. Take as an example ff3 or secret of mana, both lauded upon release for their beautiful graphics (and they are still excellent examples for 2d artistry). The characters there generally had 4 or 5 frames of walking animations.

Take a look at this tutorial, http://tsugumo.swoo.net/tutorial/chapter8.htm, for a very good discussion of this. In general the whole series is very good, the entire series is found here http://tsugumo.swoo.net/tutorial/.

Edit: bad, bad spelling

[edited by - premandrake on December 2, 2002 6:50:57 PM]

Share this post


Link to post
Share on other sites
It also depends on how much content you plan to incorporate. If you plan to have like 50 character sprites, I wouldn''t suggest doing 12 different frames for walking. That''s a lot of work put in front of you. 50 x 12 different frames to be technical. I would suggest you do three: left leg, standing, right leg. That puts you at only 150 different frames to be drawn.

- Rob Loach
OverTech Technologies
-----------
"Life moves pretty fast. If you don''t stop and look around once in awhile, you could miss it."
- Ferris Bueller

Share this post


Link to post
Share on other sites
So lets say i have 3 versions of each sprite, for each direction they''re moving in, and the game is running at 60fps, would the animation still appear to be at least somewhat smooth? I suppose if i do that, there would be about a 1/15th of a second period between each individual movement. This makes me wonder why i would bother programming the game loop to run at 60fps. Wouldnt i get the same results running the loop at 15fps??? Maybe im wrong here i dont know...anyone have any advice? If i had lets say 12 diffrent sprites as opposed to 4, would the animation appear significantly smoother...we arent against the idea of the extra work involved, but unless it''s going to be worth it, why waste the time? Also the game features alot of walking npc''s, which of course makes that much more artwork to do.

Share this post


Link to post
Share on other sites
The frames per second doesn''t really affect how the sprite animation looks because you will only have lets say 3 different frames of the sprite. The FPS will however affect how smooth your sprite moves on the field (horizontally, vertically, etc).

The more frames (pictures) you have for your sprite animations, the smoother it would look. But don''t get stuck drawing up 12 different frames for each action of each character (too much work). Keep it simple until you are DONE your game, then worry about graphics.

The animation speed in your game all depends on how you want it to look. Make constants in your game to affect animation and fps speed. Try some values, change them, etc, until it looks how YOU want it.


Good luck ,

- Rob Loach
OverTech Technologies
-----------
"Life moves pretty fast. If you don''t stop and look around once in awhile, you could miss it."
- Ferris Bueller

Share this post


Link to post
Share on other sites
quote:
Original post by Premandrake
This is not quite the case when it comes to tile based rpgs. Take as an example ff3 or secret of mana, both lauded upon release for their beautiful graphics (and they are still excellent examples for 2d artistry). The characters there generally had 4 or 5 frames of walking animations.

Take a look at this tutorial, http://tsugumo.swoo.net/tutorial/chapter8.htm, for a very good discussion of this. In general the whole series is very good, the entire series is found here http://tsugumo.swoo.net/tutorial/.

Edit: bad, bad spelling

[edited by - premandrake on December 2, 2002 6:50:57 PM]

Actually, those games used 3 frames per direction; a total of 12 frames per sprite

Frankly, it depends what you plan to do. If you have huge sprites, you might need a bit more than just 3 frames. With smaller sprites (if memory serves well, FF6 had 16x24 sprites, for instance; FF4 had 16x16) 12 frames total should be plenty. The level of detail is sufficiently small that any extra frames wouldn''t really be noticed anyhow.

Good luck! It''s great to see someone keeping the oldschool 2D RPG spirit alive!

Share this post


Link to post
Share on other sites
In response to the above reply...if 16x16 characters move smoothly with only 3 changed sprites per direction, would i need more for 32x32 or could i still get by with just the 3?
I guess i''ll try Rob''s suggestion and go for 3 per direction and see how it works, and if it doesn''t look right go back and throw in some more sprites to smooth the animation out...unless of course someone can give me a definite magical number.




The oldschool rpg''s will NEVER die.

Share this post


Link to post
Share on other sites
The fact that the game runs at 12fps doesn''t mean you need 12 different frames for a 1-second movement. If the images are reasonably small or you don''t need such a high level of detail, you can often repeat frames (using a frame indexing system, you''d have a sequence like { 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1 } for a full 1-second cycle of motion where the numbers refer to which animation cells to display per frame). Using a frame indexing system also allows you to mix and match sequences of animations created with different levels of detail.

Share this post


Link to post
Share on other sites
OR, you could just use a timer, and in each sprite store the time left until the next frame of animation, so all animations would be time based, so if you only have 3 frames of animation, and the game runs 5000 fps, the animation would still look the same.
To answer your question, I''d say for 32*32 sprites, 3 frames per direction is enough, but you could add a few frames since you have more room in a 32*32 sprite. Its down to you/your artist to descide.

Share this post


Link to post
Share on other sites
So basically if i do it the way you describe above...my game loop cycles as fast as the machine will allow, and the sprite will change after a certain amount of time, determined by the that specific sprite, not the game loop? This is how im thinking you would do that ( correct me if im wrong )...Instead of setting a constant time for the loop, let the loop run as fast as possible, and time each cycle...keep summing up the time it takes the cycles until it hits a pre-determined value within the sprites structure, then update the sprite to the next in the animation sequence, and start the timing over again. This seems like a very efficent way to control animation, and it looks like this would make sure that the animation runs the same speed on other computer. Thanks for the info.

Share this post


Link to post
Share on other sites

  • Advertisement