Skip to content

Commit 33d18e8

Browse files
committed
Updated manual to include the new Nuget package
1 parent c08bea8 commit 33d18e8

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

Box2dNet/Box2dNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageProjectUrl>https://github.com/thomasvt/Box2D3Net</PackageProjectUrl>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
1414
<RepositoryUrl>https://github.com/thomasvt/Box2D3Net</RepositoryUrl>
15-
<Version>3.1.0.0</Version>
15+
<Version>3.1.1.0</Version>
1616
</PropertyGroup>
1717

1818
<ItemGroup>

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,31 @@
22
33
# Intro
44

5-
This is a .NET 8.0 PInvoke wrapper for [Box2d v3](https://github.com/erincatto/box2d).
5+
This is a thin [Box2d v3](https://github.com/erincatto/box2d) wrapper that stays true to the original API.
66

77
The main objective for this wrapper is to be:
88

99
* very thin, as if you were working directly with the original C library.
10-
* low GC pressure: prevent repeated short lived heap allocs
10+
* performance: prevent data copying, prevent shortlived heap allocations.
1111

12-
Next to the generated wrapper, some helper code is provided for simplifying your work in .NET. See below for explanations about these features.
12+
Because of these, Box2dNet gives you full control over the API with the same names/contracts as the original, but with a bit of manual labour here and there.
1313

1414
> I don't use Unity and therefore cannot support it. This wrapper is meant to run in standard .NET runtimes, for instance combined with Monogame or Godot.
1515
16-
# License
16+
# QUICKSTART
1717

18-
You may do whatever you like with the code in this repo. Don't forget to respect the [Box2d v3.x](https://github.com/erincatto/box2d) license, though!
18+
* Add the [Box2dNet nuget package](https://www.nuget.org/packages/Box2dNet/) to your game's solution.
19+
* Start calling Box2D API methods from class `B2Api` (in `Box2dNet.Interop`). Their identifiers are the same as the original Box2D API, on purpose.
20+
* Work on your game!
1921

20-
# QUICKSTART
22+
The upside of a thin wrapper is you don't need to learn a different API, it's the same. The downside is you have to deal with the pointers (IntPtr). See section `Dealing with pointers (IntPtr)` in this manual for making that easier. Box2dNet also contains some helper code to minimize the pointer plumbing.
2123

22-
There's no nuget package. Just clone this repo close to your game folder, include the ```box2dnet.csproj``` into your game's .sln and start calling Box2D API functions from static class `Box2dNet.Interop.B2Api`, their identifiers are the same as the original, on purpose. That's basically it.
24+
> When you build your game in DEBUG it will use the native debug dll ```box2dd.dll``` and show assertions if you do something wrong. When you build in RELEASE it will use the native production dll ```box2d.dll```.
2325
24-
The main difference with the original API is in dealing with pointers. See section `Dealing with pointers (IntPtr)` in this manual for making that easier.
26+
# License
2527

26-
When you build your game in DEBUG it will use the native debug dll ```box2dd.dll```, when you build in RELEASE it will use the native production dll ```box2d.dll```.
28+
You may do whatever you like with the code in this repo. Don't forget to respect the [Box2d v3.x](https://github.com/erincatto/box2d) license, though!
2729

28-
> The debug version ```box2dd.dll``` will quit your game with assertion errors when you did something wrong: this helps for debugging your mistakes.
2930

3031
# What's included?
3132

0 commit comments

Comments
 (0)