Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.62 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.62 KB

Debris Avoidance Game

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.

🛠️ Technologies Used

  • Python (Main programming language)
  • Pygame (For game development and visualization)
  • Math & Random Modules (For calculations and randomness)

🎮 Gameplay

  • 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.

🚀 Features

  • 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.

🖥️ Installation & Setup

  1. Clone the repository:
    git clone https://github.com/yourusername/debris-avoidance-game.git
  2. Install the required dependencies (make sure you have Python and Pygame installed):
    pip install pygame
  3. Run the game:
    python game.py

🎮 How to Play

  • 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! 😄