// set window properties SetWindowTitle( "2D_getdistance" ) SetWindowSize( 1024, 768, 0 ) SetVirtualResolution( 1024, 768 ) Spr1 = CreateSprite(0) Spr2 = CreateSprite(0) : SetSpriteColor(spr2,255,0,0,255) SetSpritePosition(spr1,random(0,1024),random(0,768)) SetSpritePosition(spr2,random(0,1024),random(0,768)) do Print(ScreenFPS() ) Print(GetSpriteDistance(Spr1, Spr2 )) Sync() loop