Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '
- ' Your code goes here
- ' Have fun!
- '
- rlist=(RAPTOR_LIST *)strptr(RAPTOR_sprite_table)
- basic_r_indx=1
- basic_r_size=1
- RLOCATE 0,202
- RPRINT " RAPTOR BASIC+ - REBOOT "
- basic_r_size=0
- basic_r_indx=0
- RLOCATE 0,218
- RPRINT " Derived from BCX BASIC v6 "
- cls
- 'set variables and arrays
- dim screen[320,200] as short
- dim x%,y%,counter%,d%,xo%,yo%,dnew%,sticky%,i%,j%
- dim dice!
- for i%=0 to 319
- for j%=0 to 199
- screen[i%,j%]=0
- next j%
- next i%
- 'logic
- screen[160,100]=1
- colour 2
- plot (160,100)
- xo%=0
- yo%=0
- x%=0
- y%=0
- do
- 'let particle
- d%=d%+5
- xo% = 160+d%*cos(rnd*360)
- yo% = 100+d%*sin(rnd*360)
- randomize(counter%)
- sticky%=0
- for i%=1 to 200
- vsync
- next i%
- while sticky% = 0
- dice! = rnd
- if dice!<= 0.25 then
- x%=xo%+1
- plot(x%,y%)
- elseif dice! <= 0.5 then
- x%=xo%-1
- plot(x%,y%)
- elseif dice! <= 0.75 then
- y%=yo% +1
- plot(x%,y%)
- elseif dice! <=1 then
- y%=yo% -1
- plot(x%,y%)
- end if
- print x%, " ", y%
- for i%=1 to 100
- vsync
- next i%
- 'check for sticky
- if screen[x%+1,y%] or screen[x%,y%+1] or screen[x%,y%-1] or screen[x%-1,y%] =1 then
- sticky%=1
- screen[x%,y%]=1
- plot (x%,y%)
- counter%=counter%+1
- rprint(counter%)
- if sqrt(x%*x%+y%*y%)>d% then
- d%=sqrt(x%*x%+y%*y%)
- end if
- else
- xo%=x%
- yo%=y%
- end if
- wend
- loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement