Howdie everyone. This is a pretty poor program to be honest, it has next to no interactivity, it's not a game and it's not much use in any situation I can think of, but it does look quite cool. MaxS is the number of snow particles, avgS# is the average speed of them, svar# is the maximum deviation from the average speed, avga# is the average angle of the snow and avar# is the maximum deviation from the average angle.
Press [ SPACE ] once to see how infinitely better my cunning greyscale snow is than pure white, and again to see how frankly mad multicoloured snow would be.
Coming in V1.1!!!
- snow that builds up at the bottom of the screen
If it doesn't work, tell me. I can't promise to fix it, but I can promise that if you complain enough I'll kill your hamster. If the snow falls too fast/slow, change avgs# and svar#.
maxs=600:avgs#=4:svar#=3:avga#=150:avar#=35
cls 0:hide mouse:sync on:ink rgb(255,255,255),0:dim s#(maxs,8)
for n=1 to maxs:while s#(n,3)>360:s#(n,3)=s#(n,3)-360:endwhile
s#(n,1)=rnd(640):s#(n,2)=rnd(480):s#(n,3)=rnd(2*avar#)+avga#-avar#:s#(n,4)=rnd(2*svar#)+avgs#-svar#
if s#(n,3)>=90 and s#(n,3)<=180:s#(n,5)=s#(n,4)*cos(s#(n,3)-90):s#(n,6)=s#(n,4)*sin(s#(n,3)-90):endif
if s#(n,3)<=270 and s#(n,3)>=180:s#(n,5)=(0-s#(n,4))*sin(s#(n,3)-180):s#(n,6)=s#(n,4)*cos(s#(n,3)-180):endif
if s#(n,3)<=90 and s#(n,3)>=0:s#(n,5)=s#(n,4)*sin(s#(n,3)):s#(n,6)=(0-s#(n,4))*cos(s#(n,3)):endif
if s#(n,3)<=360 and s#(n,3)>=270:s#(n,5)=(0-s#(n,4))*sin(360-s#(n,3)):s#(n,6)=(0-s#(n,4))*cos(360-s#(n,3)):endif
c#=(255/(2*svar#)*(s#(n,4)-avgs#+svar#)):c=rgb(c#,c#,c#):s#(n,7)=c:col=1
next n
do:gosub refreshs:sync:cls
if escapekey()=1:exit:endif:if spacekey()=1
if col=1 and space=0:col=2:space=1:c=rgb(255,255,255):for n=1 to maxs:s#(n,7)=c:next n:endif
if col=2 and space=0:col=3:space=1:for n=1 to maxs:c=rgb(rnd(255),rnd(255),rnd(255)):s#(n,7)=c:next n:endif
if col=3 and space=0:col=1:space=1:for n=1 to maxs:c#=(255/(2*svar#)*(s#(n,4)-avgs#+svar#)):c=rgb(c#,c#,c#):s#(n,7)=c:next n
endif:else:space=0:endif:loop:end
refreshs::
for n=1 to maxs:s#(n,1)=s#(n,1)+s#(n,5):s#(n,2)=s#(n,2)+s#(n,6):
if s#(n,2)>480 :s#(n,2)=0:s#(n,1)=rnd(640):endif:if s#(n,1)<0 :s#(n,1)=640:endif:if s#(n,1)>640:s#(n,1)=0:endif:if s#(n,2)<0 then s#(n,2)=480:
ink s#(n,7),0:dot s#(n,1),s#(n,2):next n:return
Yes, sir, but sir is not a rabbit, is sir?