Camera systems get a lot of attention in 3D games. Reviewers often write something like, “The gameplay is great, but the camera needs work,” or “The sequel drastically improves on the original’s camera system.” The camera can easily make or break a 3D experience. However, in 2D, cameras are usually taken for granted. They are normally relatively simple to design, because as long as they are looking ahead in the general direction of the player’s interest, not much can go wrong. In fact, I can’t think of any situation in a 2D game where I thought about the camera at all!

However, for better or for worse, Pizza Vs. Skeletons will not be lucky enough to get away with a simple camera. Three main factors necessitate a more robust approach: 1) The pizza’s 288 pixel radius consumes 90% of vertical screen space and 60% of horizontal space. I’m willing to claim that this makes the pizza one of the largest playable characters ever to star in a 2D game. 2) The diverse set of goals from level to level means that different vantage points are important at different times. 3) Our 2D engine, significantly enhanced for Pizza Vs. Skeletons, now fully supports scaling and rotation of the camera, so we have to think in dimensions that didn’t exist in 2D’s 16-bit golden age.

Following is an explanation of how we are currently tackling the camera system for each of the ten modes we showed off in last week’s video.

Gladiator Mode

In the game’s “core” level type, players in a flat arena crush marching armies of land- and air-based skeletons as they attack from both directions:

  • The bottom of the screen is always fixed to a vertical position on the ground, so that the player can always see the ground.
  • The zoom is set so that the top of the pizza is just barely above the screen.
  • If there are no enemies in the world, the camera’s x position relative to the pizza changes based on the direction the player is moving.
  • If there are enemies in the world but not onscreen, the center of the pizza is aligned to the edge of the screen opposite the closest enemy.
  • If there are enemies onscreen, the screen is centered between the closest enemy and the pizza.

Sumo Mode

In this mode, which will be used mainly for boss battles, the player attempts to push a very large skull off of a platform:

  • The bottom of the screen is fixed to a vertical position on the ground.
  • The zoom is set so that the top of the screen is either the top of the pizza or the top of the boss, whichever is higher.
  • The camera stays centered between the player and boss unless the boss is offscreen.

Wrecking Ball Mode

In this mode, the pizza is suspended on a chain being lowered between two apartment high-rises. The player must smash skeletons when they appear, and avoid smashing civilians:

  • The pizza is one-sixth normal size
  • The camera pans down at a constant rate, keeping slightly below the top of the chain.

Puppy Rescue Mode

In this mode, the player must traverse a warzone, breaking puppies free from cages, and returning them to their doghouse:

  • If not all puppies have been found, and there are cages on screen, the screen is centered horizontally on a cage.
  • If not all puppies have been found and there are not cages onscreen, but there are enemies on screen, the screen is centered between player and the enemies. However, the camera stops panning toward the enemy if the player’s center would no longer be on screen.
  • If not all puppies have been found, and there are no cages or enemies on screen, center the pizza on the left edge of the screen.
  • All of the previous rules apply once all the puppies have been found, except the doghouse takes the place of cages.

Bounce Castle Mode

In this mode, the pizza must bounce springy enemies off the bounce castle while avoiding hazards like arrows:

  • The pizza is horizontally centered on the screen
  • The zoom is set so the bounce castle floor is always visible, and the top of the pizza is just offscreen.

Ski Slopes Mode

In these levels, the pizza rolls downhill, crushing snowboarding skeletons and collecting airborne cash.

  • The camera’s zoom is fixed.
  • The camera is panned so that the top of the pizza is always just offscreen.
  • The pizza is centered on left edge of screen unless the player is moving backwards, in which case it will move up to 1/3 screen behind the center of the pizza.

Karate Mode

In this mode, the pizza bounces on successive springy enemies to gain more and more height, in order to smash through a stack of wooden planks at the end of the level.

  • The bottom of the screen is fixed on the ground
  • The camera is always panned 128 pixels to the left of the pizza, to allow for better targeting of the springy enemies.
  • The camera is zoomed so that the top of the pizza is always just offscreen.

Undersea Mode

In aquatic levels, the player swims underwater, eating smaller skeletal fish, and avoiding being eaten by larger ones.

  • The screen is centered on the pizza.
  • The zoom factor depends only on the size of the pizza, which increases as the player eats more fish.

Angry Mode

In this mode, the player crushes through a fortress in order to destroy small, circular, skulls within:

  • This camera works the same as in Gladiator Mode, except everything destructible (the building blocks of the fortress) counts as an enemy for the purposes of camera panning.

Balance Ball Mode

In these levels, the player must keep the pizza balanced on a rolling skull as it traverses a bed of spikes:

  • The camera is panned horizontally and zoomed so that the balance ball stays at x = 128 pixels and y = 256 pixels relative to top left of screen.
  • The bottom of the screen is fixed to the ground.