Space invaders game in JavaScript canvas