Box2D is an open-source, high-performance 2D physics engine designed for games and interactive simulations. Written in portable C17, it simulates rigid bodies, collisions, gravity, and physical constraints. The engine supports circles, capsules, polygons, rounded shapes, segments, and connected chains. Continuous collision detection improves accuracy when objects move or rotate rapidly. Developers can construct mechanical systems using revolute, prismatic, distance, motor, weld, and wheel joints. Its Soft Step solver, multithreading, and SIMD optimizations efficiently handle complex scenes containing many objects. Additional capabilities include character movement, collision queries, sensors, deterministic simulation, and state restoration. Interactive examples help developers explore its physics behavior.

Features

  • High-Performance 2D Rigid Body Simulation
  • Continuous Collision Detection and Contact Events
  • Multiple Collision Shapes and Spatial Queries
  • Configurable Physics Joints and Motors
  • Multithreaded and SIMD-Optimized Execution
  • Deterministic Simulation and State Snapshots

Project Samples

Project Activity

See All Activity >

Categories

Physics

License

MIT License

Follow Box2D

Box2D Web Site

Other Useful Business Software
Host LLMs in Production With On-Demand GPUs Icon
Host LLMs in Production With On-Demand GPUs

NVIDIA L4 GPUs. 5-second cold starts. Scale to zero when idle.

Deploy your model, get an endpoint, pay only for compute time. No GPU provisioning or infrastructure management required.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Box2D!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

C

Related Categories

C Physics Software

Registered

6 days ago