A modern, futuristic take on the classic Space Invaders arcade game built with Next.js, TypeScript, and HTML5 Canvas.
Visit the live demo: Deploy on Vercel
- Classic Gameplay: Authentic Space Invaders experience with modern enhancements
- Futuristic Design: Neon colors, glow effects, and sleek visuals
- Complete Game Mechanics:
- Player movement and shooting
- Multiple invader types (Squid, Crab, Octopus) with different point values
- UFO bonus targets
- Destructible bunkers for protection
- Progressive difficulty with level advancement
- Lives and scoring system
- High score persistence
- Responsive Controls: Smooth keyboard controls with arrow keys and spacebar
- Game States: Menu, playing, paused, game over, and level complete screens
- Arrow Keys (← →): Move your spaceship left and right
- Spacebar: Fire bullets at invaders
- P: Pause/Resume the game
- R: Restart after game over
- Enter: Start game from menu
- Node.js 18+ installed
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/MyTH-AI-JP/claude-code-test.git cd claude-code-test- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
npm run build npm startThe easiest way to deploy this Space Invaders game is using Vercel:
Or deploy manually:
- Install Vercel CLI:
npm i -g vercel- Deploy:
vercelNo environment variables are required for this game.
- Framework: Next.js 15
- Language: TypeScript
- Styling: Tailwind CSS
- Rendering: HTML5 Canvas
- Deployment: Vercel
claude-code-test/ ├── src/ │ ├── app/ │ │ ├── page.tsx # Main page component │ │ ├── layout.tsx # App layout │ │ └── globals.css # Global styles │ ├── components/ │ │ └── SpaceInvaders.tsx # Main game component │ ├── constants/ │ │ └── game.ts # Game configuration │ ├── types/ │ │ └── game.ts # TypeScript interfaces │ ├── hooks/ │ │ └── useGameLoop.ts # Game loop hook │ └── utils/ │ └── collision.ts # Collision detection ├── public/ # Static assets ├── package.json └── README.md - Octopus Invaders: 10 points
- Crab Invaders: 20 points
- Squid Invaders: 30 points
- UFO: 50-300 points (random)
- Invaders move horizontally and drop down when reaching screen edges
- Speed increases with each level
- Player has 3 lives
- Bunkers provide destructible cover
- UFO appears randomly for bonus points
Feel free to open issues or submit pull requests for improvements!
This project is open source and available under the MIT License.
Created with ❤️ by MyTH-AI-JP using Claude Code