Quick snippet I came up with this morning before breakfast.
Rem Project: Dark Basic Pro Project
Rem Created: Wednesday, April 11, 2012
Rem ***** Main Source File *****
type V2D
x as integer
y as integer
endtype
_accuracy = 30 : `how many points make up the trail, more for smoother line
_update = 5 : `how often are the points in the trail updated in ms
dim points(_accuracy) as V2D
do
cls
rem update points in trail
if timestamp + _update < timer()
for i = 1 to _accuracy-1
points(i) = points(i+1)
next i
points(_accuracy).x = mousex()
points(_accuracy).y = mousey()
timestamp = timer()
endif
rem draw the trail
for i = 1 to _accuracy-1
t# = i/(_accuracy-1.0)
c = 255*t#
ink rgb(c, 0, 0), 0
line points(i).x, points(i).y, points(i+1).x, points(i+1).y
next i
loop
"You're not going crazy. You're going sane in a crazy world!" ~Tick