home *** CD-ROM | disk | FTP | other *** search
/ Game Programming for Teens / GameProgrammingForTeens.iso / Source / chapter06 / demo06-02.bb < prev    next >
Encoding:
Text File  |  2003-04-06  |  427 b   |  20 lines

  1. ;demo06-02.bb - Draws a bunch of random lines to screen.
  2.  
  3. ;Initialize Graphics
  4. Graphics 800,600 
  5. ;Draw only to the front buffer
  6. SetBuffer FrontBuffer()
  7.  
  8. ;Draw only to the front buffer
  9. SeedRnd(MilliSecs()) 
  10.  
  11. While (Not KeyDown(1)) 
  12.     ;Set a random color
  13.     Color Rand(0,255),Rand(0,255),Rand(0,255) 
  14.  
  15.     ;Draw a random line
  16.     Line Rand(0,800), Rand(0,600), Rand(0,800), Rand(0,600) 
  17.  
  18.     ;Slow it down
  19.     Delay(25) 
  20. Wend