200byteDemoChallenge!

BlitzMax Forums/BlitzMax Programming/200byteDemoChallenge!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's a smaller (222 Byte) version with smoother animation but (increasingly) slower drawing:
g=300;Graphics g,g,0;Local a[g*g];Repeat;a[Rand(g)]=1;For x=g*g To g Step -1;If(x-2)Mod g=0 Then x:-3;f=Rand(-1,1)
If a[x]~a[x-g+f]
a[x-g+f]=0;a[x]=1;End If;If a[x]Then Plot x Mod g,x/g
Next;Flip 0;Cls;Until KeyDown(27)

It's supposed to be some kind of "snow storm" effect, thus the accumulation. (glad you like it.)
edit: Finally, here's a smooth, small version (albeit a bit slower because the pixels can warp from side to side). :) (243 Bytes)
g=200;h=g*g;Graphics g,g;Local a[h],b[h];Repeat;a[Rand(g)]=1;For x=h To g Step -1;f=Rand(-1,2)
If a[x]~a[x-g+f]
a[x-g+f]=0;a[x]=1;End If
If a[x]~b[x]
c=255*a[x];SetColor c,c,c;Plot x Mod g,x/g;b[x]=a[x];End If;Next;Flip 0;Until KeyDown(27)