Author Topic: 3d physics in GLBasic?  (Read 1412 times)

Offline Betlheem

  • Mc. Print
  • *
  • Posts: 23
  • Viva y operativa
    • View Profile
3d physics in GLBasic?
« 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!

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: 3d physics in GLBasic?
« Reply #1 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.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 924
  • KodeSource
    • View Profile
    • KodeSource
Re: 3d physics in GLBasic?
« Reply #2 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.
« Last Edit: 2014-Jul-15 by Slydog »
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline sf-in-sf

  • Mr. Drawsprite
  • **
  • Posts: 93
  • Artist F.P. Brixey
    • View Profile
    • My computed art project
Re: 3d physics in GLBasic?
« Reply #3 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.
On the day the atom is a cube I will start believing in the square pixel.