And fade them out:
screen(800,500,0,".scr")
--togglefullscreen()
mousehide()
setframetimer(60)
w = screenwidth()
h = screenheight()
x_ = w/2
y_ = h/2
function random(min,max)
return int((max-min+1)*rnd()+min)
end
angle = 0 -- needed for rainbow color --obo
channel = 0 -- needed for rainbow color --obo
RAD = (math.pi / 180) -- needed for rainbow color -- obo
-- RAINBOW COLOR -- OBO
getColour = function(angle, channel)
local cos = math.cos(angle * RAD) * 255 -- lower 255 for darker colors
local sin = math.sin(angle * RAD) * 255 -- lower 255 for darker colors
if channel == 0 then colour(cos, sin, 0)
elseif channel == 1 then colour(0, cos, sin)
elseif channel == 2 then colour(sin, 0, cos)
end
end
--------------------------------------------------------------------------------
speed = 1
amount = 10
myRotation = {}
xchange = {}
ychange = {}
x= {}
y= {}
for i = 1,amount do
x[i] = x_
y[i] = y_
xchange[i] = 0
ychange[i] = 0
myRotation[i] = int(rnd()*360)
end
function update()
local i
for i = 1,amount do
myRotation[i] = myRotation[i] + int(rnd()*30-15)
ychange[i] = (cos((math.pi/180)*myRotation[i]))*speed
xchange[i] = (sin((math.pi/180)*myRotation[i]))*speed
if x[i] < 0 then x[i] = 0 end
if x[i] > w then x[i] = w end
if y[i] < 0 then y[i] = 0 end
if y[i] > h then y[i] = h end
y[i] = y[i] - ychange[i]
x[i] = x[i] + xchange[i]
fillcircle(x[i],y[i],3)
end
end
repeat k=getkey()
color(0,0,0) alphachannel(1) fillbox(0,0,w,h)
-- color update --obo
if angle == 90 then
angle = 0
if channel ~= 2 then channel = channel + 1
else channel = 0
end
end
getColour(angle, channel)
angle = angle + 1
-- end color update -- obo
alphachannel(255)
update()
sync()
until k==27 closewindow()