Ok, so I got a new, custom physics engine in place. It’s a lot simpler than JigLibX of course, but also tailored to the current needs. It uses between 2-10% the computing time of JigLibX, pretty good I’d say.
I ran into another problem with the GC. On the XBOX, it triggers almost exactly every 412:th frame and kicks the running frame time from ~6ms to ~140ms. Thanks for that periodic lag. I profiled the memory usage and found a couple of hotspots where the engine was allocating large amounts of memory and throwing it away each frame. After having that fixed, lags went down, but still occur at irregular intervals. I made a bit of memory monitoring code which triggers the GC more often and voila, problem gone. As far as I’ve seen.
To finish off, here’s a screenshot of the dragon again. This time in black and white. I think it looks pretty good!






