To be able to work with 2D physics, one great open source physics engine is Box2D. This comes with lots of functions that are common for any 2D game built in, so we do not have to reinvent the wheel and write them again.
Go through the following steps:
Go to http://box2d.org/.
Browse to http://box2d.org/downloads/.
Download or clone the latest copy from GitHub.
Build the solution in your version of Visual Studio. Some projects may not work, as they were built in different versions of Visual Studio.
If this throws an error, clean the solution, delete the
bin
folder, and rebuild it.After the solution rebuilds successfully, run the
TestBed
projects.If you can run the application successfully, Box2D has been integrated.