Some of you might remember a game called pontifex or bridge builder if you don’t; it’s a game in which you construct a bridge with beams and than let a train or car drive over it to see whether it holds. It is really fun and quite educational at the same time (equals morally appropriate right?). After some more research into rigid body constraints I found out that pontifex probably used the same stuff like I used in the 2D constraint based rope. So with some minor modifications it was easy to create a bridge simulator and with a littlebit more code even a bridge builder. It is still far from a game suitable for release and profit but it is definatly a playable minigame. Take a look at the working example by clicking the ‘Continue Reading’ link.
So I was looking into some cool stuff to do with my 3D engine when I came across this. I’ve always been a fan of physics simulation based realism so I began to work this out in 2D. The first demo was using elastic constraints between particles but that made a very instable system. It can be improved with better integrators like RK4 but that still didn’t result in the desired result. I might have other plans for these elastic constraints later though. You can read more about elastic constraints here [Gaffer's tutorial on spring physics] and here [Gamasutra's "Exploring spring models"]. So I went on with inelastic infinitely ’stiff’ constraints which were mentioned in this ["Advanced Character Physics" by Thomas Jakobsen] great resource on computer physics simulation. The result worked out pretty well and will be easy to port to 3D. Which will happen when I’m done with a little (very interesting) side project using the same code. More about that later… Check out the working demo after the ‘Continue Reading’ link.