GLBasic forum

Codesnippets => 3D-snippets => Topic started by: Betlheem on 2014-Jul-15

Title: 3d physics in GLBasic?
Post by: Betlheem on 2014-Jul-15
Hi.

I´m trying the free version of GLBasic and before purchase it, I need to know if there are any way I can add physics to the 3D (like Newton or Bullet). I need it working only in windows, android, linux and HTML5.

I´m not able to make a wrapper or something, so I´m asking for a easy way to add this kind of libray.

Thanks!
Title: Re: 3d physics in GLBasic?
Post by: kanonet on 2014-Jul-15
There is no 3D physics integrated with GLBasic, but wrappers are possible. There exists an old wrapper for newton and I think I read about bullet in the forum too - but I think those will mainly be Win only and not cross platform, especially not html5.
Title: Re: 3d physics in GLBasic?
Post by: Slydog on 2014-Jul-15
It would be cool even if somebody wrote a stripped-down 3d physics engine specific for GLBasic.

There are tonnes of game physics books out there that introduce each new concept (collision, friction, torque, etc) with appropriate code to add to your new library.  Just skip the advanced stuff to get basic collision working, then add as much extra stuff as needed to make it somewhat usable in basic game scenarios.

You would be constrained to GLBasic's language limitations (no OOP, or referencing!) so this may prove difficult.  Or inline it in c++.
And no, I'm not volunteering!  I suck at physics!

[Edit] I would only offer basic colliders such as box, cylinder, sphere, and capsule perhaps.  A true mesh collider sounds difficult, and may be very slow.
Title: Re: 3d physics in GLBasic?
Post by: sf-in-sf on 2015-Feb-07
For any sciences student this kind of physics ("kinematics" ?) is relatively easy. Adapting a ready-made lib in another language would be more difficult than writing what you need from scratch, I believe. I recommend my previous post on the "analog computer" simulation -> v.good introduction to movements, accelerations, damping (= friction), and resonance.