A simple 2D physics engine built from scratch in C++ with SDL2.
| Input | Action |
|---|---|
1 |
Pyramid scene |
2 |
Sandbox scene |
R |
Reset current scene |
| Left-click, drag, and release | Spawn and throw a shape |
| Right-click, drag, and release | Launch a heavy cannonball |
Requirements: CMake 3.20+, SDL2, clang (macOS) or gcc (Linux)
brew install cmake sdl2
git clone https://github.com/osteph32/physics2d
cd physics2d
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/physics2d- Allen Chou — Game Physics
- Randy Gaul — Impulse Engine
- Erin Catto — Box2D Lite

