Starfield is a simple web-based side-scrolling shooter made for a high school programming assignment in which students developed their own web-based games.

Source code is available under the GPLv3 license on GitHub.

Restarting/stopping the game requires refreshing the screen. Click the game area to stop the Spacebar scrolling the webpage down.


  • WASD keys to move.
  • Spacebar to fire.
  • Mouse cursor to aim.


  • You will be awarded with a point for every enemy you destroy but you will lose a point for every enemy that flies off-screen.
  • Your lasers will be fired towards your mouse cursor but the maximum offset angle the gun will fire at is 90° above or below (i.e. you cannot fire backwards).
  • Your gun has a limited quantity of energy to use to fire lasers. This energy will recharge when the gun is not firing.
  • You have the same amount of health as a single enemy but you also have energy shielding that can take twice as much damage as your health and recharges when you are not hit by enemy fire.
  • Colliding with an enemy ship will cause both your ship and the enemy ship to each take a quantity of damage equal to a ship's full health.

Leave a comment

Log in with to leave a comment.