Skip to content

Paradonized/Space-Invaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space-Invaders

Space Invaders made with JS and canvas.
GitHub last commit

How to play

  • w, a, s, d - keys for movement.
  • Space to shoot.

Goal

Last as long as possible and get as many points as possible. Every invader destroyed gives 100 points.

Screenshots

SpaceInvaders_StartScr html SpaceInvaders_Gameplay html SpaceInvaders_GameOverScr html

Assets

Most assets can be changed. Invader's width should be 31 pixels or you will have to make changes in the code.

Optimizations

  • 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.

Future improvements

  • 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.

Known issues

  • 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.

About

Canvas game made with JS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published