base on Box2D is a 2D physics engine for games ![Box2D Logo](https://box2d.org/images/logo.svg) # Build Status [![Build Status](https://github.com/erincatto/box2d/actions/workflows/build.yml/badge.svg)](https://github.com/erincatto/box2d/actions) # Box2D Box2D is a 2D physics engine for games. [![Box2D Version 3.0 Release Demo](https://img.youtube.com/vi/dAoM-xjOWtA/0.jpg)](https://www.youtube.com/watch?v=dAoM-xjOWtA) ## Features ### Collision - Continuous collision detection - Contact events - Convex polygons, capsules, circles, rounded polygons, segments, and chains - Multiple shapes per body - Collision filtering - Ray casts, shape casts, and overlap queries - Sensor system ### Physics - Robust _Soft Step_ rigid body solver - Continuous physics for fast translations and rotations - Island based sleep - Revolute, prismatic, distance, mouse joint, weld, and wheel joints - Joint limits, motors, springs, and friction - Joint and contact forces - Body movement events and sleep notification ### System - Data-oriented design - Written in portable C17 - Extensive multithreading and SIMD - Optimized for large piles of bodies ### Samples - OpenGL with GLFW and enkiTS - Graphical user interface with imgui - Many samples to demonstrate features and performance ## Building for Visual Studio - Install [CMake](https://cmake.org/) - Ensure CMake is in the user `PATH` - Run `create_sln.bat` - Open and build `build/box2d.sln` ## Building for Linux - Run `build.sh` from a bash shell - Results are in the build sub-folder ## Building for Xcode - Install [CMake](https://cmake.org) - Add Cmake to the path in .zprofile (the default Terminal shell is zsh) - export PATH="/Applications/CMake.app/Contents/bin:$PATH" - mkdir build - cd build - cmake -G Xcode .. - Open `box2d.xcodeproj` - Select the samples scheme - Build and run the samples ## Building and installing - mkdir build - cd build - cmake .. - cmake --build . --config Release - cmake --install . (might need sudo) ## Compatibility The Box2D library and samples build and run on Windows, Linux, and Mac. You will need a compiler that supports C17 to build the Box2D library. You will need a compiler that supports C++20 to build the samples. Box2D uses SSE2 and Neon SIMD math to improve performance. This can be disabled by defining `BOX2D_DISABLE_SIMD`. ## Documentation - [Manual](https://box2d.org/documentation/) - [Migration Guide](https://github.com/erincatto/box2d/blob/main/docs/migration.md) ## Community - [Discord](https://discord.gg/NKYgCBP) ## Contributing Please do not submit pull requests. Instead, please file an issue for bugs or feature requests. For support, please visit the Discord server. # Giving Feedback Please file an issue or start a chat on discord. You can also use [GitHub Discussions](https://github.com/erincatto/box2d/discussions). ## License Box2D is developed by Erin Catto and uses the [MIT license](https://en.wikipedia.org/wiki/MIT_License). ## Sponsorship Support development of Box2D through [Github Sponsors](https://github.com/sponsors/erincatto). Please consider starring this repository and subscribing to my [YouTube channel](https://www.youtube.com/@erin_catto). ## External ports, wrappers, and bindings (unsupported) - Beef bindings - https://github.com/EnokViking/Box2DBeef - C++ bindings - https://github.com/HolyBlackCat/box2cpp - WASM - https://github.com/Birch-san/box2d3-wasm ", Assign "at most 3 tags" to the expected json: {"id":"1714","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"