Skip to content

edsamsankey/obstacle-avoidance-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Obstacle Avoidance Simulator

A Python simulation that demonstrates a robot navigating a screen while avoiding obstacles. This project is a simple and fun example of game development using the Pygame library.

Features

  • A moving robot (represented as a blue circle).
  • Obstacles (red rectangles) that the robot avoids.
  • Random direction changes when the robot collides with obstacles or boundaries.
  • Smooth frame updates for a seamless experience.

Technologies Used

  • Python 3.10+
  • Pygame library

Prerequisites

  1. Python Installed: Make sure you have Python 3.10 or above installed.
  2. Pygame Library: Install Pygame using pip:
    pip install pygame
    

Expected Behavior The robot moves continuously across the screen. When it collides with obstacles or screen edges, it changes its direction randomly. Obstacles remain stationary.

Customization Options Change Robot Speed: Modify robot_speed to adjust the robot's speed. Add More Obstacles: Increase or decrease num_obstacles to change the number of obstacles. Resize the Screen: Adjust WIDTH and HEIGHT for a different screen size.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages