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.
Show differencesHistory of post edits
#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.
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.
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.