https://github.com/ikpil/box2d.net
Box2D.NET - a port of Box2D, is a 2D physics engine for games, .NET C#, Unity3D, servers
https://github.com/ikpil/box2d.net
2d 2d-game box2d box2d-physics-engine collision collision-detection csharp game game-development physics physics-2d physics-engine physics-simulation rigid-body-dynamics
Last synced: 4 months ago
JSON representation
Box2D.NET - a port of Box2D, is a 2D physics engine for games, .NET C#, Unity3D, servers
- Host: GitHub
- URL: https://github.com/ikpil/box2d.net
- Owner: ikpil
- License: mit
- Created: 2025-02-16T04:05:48.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-06-03T07:32:30.000Z (4 months ago)
- Last Synced: 2025-06-03T19:27:29.487Z (4 months ago)
- Topics: 2d, 2d-game, box2d, box2d-physics-engine, collision, collision-detection, csharp, game, game-development, physics, physics-2d, physics-engine, physics-simulation, rigid-body-dynamics
- Language: C#
- Homepage:
- Size: 2.98 MB
- Stars: 43
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# Box2D.NET
*Box2D.NET is a C# port of the [Box2D](https://github.com/erincatto/box2d) physics engine.*
*If you'd like to support the project, we'd appreciate starring(⭐) our repos on Github for more visibility.*---
[](https://github.com/ikpil/Box2D.NET/blob/main/LICENSE)


[](https://github.com/ikpil/Box2D.NET)
[](https://github.com/ikpil/Box2D.NET/actions/workflows/dotnet.yml)
[](https://github.com/ikpil/Box2D.NET/actions/workflows/codeql.yml)
[](https://github.com/ikpil/Box2D.NET/commits)
[](https://github.com/ikpil/Box2D.NET/issues)
[](https://github.com/ikpil/Box2D.NET/issues)
[](https://www.nuget.org/packages/Box2D.NET)
[](https://www.nuget.org/packages/Box2D.NET)
[](https://github.com/sponsors/ikpil)---
[](https://www.youtube.com/watch?v=_a1QxD4Al_w)
---
## ✨ Features
- 🌿 Purity - Fully implemented in pure C#.
- 💻 Compatibility - Ensuring seamless integration with the .NET platform and Unity3D.
- 🌍 Cross-Platform Support - Easily integrates with all major platforms, including Linux, Windows, macOSBox2D.NET is divided into multiple modules, each contained in its own folder:
- [Box2D.NET](https://github.com/ikpil/Box2D.NET/tree/main/src/Box2D.NET) : A C# port of the Box2D physics engine for 2D physics simulations.
- [Box2D.NET.Shared](https://github.com/ikpil/Box2D.NET/tree/main/src/Box2D.NET.Shared) : Shared code and utilities for Box2D.NET, for use in sample projects and by library users.
- [Box2D.NET.Samples](https://github.com/ikpil/Box2D.NET/tree/main/src/Box2D.NET.Samples) : Sample projects to showcase the features of Box2D.NET
- [Box2D.NET.Test](https://github.com/ikpil/Box2D.NET/tree/main/test/Box2D.NET.Test) : Unit tests for Box2D.NET.## 🚀 Getting Started
- To verify the run for all modules, run [Box2D.NET.Samples](https://github.com/ikpil/Box2D.NET/tree/main/src/Box2D.NET.Samples/Box2D.NET.Samples.csproj)
- on the Windows platform, you need to install the redistributable package
- [Microsoft Visual C++ Redistributable Package](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist)#### ▶️ Running With Command Prompt
```shell
dotnet run --project src/Box2D.NET.Samples --framework net9.0 -c Release
```## 🛠️ Integration
- There are a few ways to integrate [Box2D.NET](https://github.com/ikpil/Box2D.NET/tree/main/src/Box2D.NET) into your project.
- Source integration is the most popular and most flexible. Additionally, NuGet installation will also be supported in the future.## 📚 Documentation & Links
### Box2D.NET Links
- [Box2D.NET/issues](https://github.com/ikpil/Box2D.NET/issues)
### Original Box2D Links
- [box2d.org](https://box2d.org)
- [box2d/issues](https://github.com/erincatto/box2d/issues)
- [box2d.org/documentation](https://box2d.org/documentation/)You can use the original Box2D documentation as a reference, since the Box2D.NET API closely mirrors the original implementation. If you are new to Box2D, we recommend starting with the original documentation to learn the basics and core concepts.
**Key Naming Conventions:**
- Properties and methods: Start with lowercase (matches original Box2D)
- Classes and structs: Start with Uppercase (differs from original Box2D)