Page 3 of 7

Posted: Fri Dec 30, 2011 3:32 am
by StevenM
Been experimenting with this, like it - I will be creating some presets for the visualizer with this. Some things I noticed with the visualizer -

While testing a cube dropping on a plane in FL Studio - I noticed that with each new run my box was getting stacked on an "Imaginary" rigid body - and performance was taking a huge hit too. This wasn't happening when I ran it in ZGE though.

I don't think OnClose gets executed. Putting this onloaded fixed the problem.


zbtDestroyWorld();
zbtDeleteAllShapes();
zbtClearAllHeightLists();


However, seems that crosstalk does exist - changing the bullet settings in one preset will affect another preset. So when using with FL Studio, you should only use one instance of bullet.

bullet in zge test

Posted: Sat Dec 31, 2011 2:56 am
by StevenM
finally making some progress with bullet in zgeViz - here is a test. It's just a box on a pendulum reacting to a midi note, but it's a start - I really enjoy using bullet too. Here is a youtube vid

http://www.youtube.com/watch?v=lpfsGqFfMk0

I'm going to expand this concept to include more objects and I'm goint try to implement projectiles. I' have a pretty good idea about timing it all.

Posted: Sat Jun 30, 2012 10:06 pm
by Rado1
The latest version of ZGEBullet library comes with some improvements in API; see the attached zgebullet.txt. Another step further is support for Android.

Remark: the latest testing application is not compatible with this library! I'll prepare a new version of testing application; hopefully. Currently, I'm personally testing the library on a game Toyland Shooter which is still in development.

Posted: Thu Jul 19, 2012 4:12 pm
by Rado1
I'm pleased to announce that ZGEBullet has been published on Google code - see http://code.google.com/p/zgebullet/.

Since now, all new releases of the library, "official" demos, documentation (will come later), related material, etc. can be downloaded from the Google code's project page. Of course, I'll keep you informed also via this forum/topic.

If you are interested in seeing the code, compiling it by yourself, improving it, finding bugs, putting any comments to the issue tracker, etc., please, visit the project page. You are also welcome to become a contributor.

Posted: Sat Jul 21, 2012 8:54 am
by VilleK
Thanks for publishing the source Rado1. It looks efficient enough. Good choice of using "ref" parameters to set position X,Y,Z etc in one call. I'm sure it can be slightly optimized further but it is not worth the effort because the bottleneck will still be inside Bullet physics computations.

Posted: Sun Nov 11, 2012 2:11 pm
by jph_wacheski
not sure how to use the new version,. with the ref stuff?

CurrentModel.Position.X = zbtGetPositionX(rbId);
CurrentModel.Position.Y = zbtGetPositionY(rbId);
CurrentModel.Position.Z = zbtGetPositionZ(rbId);

becomes ??

zbtGetPosition(int collisionObjectId, ref float x, ref float y, ref float z)

CurrentModel.Position= ?

Posted: Sun Nov 11, 2012 2:28 pm
by Kjell
Hi jph,

Should become ..

Code: Select all

zbtGetPosition(id, CurrentModel.Position.X, CurrentModel.Position.Y, CurrentModel.Position.Z);
Haven't tried it myself though.

K

Posted: Sun Nov 11, 2012 2:51 pm
by Rado1
You are right Kjell. This is usual OnUpdate code for dynamic objects:

Code: Select all

// update position and rotation
zbtGetPosition(RigidBodyId, CurrentModel.Position.X, CurrentModel.Position.Y, CurrentModel.Position.Z);
zbtGetRotation(RigidBodyId, CurrentModel.Rotation.X, CurrentModel.Rotation.Y, CurrentModel.Rotation.Z);
This demo project shows how to use updated API.

Posted: Sun Nov 11, 2012 2:52 pm
by jph_wacheski
Cool,. thanks Kj, works as you say.

Very nifty Rado,. I am doing some physics tests for an idea I have for a little game,. just wanted to use the latest ver. of this.., will post if anything interesting develops.

Posted: Sun Nov 11, 2012 8:09 pm
by jph_wacheski
thanks for that demo project Rado, that is what I needed to get going,.

is zbtCreateHeightfieldTerrainShape still supported? how to feed the terrain data to this now?

zbtCreateHeightList(); and related functions are gone. I am only look to use a static terrain,. if this is still possible. thanks again.

Posted: Tue Nov 13, 2012 3:20 pm
by Rado1
Hi Jph, all,
jph_wacheski wrote:is zbtCreateHeightfieldTerrainShape still supported? how to feed the terrain data to this now?
yes, zbtCreateHeightfieldTerrainShape is still supported, and thanks to the xptr parameter for heightfield data, it provides even better performance for dynamic heightmaps.

BTW today I added more parameters to zbtCreateHeightfieldTerrainShape to have better control over its properties. Up to now, heightmap was always subdivided to diamonds; which is better for smooth (hi-poly) meshes, but simple triangulation is better for low-poly terrains based on larger triangles. So I added a parameter to enable/disable diamond division. Another added parameter is heightScale, which was always 0 (unused?) up to now.

The updated version of ZGEBullet library can be found here. A new demo project, used to demonstrate dynamic heightfield terrains, was also added. Have a fun!

Rado1.

PS. Ville can you please add a new version of zgebullet.txt to ZGE distribution, thanks.

Posted: Tue Nov 13, 2012 4:09 pm
by VilleK
Works fine here. Very nice.

Posted: Mon Dec 17, 2012 9:37 pm
by Rado1
As you probably noticed here, ZGEBullet was compiled also for 64-bit Windows. It has become a part of "official distribution" and the latest version can always be downloaded from http://code.google.com/p/zgebullet/downloads/list.

Posted: Tue Dec 18, 2012 8:11 am
by jonaspm
Looks pretty good :)

Posted: Thu May 29, 2014 9:19 pm
by Rado1
ZgeBullet library has been updated to version 1.2; here is the change list:

Added:
- Support for raycast vehicle, a simple car simulation.
- Added demo #3 for raycast vehicle (used car control is little bit weird but it's almost the same on Windows with mouse and on Android with touches).

Changed:
- Updated to Bullet 2.82 (rev.2704) - latest stable version.
- ZGEBullet renamed to ZgeBullet.
- Removed boolean and rotation constants from ZGE external library.
- Demos updated to the latest changes and ZGE language updates.

For details see the ZgeBullet page at Google Code. Download demos and precompiled library for Windows and Android from the download page.

Note: The raycast vehicle demo uses Bullet's height field, which does not provide very reliable collision detection and sometimes objects can pass through. This is a known issue of Bullet library.