A shooter

By the end you will have a ship that fires lasers, a spawner that sends aliens, and explosions when they meet.

What you need

The main pieces work in Simple mode. One tidy-up rule needs Advanced.

Spaceship+ Add object โ†’ Library โ†’ Spaceship. It slides left and right already.
LaserLaser from the library. It flies straight up by itself.
Blob AlienBlob Alien from the library. Set How it moves to Bouncing ball, Speed 12, Starts moving: Down diagonals.
Spawner+ Add object โ†’ New โ†’ Spawner. Makes: Blob Alien. Every (seconds) 1.2. Wander across 280. Tick Starts making things straight away. Name it Alien Maker.
Explosion, Score, LivesExplosion from the library; Score and Lives from New.
SoundsLaser, Explosion, Hit.
NutHouse
Star Defender being played: the ship fires a laser at falling aliens
Star Defender is this recipe, finished.

Build it

  1. Set Gravity pulls to Off (everything floats) in the level settings. Pick the Starry space background picture.
  2. Put the Spaceship at the bottom and the Alien Maker a little above the top edge. Blobs fall from above the screen.
  3. Events tab โ†’ + New event โ†’ โŒจ Keyboard & mouse โ†’ Upon pressing key โ†’ Space.
  4. In โœš Create objects choose Create an object: Laser, X 0, Y โˆ’24, Measured from Spaceship. Play Laser.
  5. + New event โ†’ Laser โ†’ Collides with another object โ†’ Blob Alien.
  6. In โœš Create objects: Create an object Explosion at X 0, Y 0 from Blob Alien. Then Destroy Blob Alien, Destroy Laser, Add to score 10, play Explosion.
  7. + New event โ†’ Spaceship โ†’ Collides with another object โ†’ Blob Alien. Do Destroy Blob Alien, Subtract lives 1, Flash (blink) Spaceship 1 second, play Hit.
  8. + New event โ†’ Laser โ†’ Leaves play area, tick Top โ†’ Destroy Laser.
  9. + New event โ†’ โ˜บ Player 1 โ†’ Compare number of lives = equal to 0 โ†’ Restart the game.
  10. In Advanced: + New event โ†’ Explosion โ†’ Animation has finished โ†’ Destroy Explosion.
WhenUpon pressing Space
DoCreate Laser at (0, โˆ’24) from SpaceshipPlay sound Laser
WhenLaser collides with Blob Alien
DoCreate Explosion at Blob AlienDestroy Blob AlienDestroy LaserAdd 10 to scorePlay sound Explosion
WhenSpaceship collides with Blob Alien
DoDestroy Blob AlienSubtract 1 from livesSpaceship flashes for 1 secondPlay sound Hit
WhenExplosion: Animation has finished
DoDestroy Explosion

Make it yours

  • A second enemy: Flying Saucer with Chases another object โ†’ Spaceship, from a second spawner every 6 seconds.
  • Slow the fire rate: add Not more than once everyโ€ฆ 0.3 seconds to the Space rule (Advanced).
  • Keep the ship on screen: Spaceship leaves play area at Left and Right โ†’ Stop.

Still stuck?

Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.