TICKS
n = TICKS
Returns the number of milliseconds that have elapsed since start of the operating system.
Example 1:
ticks()
t = print t
Example 2: Game with constant frame rate
' ticks() can be used to let your game
' run with a constant frame rate
20
FramesPerSecond =
for xx = 1 to 200
ticks()
StartTime =
'Put your heavy computions here
cls
rect 10 + xx, 10, 50+xx, 50
showpage
'Delay the execution of the for-loop
ticks()
StopTime =
ElapsedTime = StopTime - StartTime
if(ElapsedTime < 1000 / FramesPerSecond)
delay(1000 / FramesPerSecond - ElapsedTime)
endif
next
Code samples using TICKS
2048.bas
2048.bas
3d rotating cube with message.bas
3d_torus.bas
3dtorus.bas
7gables.bas
analog clock.bas
anball 1.0.bas
Ball.bas
balls in 3d cube.bas
balls in 3d cube.bas
circ.bas
duty.bas
evdemo.bas
first factors mga.bas
fizzle2.bas
golpes_x_min2.bas
hangman v2.bas
hangman.bas
maps.bas
maze generator.bas
ping-pong.bas
pirate.bas
plasma2.bas
polyline.bas
primes.bas
scales132.bas
screen info.bas
sierpinski in space.bas