While doing a few searches found people asking/complaining about object animations being too slow/fast on computers depending on the framerate. Didn't find any solution already posted and I figured out the fix a while ago should have posted it back then but anyway here it is
` Place this anywhere outside of the main loop as it only needs to be set once
AnimSpeedFPS#=40.0 : rem Set this to at what framerate the object plays at normal speed (this has nothing to do with sync rate!)
AnimSpeed#=100.0 : rem This is the default animation speed at the above FPS value
` Ok what you should do is place TimeA=timer() just after Do (before sync) and TimeB=timer() just after Loop (after sync)
` its also a good idea to place TimeA=timer():TimeB=timer() right before your main loop otherwise for the first frame of the loop the object might play at insane speeds and look stupid
` and finally place this code after sync and TimeB=timer() but before the loop
if TimeB-TimeA<>0 then AnimSpeed=1000/(TimeB-TimeA) else AnimSpeed=AnimSpeed#
set object speed 1,AnimSpeed#*(AnimSpeedFPS#/AnimSpeed)
That should do it, your object animations should be played at the same speed per second rather than per loop. It does however take a little while to take effect (about 0.1-0.4 seconds). But you won't notice it unless your getting fps fluctuation of +/-30 per seconds in which case its not the animation you should be trying to fix
Here's a little tester program using the above code just press keys 1-6 and 0 to try different framerates
sync on:sync rate 150
load object "[OBJECT NAME]",1:loop object 1
AnimSpeedFPS#=40.0
AnimSpeed#=100.0
do
TimeA=timer()
yrotate object 1,wrapvalue(object angle y(1)+mousemovex())
text 0,0,"FPS:"+str$(screen fps())
if inkey$()="1" then sync rate 4
if inkey$()="2" then sync rate 13
if inkey$()="3" then sync rate 30
if inkey$()="4" then sync rate 48
if inkey$()="5" then sync rate 88
if inkey$()="6" then sync rate 150
if inkey$()="0" then sync rate 0
sync
TimeB=timer()
if TimeB-TimeA<>0 then AnimSpeed=1000/(TimeB-TimeA) else AnimSpeed=AnimSpeed#
set object speed 1,AnimSpeed#*(AnimSpeedFPS#/AnimSpeed)
loop
Note: This works for both DBP and DB