Share your repls and programming experiences

← Back to all posts
2 player asteroids game
Deraj21 (7)

Canvas Asteroids Game

The classic 1979 asteroids game using HTML5 canvas and JavaScript
Arrow Keys to turn and thrust
Space-bar to shoot

UPDATE: added local 2-player and a fleshed out menu
Still a work-in-progress. Details about features & plans below

Sprint 1 (ended 5/1/2020)

  • ship controlled by user
  • bullets shoot from ship
  • rocks flying around
  • add collision check to entity (another entity passed in)
  • display fire when accelerating
  • rocks break to smaller rocks on collision
  • bullets die after so many frames
  • bullet & rock collision
  • different color themes
  • ship has lives shown in top left
  • Win state
  • Lose state
  • ship dies on collision w/ rock
  • invulnerability frames make shield around ship

Sprint 2 To do (5/1/20 - 5/11/20)

  • 2 player (local)
  • FIX: ship shouldn't appear if no lives available
    • options: color themes, sound
    • instructions for player(s)
    • 1 or 2 players
  • when players wins/loses, can click screen to return to menu

Sprint 3 To do (5/18/20 - 5/29/20)

  • particle effects when ship or rock explodes
  • sound effects (add mute option to menu)
  • point counter in top right
  • high scores menu option

Backlog

  • starting menu has moving rocks in the background
  • multiple difficulties w/ menu option
  • ship type w/ menu option
  • game mode w/ menu option
  • items to pick up
  • challenge modes:
    • timed
    • thrust always on
    • just enough bullets to win