02-10-2004, 04:37 PM
was looking at Jarks wonderful tutorials, you know, thinking.... "I dont have a clue what any of this stuff means..."
So that inspired me to write a new cloud type smoothing program.
It first of all has a grid of like 32x20 and then smooths it, and divides each 10x10 area in two, then smooths, it, divides them in two, smooths again, and so on, producing:
SMOOTH cloudy things Dammnit!!!
So that inspired me to write a new cloud type smoothing program.
It first of all has a grid of like 32x20 and then smooths it, and divides each 10x10 area in two, then smooths, it, divides them in two, smooths again, and so on, producing:
SMOOTH cloudy things Dammnit!!!
Code:
amount = 25
sat = 15
RANDOMIZE TIMER
SCREEN 13
FOR i = 1 TO 255
OUT &H3C8, i: OUT &H3C9, i / 4.25: OUT &H3C9, i / 4.25: OUT &H3C9, 63
NEXT
'Init the map
LINE (0, 0)-(320, 200), 1, BF
FOR i = 1 TO amount
posx = INT(RND * 28) + 1
posy = INT(RND * 16) + 1
FOR ii = 1 TO sat
posx2 = INT(RND * 4) + posx
posy2 = INT(RND * 4) + posy
LINE (posx2 * 10 - 10, posy2 * 10 - 10)-(posx2 * 10, posy2 * 10), 255, BF
NEXT
NEXT
FOR stp = 10 TO 1 STEP -1
FOR x = 0 TO (309 + stp) / stp
FOR y = 0 TO (189 + stp) / stp
avcol = 0
FOR x1 = x - 1 TO x + 1
FOR y1 = y - 1 TO y + 1
avcol = avcol + POINT(x1 * stp, y1 * stp)
NEXT
NEXT
avcol = avcol / 9
LINE (x * stp - stp + 1, y * stp - stp + 1)-(x * stp + 1, y * stp + 1), avcol, BF
NEXT
NEXT
NEXT