sync on : sync rate 60
set text opaque
print "This test will draw 10000 dots first using the Dot"
print "command then the Box command. Press any key to start."
sync : wait key
rem --- the dot method
cls
t = timer()
for i = 1 to 10000
x = rnd(639)
y = rnd(479)
dot x,y
next i
resultA = timer() - t
print "10000 Dots drawn in ";resultA;" milliseconds."
print "Press any key."
sync : wait key
rem --- the box method
cls
t = timer()
for i = 1 to 10000
x = rnd(639)
y = rnd(479)
box x,y,x+1,y+1
next i
resultB = timer() - t
print "10000 Boxes drawn in ";resultB;" milliseconds."
print "Box method is ";(resultA / resultB);" times faster!!"
print "Press any key to exit."
sync : wait key
end
For me, the Box method is about 25+ times faster.
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.