A small 2D physics engine

Overview

Box2D-Lite

Box2D-Lite is a small 2D physics engine. It was developed for the 2006 GDC Physics Tutorial. This is the original version of the larger Box2D library. The Lite version is more suitable for learning about game physics.

Building

  • Install CMake
  • Ensure CMake is in the user PATH
  • Visual Studio 2017: run build.bat
  • Otherwise: run build.sh from a bash shell
  • Results are in the build sub-folder

Build Status

Build Status

Issues
  • repeated line on Arbiter.cpp

    repeated line on Arbiter.cpp

    Hi Erin. Thank you for sharing your great articles for physics. I'm studying game physics based on your articles

    I found one repeated line on Arbiter.cpp

    This is first calculation on 137 https://github.com/erincatto/box2d-lite/blob/d9705826ca1589a1dc9d3c45396f4678f30e70a9/src/Arbiter.cpp#L137

    However, it is repeated on 166 https://github.com/erincatto/box2d-lite/blob/d9705826ca1589a1dc9d3c45396f4678f30e70a9/src/Arbiter.cpp#L166

    opened by lch32111 3
  • FeaturePair.value not set correctly?

    FeaturePair.value not set correctly?

    Hi Erin, Thank you for your great illustrative code, it is very good for learning rigid body dynamics.

    From Arbiter::Update, https://github.com/erincatto/box2d-lite/blob/227b71b6974ea57ab7e96d40f6374287bd6a0e77/src/Arbiter.cpp#L40-L50 I think FeaturePair.value is used to distinguish contacts. While in Collide.cpp where contacts are computed, the only place to set value is in ClipVertex's constructor which set value=0. https://github.com/erincatto/box2d-lite/blob/227b71b6974ea57ab7e96d40f6374287bd6a0e77/src/Collide.cpp#L44-L49 Does it seem like this value is not correctly assigned for its purpose?

    Thank you.

    opened by huweiATgithub 2
  • Collide separation name conflict

    Collide separation name conflict

    Hello, I'm trying to study it and try to rewrite box2dlite in c #, but I have a little problem I'm not sure in which Collide method used in the separation, you can show or put under "float separation = Dot (frontNormal, clipPoints2 [I] v) - front;" Change the name? Thank you very much! // I'm sorry I don't speak English so the above is from Google

    opened by aliveanyang 0
  • Emscripten support

    Emscripten support

    See samples just now in your browser!

    Add GLEW library. Upgrade ImGui library and move from opengl2 to opengl3 bindings. Move from legacy rendering to OpenGL2/WebGL1 with programmed pipeline.

    opened by podsvirov 0
Releases(1.0.1)
  • 1.0.1(Jan 19, 2019)

    This is the initial release of box2d-lite.

    A minor update was made to remove the usage of git submodules because GitHub does not support them for releases.

    Source code(tar.gz)
    Source code(zip)
A small 2D physics engine

Box2D-Lite Box2D-Lite is a small 2D physics engine. It was developed for the 2006 GDC Physics Tutorial. This is the original version of the larger Box

Erin Catto 619 Jun 23, 2022
A small data-oriented and SIMD-optimized 3D rigid body physics library.

nudge Nudge is a small data-oriented and SIMD-optimized 3D rigid body physics library. For more information, see: http://rasmusbarr.github.io/blog/dod

null 231 Jun 10, 2022
Box2D is a 2D physics engine for games

Build Status Box2D Box2D is a 2D physics engine for games. Contributing Please do not submit pull requests with new features or core library changes.

Erin Catto 5.7k Jun 27, 2022
2D physics engine for games

LiquidFun Version 1.1.0 Welcome to LiquidFun! LiquidFun is a 2D physics engine for games. Go to our landing page to browse our documentation and see s

Google 4.4k Jun 21, 2022
Nimble: Physics Engine for Deep Learning

Nimble: Physics Engine for Deep Learning

Keenon Werling 263 Jun 23, 2022
Bounce is a 3D physics engine for games.

Bounce Welcome! Bounce is a 3D physics engine for games. Features Common Efficient data structures with no use of STL Fast memory allocators Built-in

Irlan Robson 64 Jun 25, 2022
Godot bindings for the Rapier3D physics engine

Godot bindings for the Rapier3D physics library How to use There are two parts: A Godot module which must be compiled with the engine.

David Hoppenbrouwers 23 Jun 20, 2022
SKR_Physics is a lightweight and easy to use 2D physics engine which is written in C++.

SKR_Physics SKR_Physics is a lightweight and easy to use 2D physics engine which is written in C++. Features Rectangle based collision system Very sim

Şükrü 0 Mar 8, 2022
Sequential impulses physics engine made for learning purposes

A 3D physics engine that uses Separating Axis Test for collision detection, the clipping method for generating contact manifold, contact point reducti

Ahmad Saleh 1 Nov 24, 2021
Box2D is a 2D physics engine for games

Build Status Box2D Box2D is a 2D physics engine for games. Contributing Please do not submit pull requests with new features or core library changes.

Erin Catto 5.7k Jul 2, 2022
Open source C++ physics engine library in 3D

ReactPhysics3D ReactPhysics3D is an open source C++ physics engine library that can be used in 3D simulations and games. www.reactphysics3d.com ?? Fea

Daniel Chappuis 1k Jun 30, 2022
Improved version of real-time physics engine that couples FEM-based deformables and rigid body dynamics

Enhanced version of coupled FEM and constrained rigid body simulation Description This little playground aimed to test our Conjugate Gradients based M

Andrey Voroshilov 25 Apr 11, 2022
Real-time oriented physics engine and library that's currently best suited for 2D games.

PlayRho A way to play with physical behaviors like the conservation of momentum. PlayRho is a real-time oriented physics engine and library that's cur

Louis Langholtz 85 Jun 25, 2022
Phyxed is a 2D physics engine with support for fixed point math.

Phyxed is a 2D physics engine with support for fixed point math.

Anders Elfgren 23 Jan 18, 2022
A 2D Physics Engine written in C++, supporting circles and orientable, non-regular convex polygons.

PhysicsEngine A basic physics engine supporting circles and orientable non-regular convex polygons. Oh, and it has undamped springs and strings. Demo

ThePythonator 3 Mar 19, 2022
Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.

Horde3D Horde3D is a 3D rendering engine written in C++ with an effort being as lightweight and conceptually clean as possible. Horde3D requires a ful

Volker Vogelhuber 1.2k Jun 22, 2022
C++11 header-only library that offers small vector, small flat map/set/multimap/multiset.

sfl library This is header-only C++11 library that offers several new containers: small_vector small_flat_set small_flat_map small_flat_multiset small

null 10 Jun 30, 2022
A fast and lightweight 2D game physics library.

NEW IN CHIPMUNK 7 Chipmunk 7 is complete and now includes the ARM NEON optimizations, the autogeometry code, and the mulithreaded solver. The latest p

Scott Lembcke 1.8k Jun 23, 2022
C++ library for multi-physics simulation

Project CHRONO Project Chrono represents a community effort aimed at producing a physics-based modelling and simulation infrastructure based on a plat

null 1.4k Jun 25, 2022
High-performance C++ multibody dynamics/physics library for simulating articulated biomechanical and mechanical systems like vehicles, robots, and the human skeleton.

Simbody Simbody is a high-performance, open-source toolkit for science- and engineering-quality simulation of articulated mechanisms, including biomec

Simbody Project 1.9k Jun 27, 2022
Real-time multi-physics simulation with an emphasis on medical simulation.

Introduction SOFA is an open source framework primarily targeted at real-time simulation, with an emphasis on medical simulation. It is mainly intende

SOFA Framework 617 Jun 24, 2022
This the contains the test examples and validator tool for the ISPD2021 Wafer-Scale Physics Modeling contest.

This readme documents information regarding the validator/scorer which will be used for the 2021 ISPD Contest problem: Wafer-Scale Physics Modelling

Cerebras 15 Jan 6, 2022
C++ library for multi-physics simulation

Project Chrono represents a community effort aimed at producing a physics-based modelling and simulation infrastructure based on a platform-independent, open-source design.

null 1.4k Jun 23, 2022
Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.

The Algorithms - C # {#mainpage} Overview The repository is a collection of open-source implementation of a variety of algorithms implemented in C and

The Algorithms 13.8k Jun 24, 2022
Natively multithreaded physics for threejs with PhysX.

Three-Physx Natively multithreaded physics for threejs with PhysX and an easy interface. Credit to Milkshake inc, physx-js, three-ammo, three-to-canno

XR Foundation 12 Jun 6, 2022
A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

Jolt Physics Library A multi core friendly rigid body physics and collision detection library suitable for games and VR applications. A YouTube video

null 1.8k Jun 27, 2022
Integrate the ZENO node system into Blender for creating robust physics animations!

ZenoBlend Integrate the ZENO node system into Blender for creating robust physics animations! End-user Installation Goto Release page, and click Asset

Zenus Technology 31 Jun 10, 2022
A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

null 1.8k Jun 24, 2022
Multi-Joint dynamics with Contact. A general purpose physics simulator.

Multi-Joint dynamics with Contact. A general purpose physics simulator.

DeepMind 4.5k Jun 28, 2022