Looks quite nice, though has the tendency to be a bit murky. Might want to slow it down if it's distracting from the foreground or something. Change the colour by fiddling with the constants.
global cProg_SW = 1440
global cProg_SH = 900
#constant cDot_W 340 ` box width
#constant cDot_TAILMULT 240.0 ` tail length
#constant cDot_DRAWCOLOR_R (255.0 / (cProg_SW * 1.0)) * gDot(lDotID).x ` formula for r colour
#constant cDot_DRAWCOLOR_G (255.0 / (cProg_SH * 1.0)) * gDot(lDotID).y ` formula for g colour
#constant cDot_DRAWCOLOR_B gDot(lDotID).mode * 85 ` formula for b colour
#constant cDot_DRAWCOLOR_RCLAMPMIN 0 ` colour r minimum value
#constant cDot_DRAWCOLOR_RCLAMPMAX 255 ` colour r maximum value
#constant cDot_DRAWCOLOR_GCLAMPMIN 0 ` colour g minimum value
#constant cDot_DRAWCOLOR_GCLAMPMAX 255 ` colour g maximum value
#constant cDot_DRAWCOLOR_BCLAMPMIN 0 ` colour b minimum value
#constant cDot_DRAWCOLOR_BCLAMPMAX 255 ` colour b maximum value
global gDot_End = 260 // total dots
set display mode cProg_SW, cProg_SH, 32`, 1
sync on
sync rate 60
type tDot
x as float
y as float
xv as float
yv as float
mode as integer
endtype
dim gDot(gDot_End) as tDot
for n = 0 to gDot_End
fDot_SetNew(n)
if gDot(n).mode < 2 then gDot(n).x = rnd(cProg_SW) else gDot(n).y = rnd(cProg_SH)
next n
do
for n = 0 to gDot_End
fDot_Handle(n)
fDot_Draw(n)
next n
print screen fps()
sync
cls rgb(clamp(127 + (cos(timer()/10.0) * 127), cDot_DRAWCOLOR_RCLAMPMIN, cDot_DRAWCOLOR_RCLAMPMAX), clamp(127 + (cos(timer()/11.0) * 127), cDot_DRAWCOLOR_GCLAMPMIN, cDot_DRAWCOLOR_GCLAMPMAX), clamp(127 + (cos(timer()/12.0) * 127), cDot_DRAWCOLOR_BCLAMPMIN, cDot_DRAWCOLOR_BCLAMPMAX))
loop
function fDot_SetNew(lDotID as integer)
gDot(lDotID).mode = rnd(3)
if gDot(lDotID).mode < 2
gDot(lDotID).x = cProg_SW * gDot(lDotID).mode
gDot(lDotID).y = rnd(cProg_SH - cDot_W)
gDot(lDotID).xv = ((300.0 + (rnd(1600) * 1.0)) * 1.0) / 160.0
gDot(lDotID).yv = 0
else
gDot(lDotID).x = rnd(cProg_SW - cDot_W)
gDot(lDotID).y = cProg_SH * (gDot(lDotID).mode - 2)
gDot(lDotID).xv = 0
gDot(lDotID).yv = ((300.0 + (rnd(1600) * 1.0)) * 1.0) / 160.0
endif
endfunction
function fDot_Handle(lDotID as integer)
inc gDot(lDotID).x, ((((gDot(lDotID).mode = 0) - (gDot(lDotID).mode = 1)) * 1.0) * gDot(lDotID).xv)
inc gDot(lDotID).y, ((((gDot(lDotID).mode = 2) - (gDot(lDotID).mode = 3)) * 1.0) * gDot(lDotID).yv)
if (gDot(lDotID).x >= -(gDot(lDotID).xv * cDot_TAILMULT) and gDot(lDotID).x <= cProg_SW + (gDot(lDotID).xv * cDot_TAILMULT) and gDot(lDotID).y >= -(gDot(lDotID).yv * cDot_TAILMULT) and gDot(lDotID).y <= cProg_SH + (gDot(lDotID).yv * cDot_TAILMULT)) = 0 then fDot_SetNew(lDotID)
endfunction
function fDot_Draw(lDotID as integer)
lDotColorHead = rgb(clamp(cDot_DRAWCOLOR_R, cDot_DRAWCOLOR_RCLAMPMIN, cDot_DRAWCOLOR_RCLAMPMAX), clamp(cDot_DRAWCOLOR_G, cDot_DRAWCOLOR_GCLAMPMIN, cDot_DRAWCOLOR_GCLAMPMAX), clamp(cDot_DRAWCOLOR_B, cDot_DRAWCOLOR_BCLAMPMIN, cDot_DRAWCOLOR_BCLAMPMAX))
lDotColorTail = set alpha(rgb(clamp(cDot_DRAWCOLOR_R, cDot_DRAWCOLOR_RCLAMPMIN, cDot_DRAWCOLOR_RCLAMPMAX), clamp(cDot_DRAWCOLOR_G, cDot_DRAWCOLOR_GCLAMPMIN, cDot_DRAWCOLOR_GCLAMPMAX), clamp(cDot_DRAWCOLOR_B, cDot_DRAWCOLOR_BCLAMPMIN, cDot_DRAWCOLOR_BCLAMPMAX)), 0)
lDotTailX = gDot(lDotID).x - ((gDot(lDotID).xv * cDot_TAILMULT) * ((gDot(lDotID).mode = 0) - (gDot(lDotID).mode = 1)))
lDotTailY = gDot(lDotID).y - ((gDot(lDotID).yv * cDot_TAILMULT) * ((gDot(lDotID).mode = 2) - (gDot(lDotID).mode = 3)))
if gDot(lDotID).mode < 2
box lDotTailX, lDotTailY, gDot(lDotID).x - (gDot(lDotID).mode > 1), gDot(lDotID).y + cDot_W, lDotColorTail, lDotColourTail, lDotColorHead, lDotColorHead
else
box lDotTailX, lDotTailY, gDot(lDotID).x + cDot_W, gDot(lDotID).y + (gDot(lDotID).mode < 2), lDotColorHead, lDotColourTail, lDotColorHead, lDotColourTail
endif
endfunction