oh well, it didn't work here we go again:
sync on : sync rate 40
Dim Xpos#(300)
Dim Ypos#(300)
Dim Xvelocity#(300)
Dim Yvelocity#(300)
Dim Colour(300)
backdrop on
color backdrop 0
do
gosub inertia
gosub array
sync
loop
inertia:
if change < 290
for Fr = 1 to 5
change = change + 1
Xpos#(change+Fr)=320
Ypos#(change+Fr)=280
Xvelocity#(change+Fr)= (rnd(6)) - 3.5
Yvelocity#(change+Fr)= (rnd(7))+5
Colour(change) = rnd(100)
next change
else
change = 1
endif
return
array:
for refer = 1 to 300
Xpos#(refer) = Xpos#(refer) + Xvelocity#(refer)
Ypos#(refer) = Ypos#(refer) - Yvelocity#(refer)
Xvelocity#(refer) = Xvelocity#(refer) * (rnd(0.000999)+0.999)
Yvelocity#(refer) = Yvelocity#(refer) - rnd(1)
if Colour(refer) < 201 then Colour(refer) = Colour(refer) + rnd(5)
Col = Colour(refer)
ink rgb(Col,Col,Col+50),1
box Xpos#(refer)-1,Ypos#(refer)-1,Xpos#(refer)+1,Ypos#(refer)+1
next refer
return