# Building 2D Assets for a Game Targeting Multiple Framerates

To make a real-world example, lets assume I want to build an animated sprite for an explosion. The duration of the animation should last ~1 second, and we'll say exactly one second to make the math a bit more simple. And lets assume I'm using XNA and my goal is to target both XBox (60fps), PC (60fps), and Windows Phone 7 (30fps).

My question is this, how should I build the sprite animations so that my programming is as simple as possible without simply using a timer to calculate which frame I should be on (which I feel would make the animation "choppy")?

• What's wrong with using a timer? – user744 Jan 19 '11 at 21:07
• Why do you think a timer would make it choppy? – user744 Jan 19 '11 at 21:08
• On the lower framerate, if I'm skipping frames to keep up, it will be choppy... maybe it will still be acceptable? – Nate Jan 19 '11 at 21:15
• You have two basic options, animate by frame or animate by time. If you animate by frame it will run twice as long. If you animate by time it will skip half the frames. Choppiness in this case is largely the result of bad animation (no blur, no squash+stretch, no ease-in/out); 30fps is more than smooth enough for sprites in motion. – user744 Jan 19 '11 at 21:25
• Of course it's going to be more choppy on the phone. There are less frames! It's acceptable for graphics to be more choppy on a phone, it's not a crazy powered behemoth or anything. – Michael Coleman Jan 19 '11 at 21:29

# Figure out how long the animation's been going