Hi everyone,
This might be useful for people that are considering upgrading, I'll give my experiences upgrading box2d v-2.0.1 to the latest trunk on google code.
My time breakdown was like this:
60% - Changing the code to use the new fixtures instead of the shapes.
25% - changes to the collision processing
10% - one of my functions used the world->query function, which seems to have been changed to a callback process... that didnt fit well with what I needed, so I wrote my own query routine (probably slower, as it just iterates through the world body list, using b2Distance).
5% - trying to find the new SetMassFromShapes function, and then realizing it doesn't exist anymore (I believe its done automatically with one of the overloaded createfixture() calls, but i converted my code to set the mass seperately.
Performance observations: I did a small amount of performance testing comparing the two box2d versions. My setup is vc2008, c++, with a custom built engine running directx9. The testing I did was entirely observational, and not at all scientific. Its based on the core running speed of my engine with a defined number of physics objects being implemented.
I noticed a 5-10% speed increase in the broad phase/step speed for the new version, which became more apparent as more physics objects were added.
Adding/removing a lot of bodies seemed a bit slower in the new release, not sure why this is the case.
I could do some proper profiling if people would find it useful.
Also, I didnt notice any problems with the new version. For me, the two different versions produce exactly the same output.
Dan
This might be useful for people that are considering upgrading, I'll give my experiences upgrading box2d v-2.0.1 to the latest trunk on google code.
My time breakdown was like this:
60% - Changing the code to use the new fixtures instead of the shapes.
25% - changes to the collision processing
10% - one of my functions used the world->query function, which seems to have been changed to a callback process... that didnt fit well with what I needed, so I wrote my own query routine (probably slower, as it just iterates through the world body list, using b2Distance).
5% - trying to find the new SetMassFromShapes function, and then realizing it doesn't exist anymore (I believe its done automatically with one of the overloaded createfixture() calls, but i converted my code to set the mass seperately.
Performance observations: I did a small amount of performance testing comparing the two box2d versions. My setup is vc2008, c++, with a custom built engine running directx9. The testing I did was entirely observational, and not at all scientific. Its based on the core running speed of my engine with a defined number of physics objects being implemented.
I noticed a 5-10% speed increase in the broad phase/step speed for the new version, which became more apparent as more physics objects were added.
Adding/removing a lot of bodies seemed a bit slower in the new release, not sure why this is the case.
I could do some proper profiling if people would find it useful.
Also, I didnt notice any problems with the new version. For me, the two different versions produce exactly the same output.
Dan