Posted: 26th Apr 2017 22:38
A little something I coded up while browsing the Code Snippets.

+ Code Snippet
dim xypos(50,2):dim coursechange(50,2)
sync on:backdrop on:color backdrop 0:autocam off

rem this code snippet was made by The Darthster
rem https://forum.thegamecreators.com/thread/1026
create bitmap 1,32,32
for i=0 to 360
for j=0 to 16
ink rgb(255-int(j*15.9),255-int(j*15.9),255-int(j*15.9)),0
dot 16+(cos(i)*j),16+(sin(i)*j)
next j
next i
get image 1,0,0,31,31
set current bitmap 0
delete bitmap 1
rem the end of The Darthster's code

for t=1 to 50
make object plain t,15,15
texture object t,1
set object t,1,1,0
ghost object on t
next t

for t=1 to 50
x=rnd(4100)-235:y=rnd(360)+180
position object t,x,y,z
xypos(t,1)=x:xypos(t,2)=y
next t

for t=1 to 50
ranum=rnd(1)+1
if ranum=1 then coursechange(t,1)=rnd(7)-8
if ranum=2 then coursechange(t,1)=rnd(7)+1
next t

for t=1 to 50
ranum=rnd(1)+1
if ranum=1 then coursechange(t,2)=rnd(7)-8
if ranum=2 then coursechange(t,2)=rnd(7)+1
next t

position camera 0,0,-300

do

  for t=1 to 50
    position object t,xypos(t,1),xypos(t,2),0
  next t

  for t=1 to 50
    xypos(t,1)=xypos(t,1)+coursechange(t,1)
    xypos(t,2)=xypos(t,2)+coursechange(t,2)
  next t

  for t=1 to 50
    if xypos(t,1)<-235 then coursechange(t,1)=rnd(7)+1
    if xypos(t,1)>235 then coursechange(t,1)=rnd(7)-8
    if xypos(t,2)<-180 then coursechange(t,2)=rnd(7)+1
    if xypos(t,2)>180 then coursechange(t,2)=rnd(7)-8
  next t

  sync

loop
Posted: 27th Apr 2017 2:03
This is a variation of the previous code snippet.
+ Code Snippet
dim xypos(50,2):dim coursechange(50,2)
sync on:sync rate 60:backdrop on:color backdrop 0:autocam off

create bitmap 1,100,100
for t=1 to 50
  ink rgb(rnd(255),rnd(255),rnd(255)),0
  rad=40
  FillCircle((80-(2*rad))+rad,((80-(2*rad))+rad),rad)
  blur bitmap 1,3
  get image t,0,0,100,100
  cls 0
paste image 1,0,0
  blur bitmap 1,3
  get image 1,0,0,60,60
  cls 0
  paste image 1,0,0
  blur bitmap 1,3
  get image 1,0,0,60,60
  cls 0
next t

set current bitmap 0
delete bitmap 1

for t=1 to 50
make object plain t,20,20
texture object t,t
set object t,1,0,1

next t

for t=1 to 50
x=rnd(610)-235:y=rnd(360)+180
position object t,x,y,z
xypos(t,1)=x:xypos(t,2)=y
next t

for t=1 to 50
ranum=rnd(1)+1
if ranum=1 then coursechange(t,1)=rnd(3)-4
if ranum=2 then coursechange(t,1)=rnd(2)+1
next t

for t=1 to 50
ranum=rnd(1)+1
if ranum=1 then coursechange(t,2)=rnd(3)-4
if ranum=2 then coursechange(t,2)=rnd(2)+1
next t

position camera 0,0,-300

do

  for t=1 to 50
    position object t,xypos(t,1),xypos(t,2),0
  next t

  for t=1 to 50
    xypos(t,1)=xypos(t,1)+coursechange(t,1)
    xypos(t,2)=xypos(t,2)+coursechange(t,2)
  next t

  for t=1 to 50
    if xypos(t,1)<-235 then coursechange(t,1)=rnd(2)+1
    if xypos(t,1)>235 then coursechange(t,1)=rnd(3)-4
    if xypos(t,2)<-180 then coursechange(t,2)=rnd(2)+1
    if xypos(t,2)>180 then coursechange(t,2)=rnd(3)-4
  next t

  sync

loop

function FillCircle( CX, CY, R )

   s=R*0.70710678
   box CX-s, CY-s, CX+s+1, CY+s+1
   s=s+1
   i=R*R
   for y=s to R
      x=sqrt( i-(y*y) )

      ` Draw top and bottom
      box CX-x, CY-y, CX+x+1, (CY-y)+1
      box CX-x, CY+y, CX+x+1, CY+y+1

      ` Draw left and right
      box CX-y, CY-x, (CX-y)+1, CY+x+1
      box CX+y, CY-x, CX+y+1, CY+x+1
   next y

endfunction