home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1996-08-13 | 624 b | 27 lines |
- 'This example shows how slow it would be to set up a starfield using
- 'the AMOSPro Plot command.
- '
- 'THIS EXAMPLE USES NO COOL STARS! COMMANDS!!
- '
- 'Notice how slow and jerky it is!!
- '
- Screen Open 0,320,200,2,Lowres : Curs Off : Palette 0,$FFF
- Double Buffer : Autoback 0 : Hide
- '
- 'Set up initial positions of each star.
- '
- Dim X(200),Y(200),XSPD(200)
- For I=1 To 200
- X(I)=Rnd(319) : Y(I)=Rnd(199) : XSPD(I)=1+Rnd(3)
- Next I
- '
- 'A simple loop to clear, draw and update the stars!
- '
- Repeat
- Cls 0
- For I=1 To 200
- Plot X(I),Y(I)
- Add X(I),XSPD(I),0 To 319
- Next I
- Screen Swap : Wait Vbl
- Until Mouse Key