Dylan Falconer

Join 500+ game programmers getting weekly tips.

How to make your game's camera not suck

Ever played a game and felt that it was off, but couldn’t put your finger on why?

It might be the camera.

Let’s fix that.

Slapping together a follow-the-player camera and calling it a day is all too tempting.

That’s how you get:

We can do better.

A subset of camera techniques

Position Locking: Sticks to the player. Simple but limiting. (default) 20240725_132242.jpg Lerp-Smoothing: Follows smoothly. Faster when far away. (default) 20240725_132033.jpg Edge-Snapping: Stops at edges. Good for hiding out-of-bounds. 20240725_130633.jpg Camera-Window: Moves when the player hits the edge of an invisible box. 20240725_132045.jpg Forward-Focus: Snaps to have plenty of space ahead. 20240725_130643.jpg

Let’s make a metroidvania camera

What a metroidvania needs:

My recommendation? Mix these as a great starting point:

Later, I’d think about having different camera styles for different rooms.

Some rooms may have trigger zones that change the camera style.

Platform-Snapping: Snaps the camera to the platform Y level once the player lands. For vertical rooms.

Wrap-Up

Shipping with a default style camera may be fine for your game.

It’s a good idea to consider your options.

Details like cameras are overlooked by devs, but the players notice when it’s not right.

Make great games.

References

This article is the ultimate guide to 2D cameras. I recommend checking it out.

Scroll Back: The Theory and Practice of Cameras in Side-Scrollers - Itay Keren


← Articles

Join 500+ game programmers getting weekly tips.