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…
July 17, 2011 at 9:12 pm |
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.
July 19, 2011 at 8:51 pm |
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.
September 30, 2011 at 7:02 am |
[...] 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 [...]
October 12, 2011 at 2:21 am |
[...] 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 [...]