Skip to content
Saarrthi Rana

Play

Keep Them In Frame

You're the camera in a four-player co-op game. Players in your frame are safe and ghosts in your frame burn away. Zooming in scores more points, but it's easier to lose someone.

You play the camera in a co-op game

Keep Them In Frame

How I balanced it. Start here.

  • Drag to move the camera. Pinch or use the buttons to zoom
Auto camera

How a co-op camera keeps everyone in view

Press Watch the auto camera and the game frames the players by itself, with the maths shown on screen. I worked on the same problem as camera team lead on LightLock.

During a run, press B or the Debug button to see your own camera's position, its target and how fast it moves there.

  1. 01

    Find the centre

    Average the positions of every player still in the game. That point is where the camera wants to look.

  2. 02

    Box them in

    Take the smallest rectangle that holds every player, then add padding so nobody sits on the edge of the screen.

  3. 03

    Fit the box

    Zoom until the padded box fits the screen's shape, and clamp the zoom so the view never gets too tight or too wide.

  4. 04

    Ease toward it

    Move a fraction of the way to the target every frame, so the camera glides instead of snapping.

Turn sound on with the button in the top bar, or press M.