Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

#Actualserumas

Posted 04 October 2012 - 01:44 PM

In Spirou example you chop time at 33.333 ms, but your update goes not exactly at this time , intervals can be
28 36 33 34 29 38 ... but average will be = 33.333 ms and usualy there is no need to pass parameter to update function Update( 33333ULL ) if its your own engine;
To render smoothly you need calc interpolation variable alpha=0.0..1.0 to know how far you are to next update.
So engine gives alpha, renderer draws according to this alpha.

#2serumas

Posted 04 October 2012 - 01:35 PM

In Spirou example you chop time at 33.333 ms, but your update goes not exactly at this time , intervals can be
28 36 33 34 29 38 ... but average will be = 33.333 ms
To render smoothly you need calc interpolation variable alpha=0.0..1.0 to know how far you are to next update.
So engine gives alpha, renderer draws according to this alpha.

#1serumas

Posted 04 October 2012 - 01:34 PM

In Spirou example you chop time at 33.333 ms, but your update goes not exactly at this time , intervals can be
28 36 33 34 29 38 ... but average will be = 33.333 ms
To render smoothly you need calc interpolation variable alpha=0.0..1.0 to know how far you are to next update.
So engine gives alpha, renderer draws according this alpha.

PARTNERS