In a 2D game the camera decides how much of the level you can see and where your character sits in the frame. It seems simple: keep the hero in the middle. In practice, a camera locked to the centre makes a game harder to play and unpleasant to watch, and nearly every side-scroller since the 1980s has done something smarter.
The clearest reference on the subject is a 2015 Game Developers Conference talk by Itay Keren, the developer of Mushroom 11, called "Scroll Back: The Theory and Practice of Cameras in Side-Scrollers". It catalogues the techniques below across decades of games.
The problem with centring
If the character is always dead centre, two things go wrong.
- You see as much behind you as ahead. Half the screen shows ground you have already crossed. Enemies and pits ahead appear with half the warning they could have.
- Every twitch moves the world. Each small step, hop and landing shifts the whole background. On a large screen this is tiring, and for some people it causes motion sickness.
The fixes all come down to two ideas: move the camera less often, and when it moves, favour the direction the player is heading.
The parts of a 2D camera
| Technique | What it does | What it fixes |
|---|---|---|
| Dead zone | A box around the character. The camera only moves when the character pushes against its edge | Constant small movements |
| Look-ahead | The camera shifts in the direction the character faces or moves | Too little warning |
| Smoothing | The camera eases towards its target instead of jumping there | Jerky motion |
| Platform snapping | The camera only moves up or down when the character lands on a new platform | The screen bobbing with every jump |
| Camera bounds | The camera stops at the edges of the level or room | Showing empty space outside the map |
| Zoom to fit | The camera pulls back to keep several things in view | Losing sight of a boss or another player |
How well-known games use them
Super Mario Bros. (1985) scrolls only forwards. Mario can run in the left part of the screen without moving the camera, and the view advances once he pushes past a point near the middle. The screen never scrolls back, which also stops players returning to earlier parts of a level.
Super Mario World treats vertical movement differently from horizontal. The camera does not follow every jump. It stays level and catches up when Mario lands on a higher platform or climbs far enough, which is platform snapping in practice. It also lets the player nudge the view left or right with the shoulder buttons.
Room-based games such as the original The Legend of Zelda and Celeste avoid the question for much of the time. The camera holds still on one room and moves only when you leave it. A fixed view suits precise platforming because distances on screen never change.
Multiplayer games on one screen, such as the Super Smash Bros. series, zoom and pan to keep every fighter in frame, so the camera pulls out when players separate and tightens when they meet.
What a bad camera costs you
- Blind jumps. If the camera does not look down when you fall or stand at an edge, you leap towards ground you cannot see. Good games pan down while you fall or let you look with the stick.
- Late enemies. Without look-ahead, a fast character outruns the camera's warning time. This was a real problem for early high-speed platformers.
- Lost in a fight. A camera that follows only you can hide the thing attacking you. Boss arenas often lock the view for this reason.
What you can do as a player
- Check the options. Many games have settings for camera shake, smoothing or look-ahead. Turning shake down often helps more than any other change if a game makes you queasy.
- Face the way you are going. In games with look-ahead, turning around for a moment swings the view away from the danger. Walk backwards as little as possible.
- Use the manual look. If a game lets you pan with a stick or a button, use it before blind drops.
- Slow down at screen edges. When you are near the leading edge of the view, the camera has run out of look-ahead. Give it a moment to catch up.
- Sit back from a big screen. A scrolling 2D view fills more of your vision than a 3D one, so a little distance makes motion easier on the eyes.