codefoco / chipmunkbinding Goto Github PK
View Code? Open in Web Editor NEWC# Native bindings of Chipmunk2D (compatible with iOS/Mac/Android/.NET/.UWP)
License: MIT License
C# Native bindings of Chipmunk2D (compatible with iOS/Mac/Android/.NET/.UWP)
License: MIT License
It's 2019 and C#'s only hold on games is basically MonoGame. There are 2 main ports of Box2D for C#, and one of those died on CodePlex. The other is little known. The Cocos2d port for XNA seems the best choice there is for development in MonoGame in 2019 since it includes Box2D itself, but I don't want Cocos2D. Just trying to explain why I'm here (thanks, Nuget package search).
Looks like you're not just recent, but you started in April. I'd like to get your opinion on how complete these bindings are to gauge if they're ready for actual use and if they've been tested thoroughly. Thanks!
I have tried to build a UWP app using ChipmunkBinding for ARM64, but it compiled with the following errors:
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardBeginA' for method 'System.Byte ChipmunkBinding.NativeMethods.cpArbiterCallWildcardBeginA(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardBeginB' for method 'System.Byte ChipmunkBinding.NativeMethods.cpArbiterCallWildcardBeginB(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardPostSolveA' for method 'System.Void ChipmunkBinding.NativeMethods.cpArbiterCallWildcardPostSolveA(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardPostSolveB' for method 'System.Void ChipmunkBinding.NativeMethods.cpArbiterCallWildcardPostSolveB(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardPreSolveA' for method 'System.Byte ChipmunkBinding.NativeMethods.cpArbiterCallWildcardPreSolveA(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardPreSolveB' for method 'System.Byte ChipmunkBinding.NativeMethods.cpArbiterCallWildcardPreSolveB(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardSeparateA' for method 'System.Void ChipmunkBinding.NativeMethods.cpArbiterCallWildcardSeparateA(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
2>C:\Users\marti\.nuget\packages\microsoft.net.native.compiler\2.2.7-rel-27913-00\tools\Microsoft.NetNative.targets(801,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'chipmunk.dll!cpArbiterCallWildcardSeparateB' for method 'System.Void ChipmunkBinding.NativeMethods.cpArbiterCallWildcardSeparateB(System.IntPtr, System.IntPtr)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
... etc.
It should be possible to reproduce this by creating a simple UWP app which uses Space
and compiling its release build for ARM64. The compilation succeeds with these errors, but app then crashes at runtime when any ChipmunkBinding
API is used.
Shape has a property called CollisionType which is currently just an integer. It should be updated to an enum so I know what the values passed in represent. (If it's supposed to be an integer, the description needs to be updated to explain it better.)
Version: 1.0.5 (Nuget version)
C:\Users\novia\Documents\GitHub\ChipmunkBinding>msbuild ChipmunkBinding.sln
MSBuild version 17.6.3+07e294721 for .NET Framework
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 8/11/2023 1:17:49 AM.
Project "C:\Users\novia\Documents\GitHub\ChipmunkBinding\ChipmunkBinding.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "C:\Users\novia\Documents\GitHub\ChipmunkBinding\ChipmunkBinding.sln" (1) is building "C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\net46\ChipmunkBinding.csproj" (2) on node 1 (default targets).
BuildChipmunkWindows:
Building Windows Chipmunk library (x86)
cmake --build . --config Release
MSBuild version 17.6.3+07e294721 for .NET Framework
C:\Users\novia\Documents\GitHub\ChipmunkBinding\external\Chipmunk2D\src\chipmunk.rc(10): fatal error RC1015: cannot open include file 'afxres.h'. [C:\Users\novia\Documents\GitHub\ChipmunkBinding\external\Chipmunk2D\wi
n-x86\libchipmunk.vcxproj] [C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\net46\ChipmunkBinding.csproj]
C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\targets\BuildChipmunk.Windows.targets(15,5): error MSB3073: The command "cmake --build . --config Release" exited with code 1. [C:\Users\novia\Documents\GitHub\Chi
pmunkBinding\build\net46\ChipmunkBinding.csproj]
Done Building Project "C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\net46\ChipmunkBinding.csproj" (default targets) -- FAILED.
Done Building Project "C:\Users\novia\Documents\GitHub\ChipmunkBinding\ChipmunkBinding.sln" (default targets) -- FAILED.
Build FAILED.
"C:\Users\novia\Documents\GitHub\ChipmunkBinding\ChipmunkBinding.sln" (default target) (1) ->
"C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\net46\ChipmunkBinding.csproj" (default target) (2) ->
(BuildChipmunkWindows target) ->
C:\Users\novia\Documents\GitHub\ChipmunkBinding\external\Chipmunk2D\src\chipmunk.rc(10): fatal error RC1015: cannot open include file 'afxres.h'. [C:\Users\novia\Documents\GitHub\ChipmunkBinding\external\Chipmunk2D\
win-x86\libchipmunk.vcxproj] [C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\net46\ChipmunkBinding.csproj]
C:\Users\novia\Documents\GitHub\ChipmunkBinding\build\targets\BuildChipmunk.Windows.targets(15,5): error MSB3073: The command "cmake --build . --config Release" exited with code 1. [C:\Users\novia\Documents\GitHub\C
hipmunkBinding\build\net46\ChipmunkBinding.csproj]
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:00.62
You can pass width and height, so what does radius do? I would think it makes a square, but not when you can define all attributes at once.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.