It's called time based movement. It allows your game to move things at a set distance per second, no matter how fast or slow the computer running it is. (within reason)
Paste this at the end of your program somewhere.
` Time based movement
function tm_Update()
Diff# = hitimer() - Flast#
Flast# = hitimer()
Ideal# = 0.06 ` 60.0 / 1000.0 or 60 Frames per second
factor# = Diff# * Ideal#
if Diff# >= 1000.0 then factor# = 1
endfunction
and add
global factor# as float
global Flast# as float
to your variable declarations section.
Inside your main loop add,
tm_Update()
Now when you go to move something, multiply the amount you're moving it by the factor#
move object PlayerObj, 10 * factor#
NOTE: If you don't have IanM's Matrix1Utils installed you can use timer() instead of hitimer() in the function.
Hope that helps.