I have created some large chains of tweens (15 chains, 56 tweens) and then spent a long time producing a sound effect that synched with the chains.
It plays beautifully, with each movement perfectly in sync with the sound effects
until I tried it on a different machine. Then the tweens played at a different rate and it threw the sound effects way off!
I knocked up this test:
SetWindowSize(800, 450, 0)
SetVirtualResolution( 800, 450 )
spr = CreateSprite(0)
SetSpritePositionByOffset(spr, 400, 225)
SetSpriteSize(spr, 10, 10)
tween = CreateTweenSprite(5)
SetTweenSpriteSizeX(spr, 10, 300, TweenLinear())
SetTweenSpriteSizeY(spr, 10, 300, TweenLinear())
PlayTweenSprite(tween, spr, 0)
t# = timer()
do
//for k = 0 to 10000000
//next k
UpdateTweenSprite(tween, spr, GetFrameTime())
if GetTweenSpriteExists(spr)
if GetTweenSpritePlaying(tween, spr)
print("Playing...")
else
time# = timer()-t#
DeleteTween(tween)
endif
else
print("Total Play Time: "+str(time#))
endif
sync()
loop
That should take the tween 5 seconds to execute. It actually always takes a different time to execute but it's only off by a few hundredths of a second. I can live with that.
However, if you uncomment the FOR...NEXT loop that simulates a heavy CPU load (and therefore slower framerate), what you would expect to see is a much jerkier tween but it should still take 5 seconds to run.
Unfortunately, it takes around 8.5 seconds to run.
That's a crude test but it accurately demonstrates the issue that I have.
I'd really appreciate a fix so that I don't have to throw away the lovely sound effect that I created.
AGK V2 user - Tier 1 (mostly)