TIB: Stars


[Prev][Next][Index][Thread]

TIB: Stars




I am trying to write a program like the starfield screen saver in
Windows.  Here is what I have so far:  (this is in 85basic)

/program Stars/
:ZStd
:randM(1,8/->/X     ;These line creates a random matrix that is 8
:x(1,1/->/A         ;elements long.  It has integers from -10 to 10,
:x(1,2/->/B         ;so you don't have to do the "int(10(rand-rand))"
:x(1,3/->/C         ;thing to get numbers in that range.
:x(1,4/->/D
:x(1,5/->/E
:x(1,6/->/F
:x(1,7/->/G
:x(1,8/->/H
:ClDrw
:lbl A
:For(X,0,2,.1
:PtOn(x*A,x*B
:PtOn(x*C,x*D
:PtOn(x*E,x*F
:PtOn(x*G,x*H
:PtOn(x*B,x*A
:PtOn(x*D,x*C
:PtOn(x*F,x*E
:PtOn(x*H,x*G
:For(Y,1,50:End
:PtOff(x*A,x*B
:PtOff(x*C,x*D
:PtOff(x*E,x*F
:PtOff(x*G,x*H
:PtOff(x*B,x*A
:PtOff(x*D,x*C
:PtOff(x*F,x*E
:PtOff(x*H,x*G
:End
:Goto A
/end/

I want to speed up this program.  I would also like to get some more
stars on screen.  Any ideas?


==
Garth Johnson

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com