This is me attempting to make the pieces schtick to a "grid" using this algorithm:
const vec3 inp = ...; vec3 outp; outp.x = int((inp.x-0.25) * 2) * 0.5 + 0.25; outp.y = int((inp.y-0.25) * 2) * 0.5 + 0.25; outp.z = int((inp.z-0.25) * 2) * 0.5 + 0.25;Looks more like I'm shuffling cards than putting together a puzzle. Trial and epic fail, as always.
I also realized that I couldn't use arbitrary meshes as collision volumes, as ODE can't handle triangle-vs.-triangle collisions very well, as opposed to convex volume-vs.-convex volume. But perhaps that limitation isn't all that bad. I really want to use diagonal shapes (in 2D space, in 3D space would make the game too hard I think), but I'll just have to make sure they're all composed of cuboids.
I think I'm finally seeing the benefits of using my own game engine. This simple prototype contains simple rendering, ray picking, physical 3D movement and collision detection, iOS portability out of the box, importing gfx+physics pieces hand-made in Maya (I'll eventually generate the shapes) and a good level of configurability for things such as physics settings. In two evenings and about 330 lines of new code. Generating the pieces and the "environment" will be the hardest. Then look and feel. Then generating some 500 or so levels. And finally all the screen shots, icons and splash screens. If these tasks each take a week and no others pop up, this game should take four weeks to make. X-mas hit?