HughPH.Box2D
2025.3.10.2104
dotnet add package HughPH.Box2D --version 2025.3.10.2104
NuGet\Install-Package HughPH.Box2D -Version 2025.3.10.2104
<PackageReference Include="HughPH.Box2D" Version="2025.3.10.2104" />
<PackageVersion Include="HughPH.Box2D" Version="2025.3.10.2104" />
<PackageReference Include="HughPH.Box2D" />
paket add HughPH.Box2D --version 2025.3.10.2104
#r "nuget: HughPH.Box2D, 2025.3.10.2104"
#addin nuget:?package=HughPH.Box2D&version=2025.3.10.2104
#tool nuget:?package=HughPH.Box2D&version=2025.3.10.2104
Box2D-dotnet-bindings
Box2D 3.x Bindings for dotnet (C#, F#, VB, ...)
What is it?
This is a "link" from dotnet to Box2D 3.x, with an API that should be more familiar and comfortable to dotnet users. World has a Bodies property, Body has a Shapes property and a Joints property, and so on. Delegates are fully formed, rather than being vague IntPtrs. All methods and most properties are PascalCased and have XML documentation.
How is this better than Box2D.NetStandard/another port of Box2D 2.x?
Box2D 3.x contains significant efficiency improvements that make use of SIMD intrinsics. While it's not impossible to implement in C# - intrinsics have been available since dotnet 6 - it's probably unlikely that Box2D 3.x will be ported into Box2D.NetStandard: one of the challenges with Box2D.NetStandard has always been keeping it up-to-date with changes to Box2D 2.x, and the performance was never on par. Since Box2D 3.x builds to shared libraries, it makes much more sense all round to simply write bindings to that library than to put time into porting it. It also means I can target .net standard 2.1 instead of dotnet 6 or above.
How is this better than Hexa.NET.Box2D or Box2D.NET?
Hexa.NET.Box2D and Box2D.NET are auto-generated with code generators, and are direct mappings of the Box2D API. This, by contrast, is a hand-crafted API that is designed to be more idiomatic to dotnet coders. These bindings also have full XmlDoc comments and fully defined delegates. In this case "better" is probably subjective: Hexa.NET.Box2D and Box2D.NET are API-complete in that they include DynamicTree functions, while this library brings quality of life improvements. This API is complete up to 3.0.0 and will be upgraded to 3.1.0 as early as possible.
Getting things working
Just install this package. It should work. If not, please raise an issue in the github repository: https://github.com/HughPH/Box2D-dotnet-bindings/issues
Known limitations / quirks
- The native binaries are built from Erin's Box2D mainline, not the latest release tag. This will capture any latest bugfixes, but could introduce bugs - in which case, revert to the previous version.
- Extensions to the Box2D API won't appear automagically. Please feel free to submit a PR if you want to add something.
- The native binaries are built for Windows x64 and Linux x64 only.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2025.3.10.2104 | 149 | 3/10/2025 | |
2025.3.10.2005 | 151 | 3/10/2025 | |
2025.3.10.1207 | 154 | 3/10/2025 | |
2025.3.10.1105 | 147 | 3/10/2025 | |
2025.3.3.1643 | 190 | 3/3/2025 | |
2025.3.3.247 | 109 | 3/3/2025 | |
2025.3.3.238 | 123 | 3/3/2025 | |
2025.3.3.140 | 116 | 3/3/2025 | |
2025.3.2.438 | 90 | 3/2/2025 | |
2025.3.2.427 | 81 | 3/2/2025 | |
2025.3.2.359 | 88 | 3/2/2025 | |
2025.3.1.2104 | 87 | 3/1/2025 | |
2025.2.28.1745 | 88 | 2/28/2025 | |
2025.2.27.2032 | 86 | 2/27/2025 | |
2025.2.27.1859 | 90 | 2/27/2025 | |
2025.2.27.1847 | 93 | 2/27/2025 | |
2025.2.27.1820 | 100 | 2/27/2025 | |
2025.2.27.40 | 82 | 2/27/2025 | |
2025.2.26.2327 | 83 | 2/26/2025 | |
2025.2.26.2003 | 95 | 2/26/2025 | |
2025.2.26.1939 | 88 | 2/26/2025 | |
2025.2.26.505 | 84 | 2/26/2025 | |
2025.2.26.331 | 86 | 2/26/2025 | |
2025.2.26.228 | 88 | 2/26/2025 | |
2025.2.25.1402 | 78 | 2/25/2025 | |
2025.2.24.2042 | 80 | 2/24/2025 |