2D Animation Format: Allow acceleration of animation
I'm trying to think of a design for a 2D animation file format. I've decided to store the information in an XML file, the frames each on separate images, and it'll all be archived in with 7-Zip or something, but given a different extension as to give the impression I invented something from the ground up. :P
Given the intended structure of my animation files, how do you suggest I make the animation able to be accelerated if needed (a spell that makes time go faster/slower, etc)? Should I just have a FrameDuration开发者_Python百科 field in my XML and multiply or divide that by whatever amount I want to slow down or speed up time? Is there another way of doing this?
Depending on how many fps you're rendering, I think you have three options:
- The one you propose (if you're actually using a slow-down method for frame switching)
- You could speed up the frame rate for the entire game engine (if the render engine is the controller)
- Implement a frame-skip variable (which would accelerate an object without changing the frame rate of the rest of the game.
So, it all depends on how you're engine handles frame-switching. Personally, I prefer to have the render engine act as the controller, so I'd go with either #2 or #3...
精彩评论