A simple 2D space shooting game built with pygame-ce.
Control your spaceship using WASD keys and navigate through the starfield while dodging meteors and firing lasers.
Space-Shooter/
├── audio
│ ├── damage.ogg
│ ├── explosion.wav
│ ├── game_music.wav
│ └── laser.wav
├── images
│ ├── explosion
│ │ ├── *.png
│ │ ├── ..
│ ├── laser.png
│ ├── meteor.png
│ ├── Oxanium-Bold.ttf
│ ├── player.png
│ └── star.png
├── main.py
└── README.md
- Player spaceship movement using WASD.
- Randomly generated stars as background.
- Static meteor and laser sprites.
- Explosion sprite sheet for future animation.
- Audio files included (laser, damage, explosion, music).
- Smooth movement with
pygame.math.Vector2.
⚠️ Currently, the player can move outside the window border.
No boundary collision is implemented yet.
Follow these steps to set up and run the project:
git clone https://github.com/Hasib-4174/Space-shooter.git
cd space-shooter# Create virtual environment
python -m venv pygame_venv
# Activate it
# On Linux/macOS:
source pygame_venv/bin/activate
# On Windows:
pygame_venv\Scripts\activatepip install pygame-cepython main.pydeactivate| Key | Action |
|---|---|
| W | Move Up |
| A | Move Left |
| S | Move Down |
| D | Move Right |
No preview!!
> *(Add a screenshot or GIF of the gameplay here)*-->- Add boundary collision (prevent player from leaving the screen).
- Implement shooting mechanics with laser projectiles.
- Add enemy ships and AI movement.
- Animate explosions using the sprite sheet.
- Play background music and sound effects.
This game was created while following a Pygame tutorial as part of my learning journey.
I have customized and experimented with different features (like WASD movement) to understand how game loops, event handling, and sprite rendering work in pygame-ce.
This project is both a practice exercise and a foundation for building more advanced games in the future.