The first side scrolling camera model I made locked the plane of the camera exactly to the tangent of the curve (so that left/right was always guaranteed to move the character along the side-scrolling curve). It worked ok on the long curves, but as soon as you tried to take the character through some windy sections, the camera starts to thrash about in a rather alarming fashion. To fix this, I put an upper limit on the pan speed the camera controller would allow, and put a new option in the side-scroller character controller that forces left and right to always track the curve, even when the curve isn't exactly aligned with the camera plane. The combination of these two bits of code actually feels pretty good - on smooth curves, the camera tracks the curve perfectly, and on windy sections, it smooths out the motion quite a bit leaving the character controller to soak up the bumps. I'll wait until I get some more representative levels to walk around before I spend any more time playing with this bit I think.
In the video below, I'm just holding right on the stick and the combination of the camera and character controllers keep him running along the path.
I spent what was left of the week (and what's gone of this one) whipping up a cross-platform binary file format back-end. While all of the existing resources are stored as XML, the objects in the game access it through a format independent API - so in theory, all I had to do was implement a version of this API that talked to binary blobs of data.
I spent a bit of time deciding on a binary block layout (block header with block type and block size, followed by the block specific data) and then started wading through a slow but consistent stream of bugs. The whole thing ended up weighing in at 1000 odd lines of code and can now happily read and write every bit of data in my game (including animation, geometry, level data, configuration info, object relationships, etc). Then came the really hard bit - deciding on a file extension. I finally settled on ".cub" (Custard Universal Binary - my engine is called Custard).
For anyone that's interested in file formats, the binary version ended up being almost half the size of the XML one (and my XML is about as lean as you can make it). I haven't measured it, but I'm sure it's at least twice as fast to load as well.
This gets me one step closer to being able to post up a demo!
And the Bioshock demo just finished downloading ... which puts me a few steps further away!
Cheers!
Oh so awesome.