VFPU accelerated libode port


Published: June 2012

Finally I decided to upload the sources that I used for Toy Wars PSP port. They're a bunch of dirty patches over ODE 0.11.1 to add optimized math routines.

The important changes are the usage of aligned data structures (for fast memory access) and the rewriting of some collision detection algorithms to take advantage of the fast vector operations of the PSP VFPU. Some algorithms are now branch-less thanks to some cool VFPU instructions.

The source does only include GIMPACT support beacuse the problems I encountered with OPCODE. Also it's important to notice that the function dGeomTriMeshDataBuildSingle changes a little bit and asks for vertices packed in 4 floats (1 unused float at the end) so it can work faster.

The results are quite impressive. I think it's about 2-3 times faster. At first the framerate was about 15 and managed to pump it up to 60. Well it depends on the scene, the number of active objects and that stuff.

In conclusion, ODE is nice, but you'd better know it well if you are going to use it, it's kinda treacherous.

Download link: psp-ode-0.11.1-gimpact.tar.bz2