← back to projects

Physics Engine

Custom 2D physics engine in C++ with SFML. Features rigid body dynamics, SAT collision detection, and impulse-based resolution.

2025
c++sfml
view on github ->

2D physics engine built from scratch in C++ with SFML for rendering.

Features

  • Rigid body dynamics - Mass, inertia, friction, and restitution
  • Multiple shapes - Boxes, circles, triangles, and arbitrary convex polygons
  • SAT collision - Separating Axis Theorem for polygon-polygon detection
  • Impulse-based resolution - Friction with Coulomb’s model, angular impulses for rolling
  • Spatial partitioning - Grid-based broad phase for performance