Box2D logo Box2D logo background glow

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.

Platform

Desktop
Language
C

Social

System Requirements

#Minimum
1
  • Windows
  • Linux
  • macOS
2
x86/x86-64 CPU (SSE2) or ARM64 CPU (Neon) for default SIMD math
3
  • Compiler: C17-capable for the core library; a C++20-capable compiler (Visual Studio) is needed only to build the bundled samples app
  • Build tool: CMake 3.22 or newer

Ratings

4.40
5

G2CROWD
4.4
5
based on 11 reviews

Developer

Written in

C

Initial Release

2007-09-11

Repository

License

Categories

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: