Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Invaders

A modern implementation of the classic Space Invaders game using HTML5 Canvas and JavaScript.

Features

  • Classic Space Invaders gameplay
  • Responsive design for both desktop and mobile devices
  • Touch controls for mobile play
  • High score system using local storage
  • Multiple levels with increasing difficulty

Getting Started

Prerequisites

  • Node.js (v14 or later recommended)
  • npm (comes with Node.js)

Installation

  1. Clone the repository or download the source code
  2. Navigate to the project directory in your terminal
  3. Run npm install to install the dependencies

Development

To run the game in development mode with hot-reloading:

npm run dev

Production Build

To create a production-ready build:

npm run build

The built files will be in the dist directory.

Running the Production Build

To preview the production build:

npm run preview

How to Play

  • Use LEFT and RIGHT arrow keys (or touch controls on mobile) to move your ship
  • Press SPACEBAR (or tap the screen on mobile) to shoot
  • Destroy all invaders to advance to the next level
  • The game ends if an invader reaches your ship's level

Controls

  • Arrow Left/Right: Move ship
  • Spacebar: Shoot
  • P: Pause/Unpause
  • ESC: Quit game (during gameplay or pause)
  • Enter: Start game, confirm name, or restart after game over

License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages