home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 5 / amigaformatcd05.iso / readerstuff / richard_thompson / cool_stars! / examples / simple_starfield.amos / simple_starfield.amosSourceCode
Encoding:
AMOS Source Code  |  1996-08-13  |  585 b   |  21 lines

  1. 'This example sets up a simple single coloured starfield!
  2. '
  3. 'This starfield is drawn 50 times/second, even if using a MC68000! 
  4. '
  5. Screen Open 0,320,200,2,Lowres : Curs Off : Palette 0,$FFF
  6. Double Buffer : Autoback 0 : Hide 
  7. '
  8.  Extension_17_001C 200,False : Rem Reserve 200 single coloured stars! 
  9. '
  10. 'Set up initial positions of each star.
  11. '
  12. For I=1 To 200
  13.     Extension_17_003C I,Rnd(319),Rnd(199),1+Rnd(3),0
  14. Next I
  15. '
  16. 'A simple loop to clear, draw and update the stars!
  17. '
  18. Repeat 
  19.     Extension_17_01D8 : Extension_17_01EA : Extension_17_0248 
  20.    Screen Swap : Wait Vbl 
  21. Until Mouse Key