home *** CD-ROM | disk | FTP | other *** search
/ Sauce 'n' Code 2 / sauce-n-code-02.adf / ASCII_Source / Fuzzy.asc < prev    next >
Text File  |  1995-07-02  |  2KB  |  69 lines

  1. ' - FUZZY SCREEN EFFECT!!! 
  2.  
  3. ' - BY ROB OF CYBORNETICS - Jan 94 
  4.  
  5. ' - There's a small(?) delay while it generates the fuzz.
  6. ' - Alternatively you could use a picture to store the static fuzz.  
  7.  
  8. FUZZ[110,88,100,80,5000,True] : Rem  - Not really INTENSE enough.  
  9. FUZZ[110,88,100,80,10000,False] : Rem - About the right INTENSITY.  No Sound.  
  10. FUZZ[110,88,100,80,20000,True] : Rem - A bit too INTENSE. 
  11. FUZZ[0,0,320,256,40000,True] : Rem - BIG one. Takes ages. Not INTENSE enough! 
  12.  
  13. Procedure FUZZ[X,Y,WIDTH,HEIGHT,_INTENSITY,SFX]
  14.    
  15.    ' - X         - X coordinate of fuzz on screen 0 
  16.    ' - Y         - Y coordinate of fuzz on screen 0 
  17.    ' - WIDTH     - Number of pixels wide the fuzz is (MAX 320)
  18.    ' - HEIGHT    - Number of pixels high (MAX 256)
  19.    ' - INTENSITY - Number of dots in the fuzz.  Works best with high intensity. 
  20.    ' -           - Takes ages to generate though, if you have too many. 
  21.    ' - SFX       - If True then the fuzz will be accompanied by sound 
  22.    
  23.    
  24.    ' - DIFF determines how random each frame is.
  25.    ' - It's the number of pixels extra added to the width when it's generated.
  26.    ' - A higer number creates a better effects but needs higer intensity. 
  27.    DIFF=40
  28.    
  29.    
  30.    ' - Display screen 
  31.    Screen Open 0,320,256,2,Lowres
  32.    Curs Off : Cls 0 : Hide On : Flash Off : Colour 1,$FFF
  33.    
  34.    
  35.    ' - Setup fuzz generation screen 
  36.    Screen Open 1,320+DIFF,256+DIFF,2,Lowres
  37.    Curs Off : Cls 0 : Flash Off : Hide : Colour 1,$FFF
  38.    Screen Hide 1
  39.    
  40.    
  41.    ' - Generate the static fuzz 
  42.    Ink 1
  43.    SW=WIDTH+DIFF
  44.    SH=HEIGHT+DIFF
  45.    For SPOT=0 To _INTENSITY
  46.       PX=Rnd(SW)
  47.       PY=Rnd(SH)
  48.       Plot PX,PY
  49.    Next SPOT
  50.    Screen 0
  51.    
  52.    
  53.    ' - Bring the noise... 
  54.    If SFX Then Noise To 15
  55.    
  56.    ' - And the fuzzzzz... 
  57.    Repeat 
  58.       If SFX Then Play Rnd(10)+80,0
  59.       FROMX=Rnd(DIFF)
  60.       FROMY=Rnd(DIFF)
  61.       Screen Copy 1,FROMX,FROMY,FROMX+WIDTH,FROMY+HEIGHT To 0,X,Y
  62.    Until(Mouse Key=1) or(Inkey$<>"") : Rem - Wait for mouse button or any key!
  63. End Proc
  64.  
  65.  
  66.  
  67.  
  68.  
  69.