Originally I wanted to work on some plasma or water effect and the outcome was this smoke effect.
It somehow reminded me of the situation in Iraq...
sync on : sync rate 0 : randomize timer()
dim field(99,99,1) : dim random(7) : dim pos(4)
ink rgb(255,255,255),0 : box 320-51,240-51,320+51,240+51 : ink rgb(0,0,0),0 : box 320-50,240-50,320+50,240+50
repeat
field(rnd(97)+1,rnd(97)+1,c)=rgb(255,255,255) : gosub _smoke : sync : if c=0 then c=1 else c=0
until escapekey()=1 : end
_smoke:
for x=1 to 98 : for y=1 to 98
a=0
pos(0)=rgbb(field(x,y,c)) : pos(1)=rgbb(field(x,y-1,c)) : pos(2)=rgbb(field(x,y+1,c)) : pos(3)=rgbb(field(x-1,y,c)) : pos(4)=rgbb(field(x+1,y,c))
for i=1 to 4
b=rnd(75)
if pos(i)>(pos(0)+b) and y>0 : pos(0)=pos(i)-b : a=1 : endif
next i
if pos(0)>=8 and a=0 then pos(0)=pos(0)-8
if c=1 then field(x,y,0)=rgb(pos(0),pos(0),pos(0)) else field(x,y,1)=rgb(pos(0),pos(0),pos(0))
ink field(x,y,c),0
dot (320-50)+x,(240-50)+y
next y : next x
return
Smile and be happy, things could be worse!
So I smiled and was happy, and things got worse...