Skip to content

A very simple billiard simulation built using SFML. Utilizes a quad tree data structure for efficient collision detection. This is my final project from Advanced Data Structures.

License

Notifications You must be signed in to change notification settings

codeformore/billiard-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Billiard Simulation

This program is a simulation of pool.

Cloned from SFML's CMake project template on GitHub.

How to Use

  1. If you use Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:

    sudo apt update
    sudo apt install \
        libxrandr-dev \
        libxcursor-dev \
        libudev-dev \
        libfreetype-dev \
        libopenal-dev \
        libflac-dev \
        libvorbis-dev \
        libgl1-mesa-dev \
        libegl1-mesa-dev
    
  2. Configure and build your project. Most popular IDEs support CMake projects with very little effort on your part.

    Using CMake from the command line is straightforward as well.

    For a single-configuration generator (typically the case on Linux and macOS):

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    cmake --build build
    

    For a multi-configuration generator (typically the case on Windows):

    cmake -S . -B build
    cmake --build build --config Release
    
  3. Enjoy!

Upgrading SFML

SFML is found via CMake's FetchContent module. FetchContent automatically downloads SFML from GitHub and builds it alongside your own code. Beyond the convenience of not having to install SFML yourself, this ensures ABI compatability and simplifies things like specifying static versus shared libraries.

Modifying what version of SFML you want is as easy as changing the GIT_TAG argument. Currently it uses the latest in-development version of SFML 2 via the 2.6.x tag. If you're feeling adventurous and want to give SFML 3 a try, use the master tag. Beware, this requires changing your code to suit the modified API! The nice folks in the SFML community can help you with that transition and the bugs you may encounter along the way.

About

A very simple billiard simulation built using SFML. Utilizes a quad tree data structure for efficient collision detection. This is my final project from Advanced Data Structures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published