A real-time 2D physics simulation using Verlet integration, rendered with SFML, written in C++.
This project demonstrates basic particle physics, constraints, and numerical integration techniques commonly used in game engines and physics simulations.
- Implements Verlet integration for particle motion
- Uses SFML for windowing, rendering, and input
- Built with CMake and Ninja
- Dependencies managed using vcpkg
- Runs in real time with interactive visualization
- C++
- SFML
- CMake
- Ninja
- vcpkg
- MSVC (Visual Studio Build Tools)
Make sure you have installed:
-
Visual Studio Build Tools
- MSVC (x64/x86)
- Windows SDK
- CMake tools
-
CMake (3.27+ recommended)
-
Ninja
-
vcpkg
-
SFML (installed via vcpkg)
vcpkg install sfmlFrom the project root:
mkdir build
cd buildRun CMake with Ninja and vcpkg:
cmake -G Ninja ^
-DCMAKE_TOOLCHAIN_FILE=C:/Users/Owner/vcpkg/scripts/buildsystems/vcpkg.cmake ^
..Replace the vcpkg path if yours is installed elsewhere.
cmake --build ..\bin\Verlet.exe- Setting up CMake + Ninja on Windows
- Managing third-party C++ libraries using vcpkg
- Debugging compiler detection and antivirus interference
- Understanding Verlet integration for physics simulation
- Building and running a non-trivial C++ graphics application
- Add collision detection
- Support multiple constraint types
- Refactor physics engine into reusable modules
- Add ImGui debug controls
- Cross-platform build support (Linux/macOS)
Arkesh Jeeva-Rupan: Computer Science (Co-op) – University of Guelph