/Ball_Bounce_Simulation

A ball bouncing off the screen walls simulation in python using pygame, which is later converted to an executable file using pyinstaller

Primary LanguagePython


Ball Bouncing Off Screen Walls Simulation 🎱

This project demonstrates a simple ball bouncing off the screen walls simulation using Pygame. The ball moves around the screen, bouncing off the edges, simulating realistic movement and collisions.

Table of Contents 📚

Ball Bouncing Simulation

Requirements 🛠️

  • Python 3.7 or higher 🐍
  • Pygame library 🎮
  • PyInstaller ⚙️

Installation 🚀

  1. Clone the repository:

    git clone https://github.com/yourusername/ball-bouncing-simulation.git
    cd ball-bouncing-simulation
  2. Install the required Python packages:

    pip install pygame
    pip install pyinstaller

Usage 💻

To run the simulation, simply execute the Python script:

python ball_bouncing_simulation.py

Building Executable 📦

To convert the Python script into an executable file, use PyInstaller:

  1. Navigate to the project directory:

    cd ball-bouncing-simulation
  2. Run PyInstaller:

    pyinstaller --onefile ball_bouncing_simulation.py
  3. After the build process is complete, you can find the executable in the dist folder.


Feel free to reach out if you have any questions or need further assistance! 😊

Happy coding! 🎉