A small ๐ฎ 2D physics engine that explains mechanics โก in physics engines for educational use โจ.
Cirobb is a 2D Rigid Body Physics Engine inspired by Box2D Lite that was created with the purpose of helping people who are starting in this wonderful world of physics for Videogames. The Engine uses the Erin Cattoโs Contact Persistence Algorithm and itโs implementation of the PGS (Projected Gauss Seidel) solver to solve the MLCP very well known as a SI (Sequential Impulse).
Additionally, it features a straightforward 2D Collision Detection system that efficiently calculates Contact Points, Normal Direction, and Penetration depth. This project aims to provide a clear and detailed understanding of how physics engines work under the hood, making it an ideal learning resource for game developers.
๐ก For more complex simulations with multiple constraints and shapes, we recommend using Box2D, which is considered the best open-source 2D physics engine available.
โจ Direct Solver | Improve Velocity Solver convergence |
๐ Distance Constraint | Optional feature for distance-based constraints |
๐ท Convex Polygons | Collision Detection against convex polygons |
๐ Contact Points | Change from Distance-Based to Feature-Based |
Cirobb is designed as an educational introduction to 2D physics engines. It intentionally maintains simplicity to facilitate learning and understanding of fundamental concepts.