Järjestelmä : funktiot

FPS


   KUVAUS

Kertoo kuinka monta kertaa ruutu ehdittiin piirtää sekunnissa. Eli oikeastaan tämä kertoo pelin toimintanopeuden.

Palautettu luku on kokonaisluku.

   KÄYTTÖ
FPS ()

   ESIMERKKI
'Try this example with and without the line below
FrameLimit 30

one=1

Repeat

    'move the ball
    x=x+one
    If x<0 Or x>400 Then one= -one
    
    'draw the ball
    Color cbred
    Circle x-20,180,40

    Color cbwhite
    Text 0,0,FPS() 'print the current FPS
    
    DrawScreen

Until EscapeKey()

<<TAKAISIN