Something on a Sunday #11: Camera Motion

This was a fun job 🙂

The original game had a fixed camera for one very simple and very unimaginative reason: I had no time. There is a game design concern, you don’t want levels too big, as individual characters will get left behind, and the player may become confused at relative location.

Camera movement within medium sized levels is however essential to creating the sense of increased scale which I want for this game. With that in mind, I sat down this week and designed a 2d scrolling camera.

Panning – I based this on my experience of scripting panning cameras in flash. Essentially, a target optimum position for the camera is set (in this case, to the active player). The camera then moves 1/100th of of the distance there on each update. The result is a camera pan with a quick start, but a nice smooth ease out. This feels right to me, it feels a lot like a cameraman reacting.. fast adjustment to change in focus, followed by smooth placement at the end. It’s basically the trick firefly pulled in every single space battle shot.

Level extents – Really simple, the camera object has 4 variables, one for each extent (top, bottom, left, right). If the camera target strays out of this imagined box, it is adjusted back in, pre camera move. This maintains the smoothness, while ensuring players don’t see my messy level edges 🙂

And here’s a video of the resulting camera. Looking forward to plugging this into a real level. Have to make one first…


4 Responses to “Something on a Sunday #11: Camera Motion”

  1. Dr. Mike Reddy Says:

    Not sure I like the vertical moving so much. What you’re doing is exponential damping. I’d use a much bigger damper on vertical movement to allow the player to get a better feel for the range of each character’s jump. Or lock the vertical entirely unless there is a major vertical shift.

    • mikebithell Says:

      really good point.

      I’ve since worked in a separate vertical multiplier, which seems to do the job. It’ll be toned back for games without much vertical movement, and up for climbing bits. It can also be updated at runtime, making a more dynamic camera.

      Great call – exactly the reason I’m sharing on this blog, to get cool feedback like yours. Thanks for taking the time sir.

  2. The Indie Dozen: Mike Bithell interview « lackingavalanch92 Says:

    […] Thomas Was Alone, according to Mike’s excellent development blog, he’s been adding a dynamic camera and a procedural music system to the game. So what else has been going […]

  3. The Indie Dozen: Mike Bithell interview | Richard Hartley Says:

    […] As for Thomas Was Alone, according to Mike's excellent development blog, he's been adding a dynamic camera and a procedural music system to the game. So what else has been going on? You've just been at the […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: