Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


The new camera control model (where the control logic is a separate control object that gets attached to an otherwise passive camera object) is in, and works a treat. I now have a selection of smaller more focused camera control modules that can be attached to the camera, like a 3rd person controller for the main game, a push scroll controller when dragging things around in the editor, and a curve constrained scrolling view for the side scroller. As well as removing a really ugly bit of design, this frees me up to write dedicated camera control logic for specific game ideas/modes without having to hack around with my main game camera.

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!

Sign in to follow this  


Recommended Comments

re: your side scrolling demo AND the unrelated topic of the Bioshock demo:

Oh so awesome.

Share this comment

Link to comment
Looking really good. 2.5D sidescrollers are something I've never been a particularly huge fan of, but appreciate in the abstract.

Bioshock demo: Awesome. Apparently Toys R Us and GameStop in some regions are breaking the street date on CE and non-CE versions of Bioshock so you might be able to pick it up right now. Just please don't spoil it for me, or I'll ban you.

Share this comment

Link to comment
Thanks for the comments all.

And to be honest Rav, I'm not a fan of them either! Although I will admit my brother and I spent countless months playing Ghosts and Goblins in the C64.

My heart is still in the 3rd person isometric style game - but I'm just dipping my toe in these waters for reasons I can't get into right now. 95% of the work is totally re-usable for Milkshake. Just taking a break to work on something else has also made me hugely productive lately and forced me to clean up a bunch of rubbish I'd been avoiding for ages. I'd never really given any thought as to how I'd handle game specific code/data/scripts/control/UI, and doing this has really helped me to sit down and come up with a solution which I think will benefit my main game in the long run.

Re: Bioshock - the shops around Toronto are usually pretty by-the-book on the release dates, so unfortunately I can't race through the game ahead of you and spoil everything for you =)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!