Porting Newton to BlitzMAX Windows, Linux, and Mac

BlitzMax Forums/BlitzMax Programming/Porting Newton to BlitzMAX Windows, Linux, and Mac

BLaBZ(Posted 2013) [#1]
Hello community!

I'd love to release my game for Linux\Mac, unfortunately Itmbin's newton wrapper works only for windows.

http://www.blitzbasic.com/Community/posts.php?topic=99417#1175276

I've never ported code from c++ into BlitzMAX before but I'm always willing and eager to learn.

What exactly would I have to do to port Itmbin's Newton Wrapper or Newton itself to Blitzmax?

Thanks!


Zethrax(Posted 2013) [#2]
Itmbin open-sourced his Newton wrapper, so you may be able to use that code as the basis for a port.

http://www.blitzbasic.com/Community/posts.php?topic=99274
https://docs.google.com/file/d/0BxnwgQiJB0oZZzRlNUtsU1JiQ00/edit


UNZ(Posted 2013) [#3]
Hi,
I'm wrapping Newton Game Dynamics (2.3.5 as this is the last stable release) for use with BlitzMax in general and the irrlicht mod in particular.
I use function pointers to the dll. It was a bit tricky cause the newton documentation is outdated (stuff like missing parameters etc.)

All basic collision (convex primitives, compound collision, tree collision) work quite well. But the joints are a bit crappy. Maybe it is because I apply wrong values but they tend to...difficult to describe... increase their angular velocity extremely? And I can't get the function pointers of the dJointLibrary dll for some reason. (This dll contains the functionality of ragdolls and vehicles in newton 2.0) Maybe they renamed the functions...

Anyway. A download is better than a thousand words:
https://www.dropbox.com/s/oaivhyjg65p7xy6/newton_wrapper_pre_alpha.zip

This is a copy of my working dir. In most executables you can hit CTRL+W to show a newton collision wireframe overlay and SPACE to shoot a sphere. With a left mouse click you can add an impulse at the current mouse pos in direction of the camera.

I know that this works on windows and linux. I don't have a mac though.

(You can get gman's irrlicht3d mod from http://www.gprogs.com/viewtopic.php?id=450)

bye


BLaBZ(Posted 2013) [#4]
That's great UNZ! I can't wait to try this.


JoshK(Posted 2013) [#5]
Newton 3 is open-source, FYI.


BLaBZ(Posted 2013) [#6]
The web site seems to be outdated


Hardcoal(Posted 2013) [#7]
is there physx wrapper for blitzmax?


xlsior(Posted 2013) [#8]
Don't know about PhysX, but Brucey has Chipmunk and Box2D physics modules for download.


Gl¡tch(Posted 2013) [#9]
Problem with Bruceys Box2D module is it's woefully out of date.. I think it's based on the 1.x branch. Box2D 2.x at least get's shot of the AABB world restrictions.

I think someone on here has a half decent port of the 2.x branch.

https://code.google.com/p/arme-mod/


LT(Posted 2013) [#10]
I'm interested in porting Bullet, but it's a static library. I know it's possible to do it by finishing the C API, which is woefully lacking, but does anyone know if it's possible to use the C++ API directly in BlitzMax?