Skip to content

ArkeshJ/VerletSFML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verlet Integration with SFML (C++)

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.

Overview

  • 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

Technologies Used

  • C++
  • SFML
  • CMake
  • Ninja
  • vcpkg
  • MSVC (Visual Studio Build Tools)

Build Instructions (Windows)

Prerequisites

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)

Install Dependencies with vcpkg

vcpkg install sfml

Configure the Build

From the project root:

mkdir build
cd build

Run 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.

Build the Project

cmake --build .

Run the Program

.\bin\Verlet.exe

What I Learned

  • 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

Future Improvements

  • Add collision detection
  • Support multiple constraint types
  • Refactor physics engine into reusable modules
  • Add ImGui debug controls
  • Cross-platform build support (Linux/macOS)

Author

Arkesh Jeeva-Rupan: Computer Science (Co-op) – University of Guelph

About

Real-time 2D physics simulation demonstrating Verlet integration, built with C++, SFML, CMake, and Ninja

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages