Welcome to the Centipede game developed using Python and Pygame! This project is part of our end-of-year project for the first year of Engineering studies. All images are designed by my colleague Samia Benali.
Centipede is an arcade game where the player controls a dwarf character, navigating through levels that progressively become more challenging. The objective is to shoot and eliminate enemies to gain points. The highest score is displayed and saved after each game session. The game includes sounds and different colors based on the level progression.
- Progressive difficulty levels
- Different points for different targets
- High score display and storage
- Directional movement with arrow keys
- Shooting with the space bar
- Sound effects for various actions
- Dynamic color changes based on levels
- Dark mode and light mode: Switch between dark and light modes during gameplay
Ensure you have Python installed on your system. You can download it from python.org.
-
Clone the repository:
git clone https://github.com/yourusername/centipede-game-python.git cd game-centipede-python -
Install the required packages
- On Windows:
pip install -r requirements.txt
- On Linux:
sudo apt install python3-venv python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
Si tu veux, je peux aussi te faire une version encore plus concise et professionnelle adaptée pour un README. Veux‑tu que je fasse ça ?
-
Run the game:
python main.py
-
Use the following controls to play:
- Arrow keys to move the dwarf
- Space bar to shoot
- Toggle dark/light mode: Press the button to switch between dark and light modes
- Movement: Use the arrow keys to move the dwarf character up, down, left, and right.
- Shooting: Press the space bar to shoot at enemies.
- Scoring: Earn points by hitting different targets, with varying points for each type.
- Levels: As you progress through the levels, the game becomes increasingly challenging with more enemies and obstacles.
- Colors: The game’s color scheme changes with each level to enhance the visual experience.
- Sounds: Different sounds play based on the player's actions, like shooting or hitting targets.
- Modes: Switch between dark and light modes during gameplay by pressing
D.
- Samia Benali for designing all the images used in the game.
- Our professors and mentors for their guidance and support.
Enjoy the game and happy coding!