Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Programmer: Emily Wood
- 'Date:5/7/2018
- 'Purpose: generate potion bottles but better this time
- CLS
- RANDOMIZE TIMER 'shake them dice
- SCREEN 13 '640x480, 256 colors. since it starts at 1, the last corner is (319,199) because n-1
- OPTION BASE 1 'so arrays are easier
- DIM r(10) AS INTEGER 'make space to put right point
- DIM l(10) AS INTEGER 'make space to put left point
- FOR times = 32 TO 320 STEP 32 '10 lines, with spacing of 32px
- Contour% = INT(RND * 50) + 32 'each line = (random from 1 to 100)+32
- r%(times / 32) = 160 - Contour% 'store the right point
- l%(times / 32) = 160 + Contour% 'store the left point
- LINE (160 - Contour%, times)-(160 + Contour%, times) 'draw that shit! counter remembers what row of pixels bc its counting by 32s
- NEXT 'go again until all 10 are there
- FOR rt = 32 TO 288 STEP 32 'dont want to go over since the format is connecting A to A+1
- LINE (r%(rt / 32), rt)-(r%((rt / 32) + 1), rt + 32) 'connect the points on the right
- NEXT
- FOR lt = 32 TO 288 STEP 32 'dont want to go over since A to A+1
- LINE (l%(lt / 32), lt)-(l%((lt / 32) + 1), lt + 32) 'connect left points
- NEXT
- LINE (140, 2)-(180, 2) ' \
- LINE (140, 2)-(150, 32) ' |__
- LINE (180, 2)-(170, 32) ' | \_ unchanging cork
- LINE (150, 32)-(170, 32) ' /
- SLEEP 'makes it not cover the bottom with PRESS ANY KEY until you're done looking at the results
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement