BASIC

Author Topic: BulletPhysics Library  (Read 5681 times)

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
BulletPhysics Library
« on: 2012-Mar-01 »
Hi guys,

this is the first version of the bullet physics wrapper for GLBasic.
At the moment it is win only. But in the future it will be multiplatform, I hope! :)

If you like and use it, it woul be nice if you could mention me in the credits.  :booze:

In the attachment are the latest library, the glbasic functions and a demo project.
Download it, open the gbap and press F5! :)

Hope you like it!

Cheers

The current stable features of the library are:
  • Create RigidBodies: box, sphere, cone, capsule
  • Create a static floor plane
  • Get the positions of the bodies
  • Get the rotations of the bodies

[attachment deleted by admin]
« Last Edit: 2012-Mar-01 by backslider »

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: BulletPhysics Library
« Reply #1 on: 2012-Mar-01 »
Nice! Will have to have a look at this. Curse stupid updates I have to do to last project! Hopefully will get some time on the weekend...

Is the "hope" for multiplatform (I think we can safely say iOS would be the big one although Android/WebOS would be sweet too) for the speed of it, or do you think it just might not be possible with your implementation?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: BulletPhysics Library
« Reply #2 on: 2012-Mar-01 »
The "hope" is for speed AND the implementation...
But it should work!

I will test it and then I can say more about it!

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: BulletPhysics Library
« Reply #3 on: 2012-Mar-01 »
Cool. Well hopefully so then. Seriously IMHO is best thing to upgrade GLB in a while. We will need to get you a statue or something :)

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline Nathan

  • Mr. Polyvector
  • ***
  • Posts: 116
    • View Profile
Re: BulletPhysics Library
« Reply #4 on: 2012-Mar-01 »
I agree, really good work here.

 :booze: :booze:

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: BulletPhysics Library
« Reply #5 on: 2012-Mar-02 »
Could sb. try to compile the code for ios and link the .a to the xcode project?
It COULD work... ;)

Please tell me, if it works or not! :)

cheers

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1593
    • View Profile
    • AMpostata Website
Re: BulletPhysics Library
« Reply #6 on: 2012-Mar-02 »
Could sb. try to compile the code for ios and link the .a to the xcode project?
It COULD work... ;)

Please tell me, if it works or not! :)

cheers

I have try with no luck. My limited kowledge dont know what "to link the .a to the xcode project" is. Anyway, I try iphone->add->existing files-> and choose the .a file, that now is show at the xcode window (with some other .a files and info.plist and other projhect files) but no luck, I got the same errors

Quote
ld: warning: in /Volumes/Proyectos/bullet_physics_cpp/distribute/iPhone/XCode/libGLBbulletPhysics.a, file was built for unsupported file format which is not the architecture being linked (armv6)

  "_btCreateStaticPlane", referenced from:
      __GLBASIC__::__MainGameSub_()       in libPROGRAM.a(gpc_temp0.o)
  "_btStepSimulation", referenced from:
      __GLBASIC__::__MainGameSub_()       in libPROGRAM.a(gpc_temp0.o)
  "_btCreateBox", referenced from:
      __GLBASIC__::__MainGameSub_()       in libPROGRAM.a(gpc_temp0.o)
(and a ton of this)

check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3338
  • Integrated Brain
    • View Profile
Re: BulletPhysics Library
« Reply #7 on: 2012-Mar-09 »
Hi for android compile, but in my Archos don´t works... the device teel me and error, but in GlBasic compile succesfully, I only touch this...

I put the .a file of your code into the Compile folder, the same like when using box2d... perhpas a little push make works in android whit out great effort...

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2542
    • View Profile
Re: BulletPhysics Library
« Reply #8 on: 2012-Mar-09 »
Small question, does it need to use T3DEntity? I actually use my own Entity type of system, so integrating a second one, for physics, could be a bit messy for me personally?

BTW how is performance on Android/iOS any tests yet?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: BulletPhysics Library
« Reply #9 on: 2012-Mar-10 »
It perfectly works without The T3DEntity. And i agree, its a waste of CPU power to calculate everything 2 times.

I wrote about this and how to do it here: http://www.glbasic.com/forum/index.php?topic=7740.msg64432#msg64432
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: BulletPhysics Library
« Reply #10 on: 2012-Mar-10 »
you cant use the static library from windows for arm platforms. u need a compiled lib made with a compiler targeting the iphone armv6 / v7 platform to link without errors. Same for android and linux.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: BulletPhysics Library
« Reply #11 on: 2012-Mar-12 »
Small question, does it need to use T3DEntity? I actually use my own Entity type of system, so integrating a second one, for physics, could be a bit messy for me personally?

BTW how is performance on Android/iOS any tests yet?
No, you don't need the ES from Gernot! ;)
The bulletphyiscs lib is "standalone".

At the moment I only have compiled the lib for Windows.

cheers

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3338
  • Integrated Brain
    • View Profile
Re: BulletPhysics Library
« Reply #12 on: 2012-Mar-19 »
BackSlider, please don´t leave out this project.. I think have physics in 3D will be a great leap in 3D Glbasic... have physics in 3D can offer a very interesting about thinking in new games... I don´t sure how it´s complicated to port to android and the other platforms... but can be how i told you very very interesting...


Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: BulletPhysics Library
« Reply #13 on: 2012-Mar-20 »
This project is active! ;) Don't worry!

At the moment I'm trying to compile the engine without a static lib (only from source) but it isn't that easy. ;)
Please be patient.

Cheers

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2542
    • View Profile
Re: BulletPhysics Library
« Reply #14 on: 2012-Mar-20 »
That's good to know!  :)
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)