Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0 rem On the left side of the screen is some code i made by accident while trying to make something else (which i'll finish later)
- 0 rem On the right side of the screen is a real* random walk to show the code on the left isn't pure random
- 0 rem That's what i like about applesoft basic, Even if you mess up you can still create interesting things.
- 0 rem *Not actually real randomness since jsbasic sucks at randomness (try making a program with just " 10 print rnd(1) " then run it again and again)
- 5 v = 1 : rem Maximum "velocity" for the leftside randomess, Must be an integer
- 10 hgr2 : x = 70 : y = 96 : x2 = 210 : y2 = 96 : hcolor = 3 : hplot 140,0 to 140,191
- 11 for re = 1 to peek(78)+peek(78)+peek(78) : er = rnd(1) : next
- 19 rem Code for left side randomness:
- 20 XV = XV + int(rnd(1)*3)-1 : YV = YV + int(rnd(1)*3)-1
- 40 if xv > v then xv = v
- 50 if yv > v then yv = v
- 60 if xv < -v then xv = -v
- 70 if yv < -v then yv = -v
- 80 x = x + xv : y = y + yv
- 90 if x > 140 then x = x - 140
- 100 if x < 0 then x = x + 140
- 120 if y > 191 then y = y - 191
- 130 if y < 0 then y = y + 191
- 140 hplot x,y
- 149 rem Code right right side randomness:
- 150 x2 = x2 + int(rnd(1)*3)-1
- 160 y2 = y2 + int(rnd(1)*3)-1
- 162 if x2 > 279 then x2 = x2 - 140
- 164 if x2 < 140 then x2 = x2 + 140
- 166 if y2 > 191 then y2 = y2 - 191
- 168 if y2 < 0 then y2 = y2 + 191
- 169 hplot x2,y2
- 170 goto 20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement