' 'Sine ball demo. '(c) Shockwave. ' gosub setup repeat setdispbuf dw dw=1-dw setdrawbuf dw setrgb 1,20,c1/4,20 setrgb 2,10,c2/4,10 setrgb 3,20,c3/4,20 gtriangle 0,0 to 640,512 to 0,512 gtriangle 0,0 to 640,512 to 640,0 gosub balls setrgb 1,100,100,50 s1=2+1*sin(mm) s2=2+1*cos(mm/3) slx=4*sin(mm)-4 sly=4*cos(mm) offs=50*sin(mm) text scx+offs-slx,440-sly,mid$(s$,p,76) text 130-slx,100-sly,"WELCOME TO THE ANARCHIC SPHERES DEMO!" setrgb 1,140,140,70 text 133,100,"WELCOME TO THE ANARCHIC SPHERES DEMO!" text scx+offs,440,mid$(s$,p,76) scx=scx-2 if scx<-50 then scx=scx+10 p=p+1 if p>len(s$) p=0 fi until (peek("port1")=16384) exit label balls setrgb 1,0,0,0 setrgb 2,0,0,0 off=off+2 if off>360 off=off-360 n=(bobs*10)+1 for a=1 to bobs mm=mm+.01 c1=100*sin(mm+a)+100 c2=100*sin(mm+a/2)+100 c3=100*sin(mm+a/3)+100 setrgb 3,c1,c2,c3 x=px(off+m)+195+xt(m+off) y=py(off+n)+140 for b=l+a to 360+l+a step 40 gtriangle (sx(b)*s1)+x,(sy(b)*s2)+y to (sx(b+40)*s1)+x,(sy(b+40)*s2)+y to x,y next b m=m+10 n=n-10 next a l=l+20 if l>40 l=l-40 m=0 return label setup open window 640,512 bobs=14 dim sx(720) dim sy(720) dim px(720) dim py(720) dim xt(720) for a=1 to 720 xt(a)=100*sin(a*(pi/180)) sx(a)=50*sin(a*(pi/180)) sy(a)=50*cos(a*(pi/180)) px(a)=200*sin(a*(pi/180)*2)+120 py(a)=200*cos(a*(pi/180))+120 next a s$=" " s$=s$+"HI FOLKS!!! SHOCKWAVE IS PROUD TO PRESENT HIS NEW" s$=s$+"EST DEMO!!! CAN YOU ACTUALLY READ THIS SCROLL?? " s$=s$+" HOPE NOT BECAUSE THERE IS NOTHING WORTHWHILE IN " s$=s$+"HERE! THIS ONE'S A BIT DIFFERENT THOUGH, EH?? " s$=s$+" MORE PSYCHEDELIA.. NO 3D FOR A CHANGE.. STILL" s$=s$+" LOOKS OK THOUGH, AND OF COURSE THE SCROLL IS " s$=s$+"DIFFERENT!!! BIG HELLOS TO ALL THAT KNOW ME " s$=s$+"AND THANKS TO ADAM FOR WWW.YABASIC.CO.UK WHICH " s$=s$+"IS TRUELY A GREAT SITE!! THAT'S ALL FOLKS..... " p=0 scx=-40 return