I have adapted the BEPU Debug Drawer and the Demos to the new MonoGame 3.5(.1)
What was done:
- recreate project "from scratch" : VS new project, C# lib (I haven't installed XNA refresh for VS 2015 yet)
create all folders, add content from orig BEPU sources
- add Content folder + create a new MG content inside using pipeline tool
- add instancedEffect (modified a bit to match MG standard, especially vs/ps version)
- copy resources* files from orig BEPU sources, remove all content of resource, update instancedEffect.xnb with the one built by the pipeline tool
- modify a bunch of sources to fix issue with MG3.5 (mostly BEPUphysicsDrawer\Models\ModelDisplayObjectBatch.cs)
- and converting all FBX objects from old to newer FBX 2015.1 plug-in version, in 2013 version (MonoGame content importer only support FBX plug-in >= 2011, because/thanks to assimp lib)
(- need to be confirmed by proper benchmarks: on my computer, Demos seems to be a bit faster and smoother, less CPU use for the same result)
What are the benefits of using MG(3.5) instead of XNA:
- more platforms supported (from 3 to almost a dozen including Linux, Mac and Phone)
- take advantages of new C#/.net feature (MG use now .net 4.5)
- use newer compiler/IDE (not always better, especially with VS)
- debug drawer works and can be used altogether a DX11/OpenGL game without having to keep a DX9/XNA4.0 version for debugging physics (avoiding maintaining two projects, one for the release, one for the debug, when it's possible to do so, as if you use newer C#/.net features, it may be even just impossible)
What was not done:
- provides library (and porbably content) version for ALL supported platforms by MonoGame (I only work with windows DX for now, I'll probably try WindowsGL and Linux later), testing and report from other platforms will be welcome.
Issues:
- only one I know: detectorVolume demo object (tube) is not at the right location (and maybe size), probably a FBX options issue (unit used or something else)
Solution is available => here <=.
Please don't hesitate to report any issue you may encounter.
EDIT: I forgot to add there is a little additional project to test the debug drawer (a lot more simple than Demos)
It would be great if anyone with other platform than windows can at least test and report issue/check with existing MonoGame issues.
Thanks to Eugeny Novikov who made the first MG port I know, I just look at was he has done for the VertexBufferBinding change.
Debug Drawer/demos with MonoGame 3.5
Debug Drawer/demos with MonoGame 3.5
Last edited by JusTiCe8 on Sun Apr 03, 2016 7:46 am, edited 1 time in total.
Re: Debug Drawer/demos with MonoGame 3.5
Thanks for setting this up
Re: Debug Drawer/demos with MonoGame 3.5
I have made an update, download it here
This time, all XNA related stuff have been completely removed for good, which mean project can be compiled for "any CPU", x64 or any other processor on any architecture (I hope), whereas with the previous version, project were still XNA based project, limited to x86, potentially force people to maintain at least 2 projects to have the debug drawer working, which is definitely wrong.
Thanks to VS for its non-help, I have created two MonoGame windows DX projects, reimported all the directories, sources and assets, but typing that I'm afraid it has to be done again for each target platform (unless MonoGame templates create less mess than XNA ones and allow more flexibility, but it's something I have no experience with.)
download
This time, all XNA related stuff have been completely removed for good, which mean project can be compiled for "any CPU", x64 or any other processor on any architecture (I hope), whereas with the previous version, project were still XNA based project, limited to x86, potentially force people to maintain at least 2 projects to have the debug drawer working, which is definitely wrong.
Thanks to VS for its non-help, I have created two MonoGame windows DX projects, reimported all the directories, sources and assets, but typing that I'm afraid it has to be done again for each target platform (unless MonoGame templates create less mess than XNA ones and allow more flexibility, but it's something I have no experience with.)
download