Jump to content

  • Log In with Google      Sign In   
  • Create Account

Smooth animations and synchronization


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Centum   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 March 2000 - 07:01 AM

I''ve got a problem about smoothing animations and movements of objects. I use DirectX. If I''ve got the FPS how can I use it to smooth everything if FPS changes many times in a second?

Sponsor:

#2 joeG   Members   -  Reputation: 172

Like
Likes
Like

Posted 07 March 2000 - 07:45 AM

In my former game engine that I scrapped, I had it where every object could have a set of animations. These animations were a list of translation waypoints as well as rotation values. Both these values were for a given number of seconds. So, say I wanted to move a box forward (in the Z direction) for 10 seconds, and after 10 seconds start to move it backwards for 10 seconds. What that would look like in my .script file would be:

animation 1
translate 0,0,10 in 10 seconds
rotate 0,0,0 in 10 seconds
translate 0,0,-10 in 10 seconds
rotate 0,0,0 in 10 seconds

That being said, at the start of each new "move" (separate part of the animation sequence) I would get the FPS, check how many seconds I wanted this move to complete in (10 in the above example), and then calculate how many frames of animation that would be. Then once I knew how many frames I would be rendering for this move I would calculate dx,dy, and dz based on the information. Albeit, that was only linear interpolation, it worked well, especially for that being my first game project.

JoeG




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS