开发者

2D Animation Format: Allow acceleration of animation

开发者 https://www.devze.com 2023-02-17 17:53 出处:网络
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

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:

  1. The one you propose (if you're actually using a slow-down method for frame switching)
  2. You could speed up the frame rate for the entire game engine (if the render engine is the controller)
  3. 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...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号