Bepu + Monogame + VB

Discuss topics related to BEPUphysics or physics engine development.
Post Reply
Munty Scruntfundle
Posts: 2
Joined: Sun Jul 28, 2019 10:40 am

Bepu + Monogame + VB

Post by Munty Scruntfundle »

Hi folks.

Could you please answer a couple of questions before I start a journey that wastes hours of frustration!

Can I bolt Bepu into VS2017 using Visual Basic and Monogame? There's now a working VB template in the last Monogame release which I'm very thankful for, that's all working great.

I'm working on a couple of 3D game ideas which are going to push physics well beyond what I'm prepared to put time into. I'm ok with physics, but mesh v mesh is possibly past my abilities. I've done loads of 2D stuff, but I don't want to write a 3D engine.

Think pfs, pin ball machine, car on a track, space flyer with collisions. That's the kind of thing I need to accomplish. Small mesh travelling on a larger mesh, collision detection, I'm happy with impulse responses as long as they resolve sensibly. At this point I don't need elasticity, but it may well be useful in the future.

Anyway, that's all waffle, the main question is - can I use Bepu2 with VB and Monogame? And are there any examples of this bolted together and working?

I should add if I need to translate a load of C# to VB that's fine, it's the underlying differences in compilers that worries me, would I be hassled with having to rebuild a load of stuff and manually bolting things together?

Many thanks.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Bepu + Monogame + VB

Post by Norbo »

You technically can use v2 with VB, but there's going to be some nontrivial work involved and there aren't any examples of it available that I'm aware of. A couple of things:
- v2's API is full of non-CLS compliant features, so it cannot be used directly from VB. You'd need to create a wrapper around it that hides and abstracts all of that, likely incurring some mild overhead.
- I do not think v2 will compile directly in VS2017 due to the language features used. This shouldn't be a problem if you package it up behind a wrapper library made in VS2019, but it does add a layer of complexity. I'd recommend just using VS2019 directly if at all possible.
Munty Scruntfundle
Posts: 2
Joined: Sun Jul 28, 2019 10:40 am

Re: Bepu + Monogame + VB

Post by Munty Scruntfundle »

2019 is not a problem, well, I haven’t put my cone into it, but I can’t see anything that would be a problem.

But I’d still need to wrap for VB? Otherwise C# would be straight forward?

Thanks for the info. :o)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Bepu + Monogame + VB

Post by Norbo »

But I’d still need to wrap for VB? Otherwise C# would be straight forward?
Yup. Or at least as straightforward as the v2 API can be :P
Post Reply