Float Fall Bouncing is a simple Physics Simulator that shows gravity's effects in different mediums and environments built using the Pygame library. The objective of the project is to control the balls and observe the motion of balls on the ground or in a medium.
- Control multiple balls using mouse inputs.
- Balls bounce off the ground with realistic physics.
- Option to switch between different environments, such as "ground" and "water".
- Option to switch between different object, such as "football" and "basketball".
- Display velocity vectors for each ball.
- Control the density of "Water" using arrow keys.
- Drag, drop, and add balls in interactive mode.
- Python 3.12.2
- Pygame
-
Clone the repository:
git clone https://github.com/kvyns/Float-Fall-Bouncing.git cd Float-Fall-Bouncing
(or)
-
Download the zip file from the repository's GitHub page.
-
Extract the zip file to your desired location.
-
Navigate to the extracted folder
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the file: main.py
python main.py
-
Follow the on-screen instructions to interact with the project.
-
Use the spacebar to make the balls bounce.
-
Press 'ESC' to open the menu screen.
-
Press 'A' to add a new ball.
-
Press 'R' to remove the first ball.
-
Use the arrow keys to adjust the density (only available in certain environments).
main.py
: The main script to run the project.menu.py
: Contains functions for the menu interface.loadScreen.py
: Contains functions for loading screens and displaying the loading animation.vectors.py
: Provides a function to display velocity vectors for the balls.end.py
: Contains the quit screen logic.window.py
: Handles the window configurations.graphics/
: Directory containing various graphics assets used in the project.
This project demonstrates the motion of objects in different environments. The user can control the movement of the these objects (balls). Multiple balls can be added and removed in an environment. There are three environments: ground, water, and moon. Each environment has its own gravity setting. The project uses the Pygame library for graphics.
Special thanks to raunnieo for the visual elements and planning of this project.