I've remade space invaders as a web app as a means of testing my own skills and jsut seeing what was possible when using JS to build games.
No BS here just HTML vanilla CSS and JavaScript working together to stress your GPU out with this years second most computationally expensive re-release of an 80s game
Note: App has been deployed as a page in github pages: https://mikeydiserio.github.io/spatial-invaderz
-
Game plays just as you would expect for the most part. There are no levels though, only a single iteration that you can play through.
-
Shields work but you cant shooty through them like you do in the actual game, that would involve re doing the entire shield code and I ceebs doing that.
- Move Left:
←(Left Arrow Key) - Move Right:
→(Right Arrow Key) - Fire Bullet:
Spacebar - Pause/Unpause Game:
P
To run this project on your local machine, follow these steps:
-
Clone the repository:
git clone [https://github.com/your-username/space-invaders-react.git](https://github.com/your-username/space-invaders-react.git) cd space-invaders-react -
Install dependencies:
npm install
-
Start the development server:
npm start
The application will be available at
http://localhost:3000.
This project provides a solid foundation for many more features:
- Power-Ups: Introduce collectible power-ups dropped by the UFO or special enemies (e.g., rapid-fire, player shield, temporary freeze).
- High Score Leaderboard: Implement a persistent high score system using
localStorageor a backend service. - Sound Effects & Music: Add classic 8-bit sound effects for shooting, explosions, and enemy movement, along with background music.
- Mobile & Touch Controls: Add on-screen buttons and swipe controls to make the game playable on mobile devices.
- More Enemy Variety: Introduce new enemy types with different movement patterns or firing behaviors.
- Arrow Keys: Move and rotate your ship
- Spacebar: Shoot bullets
- R: Restart after Game Over
/src
|-- /app
| |-- page.tsx # Main React component for the game
| |-- types.ts # All TypeScript type and interface definitions
|-- /reducers
| |-- reducers.tsx # The core game logic reducer
|-- README.md # This file
Do whatever you want with this 🎉
Made with ❤️ by mikey who was procrastinating actual useful development in order to make this a thing.