OK, Thanks for the input. I will try something out. In future I will use 15 fps for my animations in combination with 64 ms delay. This is enough for the type of adventure I make.
PS: But in this case the "pause" value is very confusing for the user. It will give the impression that one could adjust the speed in the millisecond range.
local old = timer
timer = os.time() -- or use: os.clock()
if old ~= 0 then
local duration = timer - old
summe = summe + duration
counter = counter + 1
print(duration, summe / counter) -- current and average duration
end
1
2
3
4
5
6
7
8
To get the display lenght p of one frame, I have to calculate p = t * 1000 / n = 41.6666 ms. Or the easier way to calculate this is p = 1000 / fps = 41.6666 ms.
If I import the single frames to Visionaire and use 40 ms for the pause value, then the animation ist to slow. It runs more than 15 seconds. How I calulate the correct pause value? What means "pause" in Visionaire?