Skip to content

A simple simulation of a ball in Gravity and rebound from a surface using SFML .

Notifications You must be signed in to change notification settings

Mubicool/Ball-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulator

Requires SFML library!

https://github.com/SFML/SFML

This a simple ball bouncing simulator. It was made with only one purpose and that was to learn SFML. It is a very fun beginner coding project. It has edge detection and deflection. Use arrow keys to move the ball around. There are "cout"s to find the actual velocity of the ball in a free fall and the time taken for it to fall (In meters and seconds).You can mess around with the values such as ballSpeed, gravity and bounce fac etc (Try changing the max velocity or bounce factor to make the ball bounce indefinitely). If you haven't studied Object Oriented Programming (classes and objects), you can use the version previous to the OOP conversion and it will still work fine.

Bouncing Ball