A 2D side-scrolling shooter game built with Pygame featuring multiple levels, enemy AI, and collectible items.
- Multiple game levels with CSV-based level design
- Player character with shooting and grenade mechanics
- Enemy AI with basic pathfinding and combat
- Collectible items (health, ammo, grenades)
- Environmental hazards (water, obstacles)
- Menu system with level selection
- Sound effects and background music
- Smooth scrolling background with parallax effect
- Health and ammo HUD display
- Python 3.x
- Pygame
- Clone the repository:
git clone https://github.com/mahmudnibir/shooting-game-2.0.git
cd shooting-game-2.0
- Install dependencies:
pip install pygame
- LEFT/RIGHT Arrow Keys: Move
- UP Arrow Key: Jump
- SPACE: Shoot
- RIGHT SHIFT: Throw grenade
- ESC: Quit game
shooting-game-2.0/
โโโ assets/
โ โโโ audio/
โ โ โโโ music2.mp3
โ โ โโโ jump.wav
โ โ โโโ shot.wav
โ โ โโโ grenade.wav
โ โโโ images/
โ โโโ button_image/
โ โโโ player/
โ โโโ enemy/
โ โโโ tile/
โ โโโ explosion/
โ โโโ resources/
โโโ data/
โ โโโ level*.csv
โโโ scripts/
โ โโโ main.py
โ โโโ buttons.py
โ โโโ screen_fade.py
โ โโโ healthbar.py
โ โโโ menu.py
โ โโโ win_msg.py
โโโ requirements.txt
โโโ README.md
- Player can move, jump, shoot bullets, and throw grenades
- Enemies patrol their area and shoot when player is in range
- Collect health packs, ammo, and grenades from item boxes
- Complete levels by reaching the exit point
- Avoid environmental hazards like water
- Health system with damage from bullets and grenades
The game is built using Pygame and follows object-oriented programming principles. Key classes include:
Soldier
: Base class for player and enemy charactersWorld
: Manages level loading and tile-based environmentItemBox
: Handles collectible itemsBullet
andGrenade
: Projectile mechanicsMenu
andWinScreen
: Game state management
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Nibir Mahmud
- Pygame community for resources and documentation