[Review] Space Invaders Coded in Vanilla JavaScript (by Andrea Maille)

Space Invaders by Andrea Maille is a pure vanilla JavaScript version of the famous 2D game from 1978.

Overview of the Space Invaders game interface, showing enemy spaceships

The game has the following features:

  • Collision detection
  • Shooting with spacebar
  • Left & Right (x-axis) movement with keyboard arrows
  • Peace Mode (shoot enemies with roses instead of rockets 😂)
  • Timer
  • Score count
  • Highscore board
  • Submit your score

While the game doesn’t offer much resistance in terms of the enemy A.I and lacks sound effects (which would instantly make it more addicting), it’s a great source of learning and inspiration for anyone who wants to build games with pure vanilla JavaScript.

Play Space Invaders

Check out the source code.

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊


Share & Discuss on