Space Invaders made with JS and canvas.
- w, a, s, d - keys for movement.
- Space to shoot.
Last as long as possible and get as many points as possible. Every invader destroyed gives 100 points.
Most assets can be changed. Invader's width should be 31 pixels or you will have to make changes in the code.
setTimeout(() => {...}, 0);- In order to get the quickest response possible from the machine, that runs the script. It can also be adjusted for better gameplay experience.- Garbage collection for all elements of the game (projectiles, invaders, grids).
- Using the same particles on the screen to visualize stars instead of deleting them and creating new ones.
- Adding a database to keep scores, times and player initials in game over screen.
- Adding boosts & perks for the player to use during playthrough.
- Adding difficulty modifier.
- Adding different invaders that behave differently.
- Play again refreshes the page instead of resetting the state of the game.
- Caps locked or different language input for movement is ignored by the script.
- There is a bug with the timer when the game ends. Timer briefly sets itself to 00:00 before goinfg to the game over screen. It does not affect the game over screen result. This bug rarely appears.


