nakamurau1 / space-invaders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Space Invaders Game

This is a modern take on the classic arcade game Space Invaders. Developed using HTML5 Canvas and JavaScript, this project provides an engaging experience with contemporary twists to the original game mechanics.

Features

  • Classic Space Invaders gameplay with a modern touch.
  • Player-controlled spaceship with ability to shoot and dodge enemy fire.
  • Enemies (Invaders) aligned in a grid format, moving and attacking in patterns.
  • Explosive visual effects for enhanced gameplay experience.
  • Score tracking and display.
  • Dynamic background music and sound effects.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Node.js installed on your computer. If you don't have Node.js installed, you can download it from here.

Installing

  1. Clone the repo:

    git clone https://your-repository-url
    cd space-invaders
  2. Install the dependencies:

    npm install
  3. Run the development server:

    npm run dev

    This command will start a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

  4. Build for production:

    npm run build

    This command will build the application for production to the dist folder.

Usage

  • Start the game by pressing the space bar.
  • Use arrow keys to move your spaceship and dodge enemy fire.
  • Shoot the invaders by pressing the space bar.
  • Try to achieve the highest score without getting hit by invaders.

Built With

  • HTML5 Canvas - For rendering game graphics.
  • JavaScript - For game logic and interactivity.
  • Vite - Frontend build tool.
  • TypeScript - Used for adding static type definitions to JavaScript.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

About


Languages

Language:TypeScript 93.5%Language:CSS 3.6%Language:HTML 2.9%