Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

You may benefit from looking at my answer to another question on this site: Sprite Animation Best Practicesmy answer to another question on this site: Sprite Animation Best Practices. In that answer I link to a working animation system written in JavaScript.

In short, there is probably an easy way to solve this. Create an object that represents an Animation. This is usually just an ordered list of frames and durations.

Create a separate object to store the playback information, in other words, how "far" into an animation you have played. I recommend using a time-based animation scheme. This way, you can play an animation by advancing time and you should not run into problems with double speed.

You may benefit from looking at my answer to another question on this site: Sprite Animation Best Practices. In that answer I link to a working animation system written in JavaScript.

In short, there is probably an easy way to solve this. Create an object that represents an Animation. This is usually just an ordered list of frames and durations.

Create a separate object to store the playback information, in other words, how "far" into an animation you have played. I recommend using a time-based animation scheme. This way, you can play an animation by advancing time and you should not run into problems with double speed.

You may benefit from looking at my answer to another question on this site: Sprite Animation Best Practices. In that answer I link to a working animation system written in JavaScript.

In short, there is probably an easy way to solve this. Create an object that represents an Animation. This is usually just an ordered list of frames and durations.

Create a separate object to store the playback information, in other words, how "far" into an animation you have played. I recommend using a time-based animation scheme. This way, you can play an animation by advancing time and you should not run into problems with double speed.

Source Link
Zack The Human
  • 1.3k
  • 1
  • 11
  • 17

You may benefit from looking at my answer to another question on this site: Sprite Animation Best Practices. In that answer I link to a working animation system written in JavaScript.

In short, there is probably an easy way to solve this. Create an object that represents an Animation. This is usually just an ordered list of frames and durations.

Create a separate object to store the playback information, in other words, how "far" into an animation you have played. I recommend using a time-based animation scheme. This way, you can play an animation by advancing time and you should not run into problems with double speed.