A dynamic Space Invaders-inspired web game with progressive difficulty, multiple ship types, and high score tracking.
- Multiple playable ships with different characteristics
- Progressive difficulty across 5 levels
- Special enemy types (fast aliens and bosses)
- Enemy bombs with increasing frequency
- High score system with JSON storage
- Sound effects with toggle option
- Python 3.8+ (for local setup)
- Docker (optional, for containerized setup)
- Create a Python virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate- Install required packages:
pip install flask flask-sqlalchemy email-validator gunicorn- Set up environment variables:
# Required environment variables
export SESSION_SECRET="your-secret-key"
export ALIENS_PER_ROW=8- Run the application:
python main.py- Build and run using Docker Compose:
docker-compose up --buildThe game will be available at http://localhost:5000
- Left Arrow: Move ship left
- Right Arrow: Move ship right
- Spacebar: Shoot
- Sound toggle button: Enable/disable sound effects
- Three different ships to choose from:
- Classic Ship: Balanced speed and size
- Speed Ship: Faster but smaller
- Power Ship: Slower but larger
- Multiple enemy types:
- Regular aliens
- Fast aliens (higher points, quicker movement)
- Boss aliens (high health, high points)
- Progressive difficulty:
- Levels 1-5 with increasing challenge
- More enemy types appear in higher levels
- Enemy bombs become more frequent
- Higher scores for defeating special enemies
The game tracks and displays the top 10 high scores. Players can save their scores with their names after each game.
-
Check if port 5000 is available on your machine
-
Assets:
- All game assets (ships, aliens) are SVG files in the static/svg directory
- Sound effects are handled through the Tone.js library (no local audio files needed)
When running on Replit:
- The virtual environment setup is not needed
- Dependencies are managed automatically
- Environment variables are configured through Replit's interface
- The game will run automatically on the correct port