Pyrox Space Pirates is a local multiplayer arcade game built with Python and Pygame. Players take turns piloting a spaceship through a dangerous field of falling rocks, collecting treasure chests, shooting obstacles, and spending points on power-ups before the timer runs out.
- Solo, Duo, and Quad game modes.
- Turn-based local multiplayer with player-name entry.
- Animated intro, story screen, background art, music, and sound effects.
- Falling rocks that become faster and more unpredictable as each turn progresses.
- Treasure collection and laser shooting for score.
- Power-ups for shield, double score, and slow motion.
- End-of-game leaderboard sorted by score.
- Python 3.8 or newer
- Pygame
Install the listed dependency with:
pip install -r requirements.txtIf your package installer cannot find the exact Pygame version listed in
requirements.txt, install Pygame directly:
pip install pygameFrom the project root, run:
python game.pyThe game opens an 800x600 Pygame window.
| Action | Key |
|---|---|
| Move ship | Arrow keys |
| Shoot laser | Spacebar |
| Activate shield | S |
| Activate double score | D |
| Activate slow motion | L |
| Confirm player name | Enter |
| Delete typed character | Backspace |
- Read the intro story and title sequence.
- Select a game mode:
1for Solo2for Duo3for Quad
- Enter each player's name.
- Survive your 90-second turn by avoiding rocks and collecting treasure.
- Shoot rocks with lasers to earn extra points.
- Spend points on power-ups when their prompts appear.
- After every player finishes a turn, the leaderboard displays the final ranking.
| Event | Points |
|---|---|
| Collect treasure | 10 |
| Destroy rock | 5 |
| Collect treasure during double score | 20 |
| Destroy rock during double score | 10 |
| Power-up | Cost | Effect |
|---|---|---|
| Shield | 75 | Protects the ship from rock collisions for 10 seconds. |
| Slow motion | 100 | Slows falling rocks for 8 seconds. |
| Double score | 150 | Doubles treasure and rock-destruction points for 10 seconds. |
Space Pirates/
+-- assets/
| +-- bg_music.wav
| +-- chest.png
| +-- crash_sound.wav
| +-- enter_mode_bg.jpg
| +-- explosion5.png
| +-- intro_music.mp3
| +-- laser_sound.wav
| +-- powerup_sound.wav
| +-- rock.png
| +-- ship.png
| +-- space_bg.jpg
| +-- team_presents_bg.jpg
| +-- treasure_sound.wav
+-- game.py
+-- requirements.txt
+-- README.md
- Run the game from the project root so the relative
assets/paths resolve. - Make sure your audio device is available if Pygame reports mixer or sound errors.
- If dependency installation fails because of the pinned Pygame version, update
requirements.txtto a valid Pygame release or install withpip install pygame.
Ideas, fixes, and improvements are welcome. Useful next improvements include
renaming game.py to a clearer entry point, validating the dependency version,
and extracting game constants into a dedicated configuration section.
No license file is currently included in this repository. Add one before distributing or accepting external contributions.
Special thanks to the Pyrox Team for bringing this project to life.