Once again I used some music by bitbof and synced it to the amazing raymarching examples from Frank Reitberger. I used some kind of pseudo “beat detection” to detect patterns in the volume changes of the music. Basically it just listens for small, medium and high volume peaks. The volume changes are precalculated with Mr.doob’s python script and included as a large array. The beats are then mapped to the shader variables to alter the torus. If a medium beat or a large beat is detected the shader changes the definition of the implicit torus so that the hole scene looks a bit more dynamic.
I tried the c++ version of bullet over jni from this tutorial. This leads to an speed increase of around 10 times. For complex scenes this still doesn’t seem enough.
At the moment libgdx only supports Box2D as a physics engine. So I tried JBullet and jinngine to test the performance of 3D physics engines.
Sadly the performance of both physic engines isn’t good on android. JBullet is too slow and with jinngine dalviks garbage collector goes nuts. But anyway, here are some screenshots and the jars.
JBullet: Milestone: ~1 FPS
Ragdoll example in jinngine: Milestone: ~10 FPS
After realizing that the tested 3D physics engines are too slow for android devices I tried Box2D (which is buildin in libgdx) in a 3D environment. Box2D seems to run fast enough (around 5ms/frame with 100 cubes) to be used in a real game. I will try that in the future…
Milestone: ~15fps at start and ~40fps if anything has settled