Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kodesun/bouncy-ball
SFML application that simulates real-world physics utilizing a bouncy ball that you can interact with 📐🎱
https://github.com/kodesun/bouncy-ball
bouncy-ball physics-simulation sfml-game
Last synced: about 2 months ago
JSON representation
SFML application that simulates real-world physics utilizing a bouncy ball that you can interact with 📐🎱
- Host: GitHub
- URL: https://github.com/kodesun/bouncy-ball
- Owner: kodesun
- License: mit
- Created: 2024-05-13T08:17:15.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-14T16:27:13.000Z (3 months ago)
- Last Synced: 2024-10-17T07:56:25.440Z (3 months ago)
- Topics: bouncy-ball, physics-simulation, sfml-game
- Language: C++
- Homepage:
- Size: 1.99 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bouncy Ball 📐🎱
This simple SFML application simulates real-world physics utilizing a little bouncy ball.
Users can interact with the ball, by clicking it and disabling/enabling the gravity
and damping applied to the ball observe it's realistic behavior as it bounces around the screen.## Requirements
- SFML Library - Ensure that you have the SFML library installed.
- C++ Compiler
- CMake (or other linking tool)# Installation
- Make sure to have SFML already installed
- In the project directory run `chmod +x compile.sh` to build and run.## Features
* **Realistic Physics**: The application incorporates real-world physics principles, mainly gravity and damping.
* **Interactive**: Users can interact with the ball by clicking and dragging it around the screen.
* **Visual Feedback**: Demonstrates the effects of gravity, momentum, collisions, acceleration and velocity.## Design
Utilized a simple **_OOP_** approach to separate shared data, window functions, collision detection and ball actions.
A cooler example of a **_state machine_** design can be viewed in my [Flappy Bird](https://github.com/sudfish/Flappy-Bird) recreation.## Demo
![Demo GIF](demo/demo.GIF)
## Controls
* `P` to toggle Pause
* `Q` to Quit
* 'D' to toggle Damping
* 'G' to toggle Gravity
* `Mouse` to drag the ball and give it acceleration---
Feel free to use this however you like.
- [@kodesun](https://github.com/kodesun)