Box2D
A rigid body physics library that simulates collisions, joints, and rays for two-dimensional games, written in portable C
It takes care to curate a safe software space. Help us do more.
&
| + | Continuous Collision Detection | Interpolates and speculatively resolves contacts so fast-moving thin shapes cannot tunnel through geometry. |
|---|---|---|
| + | Multiple Shape Types | Supports circles, capsules, convex polygons, rounded polygons, segments, and chains attached to a single body. |
| + | Joint Variety | Provides revolute, prismatic, distance, mouse, weld, and wheel joints with configurable limits and motors. |
| + | Sensor System | Detects overlap begin and end events without generating a collision response, useful for triggers. |
| + | Ray and Shape Casting | Offers ray casts, shape casts, and overlap queries that game code can use for line-of-sight or pick logic. |
| + | Multithreaded Solver | Distributes solver and broad-phase work across threads to scale with large numbers of bodies. |
| + | SIMD Math | Uses SSE2 and Neon instructions to accelerate vector and matrix operations on supported processors. |
| + | Data-Oriented Design | Organizes internal simulation data for cache efficiency when handling large piles of bodies. |
| + | Cross-Platform Determinism | Produces consistent simulation results across supported operating systems as of the 3.1 release. |
...19 more features/limitations. Contact us to get a complete list of features and system requirements.
System Requirements
| # | Minimum |
|---|---|
| 1 |
|
| 2 | x86/x86-64 CPU (SSE2) or ARM64 CPU (Neon) for default SIMD math |
| 3 |
|
Ratings
4.405
| G2CROWD | 4.45 based on 11 reviews |
|---|
Alternatives
No alternatives found for Box2D.
Do you know of any alternatives that should be here? Feel free to suggest at this page.
Notes
Notes:
- Version 3.0 (Aug 2024) is a ground-up rewrite of the core library from C++ to portable C17, with a breaking API change from the 2.x line; see the migration guide at https://github.com/erincatto/box2d/blob/main/docs/migration.md.
- Box3D, is a separate pre-1.0 3D sibling engine by the same author announced June 2026. Repo