Skip to content

osteph32/physics2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physics 2D

A simple 2D physics engine built from scratch in C++ with SDL2.

Pyramid Collapse Sandbox


Controls

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

Build

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

References

About

2D Physics engine built in C++ to demonstrate circle and polygon collisions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors