Ok, i failed to find the link... but i have the original code.
It was from some kind of thread where there was a few graphical examples of some nice effects.
sync on
sync rate 60
randomize timer()
dim squares(64,48,3)
count as integer
limit as integer
direction as boolean
mode as integer
modecount as integer
xrain as integer
yrain as integer
type entity
variation as integer
x as integer
y as integer
endtype
dim entity(0) as entity
count = timer()
limit = 50
direction = 1
mode=1
do
if mode=1
if timer()-count=>limit
xrain=rnd(63)+1
yrain=rnd(47)+1
squares(xrain,yrain,1)=rnd(255) `Red
squares(xrain,yrain,2)=rnd(255) `Green
squares(xrain,yrain,3)=rnd(255) `Blue
if direction=1
inc limit
if limit=80 then direction=0
else
dec limit
if limit=5 then direction=1
endif
inc modecount
if modecount=800
mode=2
modecount=0
array insert at bottom entity(0)
entity(0).variation = rnd(4)+1
entity(0).x = rnd(63)+1
entity(0).y = rnd(47)+1
endif
count=timer()
endif
endif
for i = 1 to 64
for j = 1 to 48
`top left corner
if i=1 and j=1
rtmp=(squares(2,1,1)+squares(1,2,1))/2
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(2,1,2)+squares(1,2,2))/2
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(2,1,3)+squares(1,2,3))/2
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`top right corner
if i=64 and j=1
rtmp=(squares(i-1,1,1)+squares(i,2,1))/2
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(i-1,1,2)+squares(i,2,2))/2
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(i-1,1,3)+squares(i,2,3))/2
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`bottom left corner
if i=1 and j=48
rtmp=(squares(2,j,1)+squares(1,j-1,1))/2
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(2,j,2)+squares(1,j-1,2))/2
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(2,j,3)+squares(1,j-1,3))/2
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`bottom right corner
if i=64 and j=48
rtmp=(squares(i-1,j,1)+squares(i,j-1,1))/2
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(i-1,j,2)+squares(i,j-1,2))/2
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(i-1,j,3)+squares(i,j-1,3))/2
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`top row
if j=1 and i<>1 and i<>64
rtmp=(squares(i-1,1,1)+squares(i+1,1,1)+squares(i,2,1))/3
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(i-1,2,2)+squares(i+1,2,2)+squares(i,2,2))/3
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(i-1,3,3)+squares(i+1,3,3)+squares(i,2,3))/3
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`right row
if i=64 and j<>1 and j<>48
rtmp=(squares(i,j-1,1)+squares(i,j+1,1)+squares(i-1,j,1))/3
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(i,j-1,2)+squares(i,j+1,2)+squares(i-1,j,2))/3
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(i,j-1,3)+squares(i,j+1,3)+squares(i-1,j,3))/3
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`bottom row
if j=48 and i<>1 and i<>64
rtmp=(squares(i-1,j,1)+squares(i+1,j,1)+squares(i,j-1,1))/3
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(i-1,j,2)+squares(i+1,j,2)+squares(i,j-1,2))/3
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(i-1,j,3)+squares(i+1,j,3)+squares(i,j-1,3))/3
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`left row
if i=1 and j<>1 and j<>48
rtmp=(squares(1,j-1,1)+squares(1,j+1,1)+squares(2,j,1))/3
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(1,j-1,2)+squares(1,j+1,2)+squares(2,j,2))/3
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(1,j-1,3)+squares(1,j+1,3)+squares(2,j,3))/3
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
`middle
if i<>1 and i<>64 and j<>1 and j<>48
rtmp=(squares(i-1,j,1)+squares(i+1,j,1)+squares(i,j-1,1)+squares(i,j+1,1))/4
if squares(i,j,1)>rtmp then dec squares(i,j,1)
if squares(i,j,1)<rtmp then inc squares(i,j,1)
gtmp=(squares(i-1,j,2)+squares(i+1,j,2)+squares(i,j-1,2)+squares(i,j+1,2))/4
if squares(i,j,2)>gtmp then dec squares(i,j,2)
if squares(i,j,2)<gtmp then inc squares(i,j,2)
btmp=(squares(i-1,j,3)+squares(i+1,j,3)+squares(i,j-1,2)+squares(i,j+1,3))/4
if squares(i,j,3)>btmp then dec squares(i,j,3)
if squares(i,j,3)<btmp then inc squares(i,j,3)
endif
ink rgb(squares(i,j,1),squares(i,j,2),squares(i,j,3)),1
box (i-1)*10,(j-1)*10,i*10,j*10
next j
next i
if returnkey()=0 and waitkey=1 then waitkey=0
sync
loop
Proud member of The Unforgiven Warriors
http://www.tuwguild.com