home *** CD-ROM | disk | FTP | other *** search
/ Game Programming for Teens / GameProgrammingForTeens.iso / Source / chapter05 / demo05-07.bb < prev    next >
Encoding:
Text File  |  2003-04-06  |  560 b   |  26 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;
  2. ;demo05-07.bb
  3. ;By Maneesh Sethi
  4. ;Demonstrates the Cls function, makes a bunch of colors
  5. ;No Input Parameters required
  6. ;;;;;;;;;;;;;;;;;;;;;;
  7. Graphics 800,600
  8. SeedRnd (MilliSecs())
  9. msg$ = "Give money to Maneesh"
  10.  
  11. ;Main Loop
  12. While Not KeyDown(1)
  13.  
  14. ;Set the color to a random value
  15. ClsColor Rand(0,255), Rand(0,255), Rand(0,255) 
  16. Cls      
  17.  
  18. ;If the framecounter goes past 10, draw the msg$ on the screen
  19. If framecount = 10
  20.     Text 400,300,msg$
  21.     framecount = 0
  22. EndIf
  23.  
  24. framecount = framecount + 1
  25. Delay 100 ;Slow down!
  26. Wend