include landscape1
landscape1 400 5 20

message "Pink aliens.." "Stop"

// make the mothership..
pu; moveto 200 550; logo fillcolor = "brightgreen"; pd; ellipse 120 30; fillshape
pu; moveto 200 540; logo fillcolor = "purple"; pd; ellipse 120 30; fillshape

// now make aliens..
repeat untilbreak [
  if keypress = 1 [ break ]

  // set a random location for each alien..
  set ypos = calc 100 + random 280
  set xpos = random winwide

  // set alien size based on how "far away" it is..
  set origsize = calc 800 / :ypos 
  set size = calc :origsize * 3

  logo linecolor = "powderblue"
  logo fillcolor = "pink"

  // draw an alien.. (a stack of pink ellipses)
  repeat (calc 10 + random 10) [
    pu; moveto :xpos :ypos
    pd; ellipse (calc :size + random 8) (calc :size * 0.7)
    fillshape
    wait 5
    incr ypos by (calc :size * 1.1)
    set size = calc :size * 0.8
    pu
    ] 
  // add the antennae..
  set asize = calc :origsize * 4
  pd lt 35 fd :asize  bk :asize rt 70 fd :asize pu 

  wait (calc 10 + random 60)   // wait a random amount of time..
  ]
