A Modern Space Invaders Clone - Pure Python + Pygame with HD graphics, progressive difficulty, and complete gameplay polish.
Version: 1.0.0 (April 14, 2026)
Space-Strike is a feature-complete arcade game inspired by the classic Space Invaders. It combines retro gameplay mechanics with modern quality-of-life features:
- 15+ Progressive Waves with increasing difficulty
- Difficulty Modes (Easy, Normal, Hard) that scale gameplay
- HD Graphics at 1280x800 with modern card-based UI
- Generated Audio with harmonic synthesis fallback
- Persistent Settings saved to JSON
- Accurate Game Timer that excludes paused time
- Windows EXE Build ready to distribute
git clone https://github.com/Santoshkrishna-code/Space-Strike.git
cd Space-Strike
python -m venv .venv
.\.venv\Scripts\activate # Windows
source .venv/bin/activate # macOS/Linux
pip install -r requirements.txt
python main.pyDirect download: Space-Strike.exe
Simply download and run - no Python installation needed.
Or visit the Releases page for version history.
| Action | Key(s) |
|---|---|
| Move Left/Right | โ โ Arrow Keys |
| *Controls |
| Action | Key |
|---|---|
| Move Left/Right | Left/Right Arrow Keys |
| Shoot | Spacebar |
| Open Settings | S |
| Pause/Resume | P |
| Start Game | Enter (from menu) |
| RFeatures |
- Wave Progression: Aliens increase in count and speed every 2 waves
- Destructible Shields: 4 shields with hit damage tracking
- Alien Bombs: Random bomb drops that increase per wave
- Mystery Ship: Bonus points for eliminating the UFO
- Combo System: Consecutive hits without damage boost score multiplier
- Grace Period: 3.2s protection at wave start (scales with difficulty)
- Staged Descent Animation: Frame-based movement with column stagger
- Wave-Based Scaling:
- Alien horizontal speed (0.72 to 1.25 px/frame across waves)
- Bomb drop chance (0.5% to 5% per frame)
- Drop distance (10 to 22 pixels)
- Animation speed (1.8 to 4.4 px/frame)
- Descent stagger delays (3 frames to 1 frame)
- Difficulty Modes: Easy (slower aliens, more grace), Normal (baseline), Hard (faster aliens, more bombs)
- Audio Mixer: Independent Master, Music, SFX sliders (0-100%)
- Persistent Profile: Auto-saves to user_settings.json
- Card-Based HUD: 4-panel layout (Score/Hi, Wave/Time, Combo/Difficulty, Lives)
- Centered Menu: Modern design with star background
- Settings Panel: Row-based navigation with visual feedback
- Playfield Frame: Side rails for visual structure
- Time Display: MM:SS format, paused-time excluded
- Fallback Synthesis: All SFX procedurally generated if assets missing
- Harmonic Layering: Multi-frequency tones for richer sound
- Volume Controls: Per-channel mixing in settings
Space-Strike/
|-- main.py Entry point
|-- game.py Game loop, state machine, wave logic
|-- settings.py Global constants and config
|-- __version__.py Version metadata
|-- requirements.txt Pip dependencies
|-- main.spec PyInstaller specification
|-- README.md This file
|
|-- core/ Game mechanics
| |-- __init__.py
| |-- player.py Player sprite, movement, shooting
| |-- alien.py Alien fleet, bombs, descent logic
| |-- bullet.py Player bullets
| |-- bomb.py Alien bombs
| |-- base.py Destructible shields
| |-- collision.py Collision detection
|
|-- ui/ User interface
| |-- __init__.py
| |-- hud.py In-game HUD (score, timer, waves)
| |-- menu.py Main menu screen
| |-- game_over.py Game over screen
| |-- settings_menu.py Settings/options screen
| |-- button.py UI button component
|
|-- utils/ Utilities
| |-- __init__.py
| |-- asset_loader.py Image/sound/font loading + synthesis
| |-- helpers.py Utility functions
|
|-- assets/ Game assets (optional)
| |-- fonts/ .ttf font files
| |-- images/ .png sprite sheets
| |-- sounds/ .wav audio files
|
|-- build/ PyInstaller build artifacts
|-- main/ Intermediate build files
| Component | Technology | Version |
|---|---|---|
| Language | Python | 3.12.6+ |
| Game Engine | Pygame | 2.6.1+ |
| Audio Synthesis | struct + wave modules | Python stdlib |
| Bundler | PyInstaller | 6.19.0+ |
| VCS | Git + GitHub | Latest |
Each wave introduces gradually increasing challenge:
| Metric | Wave 1 | Wave 5 | Wave 10 | Wave 15 |
|---|---|---|---|---|
| Alien Grid | 3x7 | 4x9 | 5x11 | 5x11 |
| Horizontal Speed | 0.72 px/f | 1.04 px/f | 1.25 px/f | 1.25 px/f |
| Bomb Chance | 0.5% | 1% | 2% | 2.5% |
| Drop Distance | 10 px | 14 px | 18 px | 22 px |
| Drop Speed | 1.8 px/f | 2.6 px/f | 3.4 px/f | 4.4 px/f |
Easy Mode:
- Alien speed: 0.7x
- Bomb spawn chance: 0.5x
- Grace period: +4.8s (vs 3.2s base)
- Max bombs: 0.7x
Normal Mode:
- Baseline (no multiplier)
Hard Mode:
- Alien speed: 1.3x
- Bomb spawn chance: 1.5x
- Grace period: 0.5x (1.6s)
- Max bombs: 1.3x
Configuration
All game settings are stored in user_settings.json (auto-created on first launch):
{
"difficulty": "normal",
"master_volume": 0.9,
"music_volume": 0.35,
"sfx_volume": 0.8
}Edit this file to change defaults, or use the in-game Settings menu (press S Edit this file to change defaults, or use the in-game Settings menu (press S).
Building the EXE
To create a standalone Windows executable:
pip install pyinstaller
pyinstaller main.spec --cleanOutput: dist/Space-Strike.exe
The EXE bundles Python, all dependencies, and game assets into a single ~150MB executable without Python installation required The EXE bundles Python, all dependencies, and game assets into a single ~150MB executableโno installation required for end users.
Scoring
- Alien Kill: 10 points (row 1) to 40 points (row 3)
- Shield Block: +1 hit durability tracked
- Mystery Ship: 100-300 bonus points (random)
- Combo Multiplier: +10% per consecutive hit (resets on damage
-
*Known Limitations
-
Windows Only: EXE build via PyInstaller is Windows-specific. macOS/Linux users must run from source.
-
Fullscreen Not Implemented: Run in windowed mode only.
-
No Mouse Support: All navigation is keyboard-based.
-
Asset Dependencies Optional: Game generates audio and
FouContributing
Found a bug or have a feature request? Open an Issue or submit a Pull Request.
Development Setup:
git clone https://github.com/Santoshkrishna-code/Space-Strike.git
cd Space-Strike
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
pip install pyinstaller
python main.py
---
## ๐ License
This project is licensed under the **MIT License**. See [LICENSE](LICENSE) for details.
---
License
This project is licensed under the MIT License. See LICENSE
### Version 1.0.0 (April 14, 2026)
- โจChangelog
### Version 1.0.0 (April 14, 2026)
- Initial release
- Complete gameplay loop with 15+ waves
- Difficulty settings and persistent profile
- Modern HD UI (1280x800) with card-based HUD
- Fallback audio synthesis system
- Windows EXE packaging
- Accurate in-game timer and stats
-
## ๐ Credits
Built with โค๏ธ using **[Pygame](https://www.pygame.org/)** and **[PyInstaller](https://pyinstaller.org/)**.
Credits
Built with Pygame and PyInstaller.
Inspired by the classic arcade game Space Invaders (1978).
## Support
For questions or issues, please open a GitHub Discussion or contact the maintainer.
Play Space-Strike now and climb the leaderboard!
โโโ ui/
โ โโโ __init__.py
โ โโโ button.py
โ โโโ game_over.py
โ โโโ hud.py
โ โโโ menu.py
โโโ utils/
โ โโโ __init__.py
โ โโโ asset_loader.py
โ โโโ helpers.py
โโโ assets/
โ โโโ fonts/
โ โ โโโ arcade.ttf
โ โโโ images/
โ โ โโโ alien1.png
โ โ โโโ alien2.png
โ โ โโโ alien3.png
โ โ โโโ background.png
โ โ โโโ base.png
โ โ โโโ bomb.png
โ โ โโโ bullet.png
โ โ โโโ explosion.png
โ โ โโโ player.png
โ โโโ sounds/
โ โโโ alien_move.wav
โ โโโ background_music.mp3
โ โโโ explosion.wav
โ โโโ game_over.wav
โ โโโ shoot.wav
โโโ build/- Menu screen with animated starfield and blinking prompt.
- Top HUD bar showing score and remaining lives.
- Retro color palette and arcade font.
- Semi-transparent game-over overlay with final score.
- Smooth state transitions: menu -> playing -> game over -> restart.
- shoot.wav: player bullet fire
- explosion.wav: alien/mystery explosion
- alien_move.wav: fleet edge-drop movement cue
- game_over.wav: player death/game over cue
- background_music.mp3: looping background track
If sound/font/image files are missing or invalid, safe fallbacks are used so gameplay still works.
Use this command so images/sounds/fonts are bundled correctly:
pyinstaller --onefile --noconsole --add-data "assets;assets" main.pyOutput:
- dist/main.exe
Do not commit large EXE binaries to source folders. Use GitHub Releases:
- Push source code to GitHub.
- Build EXE locally.
- Create release tag (example: v1.0.0).
- Upload dist/main.exe as a release asset.
- Share the release URL for download.
Use this prompt with ChatGPT/Copilot to regenerate or extend the game:
Build a complete, fully playable 2D Space Invaders desktop game using Python and Pygame.
Requirements:
- Player ship at bottom moves left/right only.
- Player shoots bullets upward with SPACE.
- Alien grid (5 rows x 11 columns) moves horizontally as one group.
- On edge hit: aliens move down, reverse direction, and slightly increase speed.
- Aliens can be destroyed individually.
- Aliens randomly drop bombs downward.
- Add destructible shield bases between player and aliens.
- Collision handling for:
- player bullets vs aliens
- alien bombs vs player
- bullets/bombs vs shields
- Player starts with 3 lives.
- Game over when lives are zero or aliens reach bottom.
- Score increases when aliens are destroyed.
- UI states: start menu, playing, game over, restart option.
- Display score and lives in HUD.
- Include mystery ship bonus target.
- Add sound effects and looping background music.
- Organize code into modules:
- main.py, game.py, settings.py
- core/: player, alien, bullet, bomb, base, collision
- ui/: menu, hud, game_over, button
- utils/: asset_loader, helpers
- Keep code clean, readable, class-based, and extendable.
- Provide run instructions and Windows build instructions.
- Build command must include assets:
pyinstaller --onefile --noconsole --add-data "assets;assets" main.py
Output complete runnable code.