Missile Command is another classic game from the early days of computer games. Here is a demonstration of the original arcade game from 1980:

The goal of the game is protect six cities from attack by enemies missiles, shooting them down before they reached their targets.

The game is played by moving a crosshair across the sky and pressing one of three buttons to launch a counter-missile from the appropriate battery. Counter-missiles explode upon reaching the crosshair, leaving a fireball that persists for several seconds and destroys any enemy missiles that enter it. There are three batteries, each with ten missiles; a missile battery becomes useless when all its missiles are fired, or if the battery is destroyed by enemy fire. The missiles of the central battery fly to their targets at much greater speed; only these missiles can effectively kill a smart bomb at a distance.

The game is staged as a series of levels of increasing difficulty; each level contains a set number of incoming enemy weapons. The weapons attack the six cities, as well as the missile batteries; being struck by an enemy weapon results in destruction of the city or missile battery. Enemy weapons are only able to destroy three cities during one level. A level ends when all enemy weaponry is destroyed or reaches its target. A player who runs out of missiles no longer has control over the remainder of the level. At the conclusion of a level, the player receives bonus points for any remaining cities (50 points times scoring level, 1 to 6) or unused missiles (5 points times scoring level, 1 to 6). Between levels missile batteries are rebuilt and replenished; destroyed cities are rebuilt only at set point levels (usually every 10,000 or 12,000 points).

The game inevitably ends when all six cities are destroyed, unless the player manages to score enough points to earn a bonus city before the end of the level. Like most early arcade games, there is no way to “win” the game; the game just keeps going with ever-faster and more prolific incoming missiles. The game, then, is just a contest in seeing how long the player can survive.

Can you build a simplified Scratch version of this game?

Part 1: Make a basic, simple version of the game

Here are instructions for a simple version of the game to get you started. This is what we will be making:

  1. Start a new project. Delete cat sprite. Choose Stars backdrop and add earth sprite from library. (You will defend earth in this version of the game). Next we will draw 4 simple sprites.
  2. Draw a simple light grey circle sprite and name it ‘rocks’. Tip – turn off outline when you are drawing it.
  3. Draw a cross in yellow or any light colour and name it ‘target’. Tip – use rectangle tool for drawing lines
  4. Draw short a red line and name it ‘missile’.
  5. Draw a something that looks like a fire ball and name it ‘explosion’. Tip – you can draw an orange circle and a yellow circle and use the reshape tool to give them a random shape that looks a bit like fire. You should now have something like this:
  6. Now we need to start programming the code. Add code to the rocks sprite to make the rocks attack Earth. We will use cloning to make new rocks appear at a random position across the top of the screen and move towards Earth. We can point the rocks towards Earth and set them moving towards Earth. To make things a little more random, we can adjust a few things by a small random amount: size of rocks, speed (hint: use a speed variable – must be ‘for this sprite only’ because each clone needs it’s own speed variable), direction (turn by a small random amount). Try doing this by yourself but if you get stuck here’s some code you could use:
  7. Next we will set up the code for defending Earth against the incoming rocks. The game player will use the mouse pointer to click on the screen and that will place a target at that spot. Then a missile will be fired towards the target and explode when it reaches the target. If it explodes beside the incoming rock, it will eliminate that rock. So, let’s set the code for placing the target on the stage. First create the variables  xTarget and yTarget. These will be for saving the position where we place the target. Then create another variable named fired. This will be a true or false variable that we will set whenever we fire a missile. It will remain set until the missile blows up. We will use this to limit the player to only one missile firing at at a time. Then we add the code to the stage for placing the target:
  8. Next we will add the code to the target sprite to show the target when it has been placed by clicking on the stage. The target needs to be hidden at start of game and we show it at the point where it has been placed until our missile reaches it and explodes.
  9. Next we need to get our missiles firing towards the targets. At the start of the game the missiles should be hidden. When the missile sprite receives the fire message it needs to start at Earth and move towards the target. The target sprite will detect when it missile is touching it and will broadcast explode. When missile receives explode message it should hide and reset the firing variable to allow another missile to be fired.
  10. And now let’s do the explosion code. You can use some graphic effects to make it look like an explosion. Try it yourself or follow this example.
  11. You now should have the basics of the game working. We need a way to indicate game over when the earth has been hit. You can make a copy of the Stars backdrop in the Stage and add some text to it to say ‘Gane Over’.
  12. Add a way to keep track of the score. You can do this with a variable called Score and change it’s value by 1 every time a rock has been eliminated.
  13. Add sound effects such as explosions, missile firing sounds, etc.

 

Part 2: Turn the basic version into a fun multi-level game

You can try to make a clone/similar version of the original arcade game or use your own ideas to make your own really cool version of Missile Command. Here’s an example of one that is close to the the original classic arcade game:

Features to add to your Missile Command Game

Here are some things to add:

  1. Scoring – an essential element of pretty much any Arcade game
  2. Lives – the original game has 6 cities that you defend. When a city gets hit it is destroyed. When all cities are destroyed, game is over.
  3. Levels – make it a little more difficult in each level.
  4. Bonus target – original game has an alien that crosses the screen at random intervals (from level 2 onwards). You get bonus score for hitting the alien.
  5. Ammunition – original game has 3 missile silos, each with 10 missiles, so you have up to 30 shots per level. Your missiles get replenished every level.
  6. Missile traces – you can use the pen tool to draw the missile traces. Note: You cannot erase part of what is drawn by the pen tool or just what one sprite draws, the only way is to erase everything drawn by the pen. So the trick is to redraw all the active traces after you erase all.
  7. Splitting missile – the original game some of the missiles coming at the cities you are defending split into multiple missiles.
  8. Sound effects

Need more help?

Here’s a video tutorial for a missile command game. It’s a bit different than the classic arcade version but you can get some ideas for your own game.

Share your project

When you’ve completed your Missile Command game, show it to one of the mentors. Share it in Scratch and have another member of the group play your game and you play their version. Notice the major differences between your version and their version and share feedback with each other on your different versions of Missile Command.

.