This is a simple Debris Avoidance Game where you control a robot that navigates around a field filled with randomly placed debris. The objective is to avoid collisions and accumulate as high a score as possible.
- Python (Main programming language)
- Pygame (For game development and visualization)
- Math & Random Modules (For calculations and randomness)
- You control a robot in a field filled with debris.
- The robot tries to avoid debris autonomously by changing direction.
- Debris is randomly generated at the start, and you gain points by staying collision-free.
- The game is over once you quit the window.
- Dynamic Collision Avoidance: The robot detects and avoids debris using an increased detection radius.
- Random Movement: Upon collision or boundary hit, the robot changes its direction randomly.
- Score System: Gain points for avoiding debris and lose points on collisions.
- Clone the repository:
git clone https://github.com/yourusername/debris-avoidance-game.git
- Install the required dependencies (make sure you have Python and Pygame installed):
pip install pygame
- Run the game:
python game.py
- The robot moves automatically.
- Avoid collisions with debris to keep your score high.
- Watch out for screen boundaries — the robot will change direction if it hits one.
Feel free to contribute to this project by opening issues and submitting pull requests!
Happy coding! 😄