BASICButch

Potion Maker.bas

Jun 21st, 2018
811
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Programmer: Emily Wood
  2. 'Date:5/7/2018
  3. 'Purpose: generate potion bottles but better this time
  4.  
  5. CLS
  6. RANDOMIZE TIMER 'shake them dice
  7. SCREEN 13 '640x480, 256 colors. since it starts at 1, the last corner is (319,199) because n-1
  8. OPTION BASE 1 'so arrays are easier
  9.  
  10. DIM r(10) AS INTEGER 'make space to put right point
  11. DIM l(10) AS INTEGER 'make space to put left point
  12.  
  13. FOR times = 32 TO 320 STEP 32 '10 lines, with spacing of 32px
  14.  
  15.     Contour% = INT(RND * 50) + 32 'each line = (random from 1 to 100)+32
  16.  
  17.     r%(times / 32) = 160 - Contour% 'store the right point
  18.     l%(times / 32) = 160 + Contour% 'store the left point
  19.  
  20.     LINE (160 - Contour%, times)-(160 + Contour%, times) 'draw that shit! counter remembers what row of pixels bc its counting by 32s
  21.  
  22. NEXT 'go again until all 10 are there
  23.  
  24. FOR rt = 32 TO 288 STEP 32 'dont want to go over since the format is connecting A to A+1
  25.  
  26.     LINE (r%(rt / 32), rt)-(r%((rt / 32) + 1), rt + 32) 'connect the points on the right
  27.  
  28. NEXT
  29.  
  30. FOR lt = 32 TO 288 STEP 32 'dont want to go over since A to A+1
  31.  
  32.     LINE (l%(lt / 32), lt)-(l%((lt / 32) + 1), lt + 32) 'connect left points
  33.  
  34. NEXT
  35.  
  36.  
  37. LINE (140, 2)-(180, 2) '   \
  38. LINE (140, 2)-(150, 32) '   |__
  39. LINE (180, 2)-(170, 32) '   |   \_ unchanging cork
  40. LINE (150, 32)-(170, 32) ' /
  41.  
  42.  
  43.  
  44. SLEEP 'makes it not cover the bottom with PRESS ANY KEY until you're done looking at the results
RAW Paste Data